@wordpress/edit-site 5.32.0 → 5.33.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 (809) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/components/add-new-page/index.js.map +1 -1
  3. package/build/components/add-new-pattern/index.js.map +1 -1
  4. package/build/components/add-new-template/add-custom-generic-template-modal-content.js.map +1 -1
  5. package/build/components/add-new-template/add-custom-template-modal-content.js.map +1 -1
  6. package/build/components/add-new-template/index.js +282 -13
  7. package/build/components/add-new-template/index.js.map +1 -1
  8. package/build/components/add-new-template/utils.js +22 -11
  9. package/build/components/add-new-template/utils.js.map +1 -1
  10. package/build/components/app/index.js.map +1 -1
  11. package/build/components/async/index.js +51 -0
  12. package/build/components/async/index.js.map +1 -0
  13. package/build/components/block-editor/block-inspector-button.js +10 -9
  14. package/build/components/block-editor/block-inspector-button.js.map +1 -1
  15. package/build/components/block-editor/editor-canvas.js +15 -6
  16. package/build/components/block-editor/editor-canvas.js.map +1 -1
  17. package/build/components/block-editor/inserter-media-categories.js.map +1 -1
  18. package/build/components/block-editor/resizable-editor.js.map +1 -1
  19. package/build/components/block-editor/resize-handle.js.map +1 -1
  20. package/build/components/block-editor/site-editor-canvas.js +5 -1
  21. package/build/components/block-editor/site-editor-canvas.js.map +1 -1
  22. package/build/components/block-editor/use-navigate-to-entity-record.js.map +1 -1
  23. package/build/components/block-editor/use-site-editor-settings.js.map +1 -1
  24. package/build/components/canvas-loader/index.js.map +1 -1
  25. package/build/components/code-editor/index.js.map +1 -1
  26. package/build/components/create-template-part-modal/index.js.map +1 -1
  27. package/build/components/editor/index.js +35 -8
  28. package/build/components/editor/index.js.map +1 -1
  29. package/build/components/editor-canvas-container/index.js.map +1 -1
  30. package/build/components/error-boundary/index.js.map +1 -1
  31. package/build/components/error-boundary/warning.js.map +1 -1
  32. package/build/components/global-styles/background-panel.js +13 -1
  33. package/build/components/global-styles/background-panel.js.map +1 -1
  34. package/build/components/global-styles/block-preview-panel.js +6 -1
  35. package/build/components/global-styles/block-preview-panel.js.map +1 -1
  36. package/build/components/global-styles/color-indicator-wrapper.js.map +1 -1
  37. package/build/components/global-styles/color-palette-panel.js.map +1 -1
  38. package/build/components/global-styles/dimensions-panel.js.map +1 -1
  39. package/build/components/global-styles/font-families.js +1 -1
  40. package/build/components/global-styles/font-families.js.map +1 -1
  41. package/build/components/global-styles/font-family-item.js.map +1 -1
  42. package/build/components/global-styles/font-library-modal/collection-font-variant.js.map +1 -1
  43. package/build/components/global-styles/font-library-modal/context.js +60 -32
  44. package/build/components/global-styles/font-library-modal/context.js.map +1 -1
  45. package/build/components/global-styles/font-library-modal/font-card.js.map +1 -1
  46. package/build/components/global-styles/font-library-modal/font-collection.js +11 -4
  47. package/build/components/global-styles/font-library-modal/font-collection.js.map +1 -1
  48. package/build/components/global-styles/font-library-modal/font-demo.js.map +1 -1
  49. package/build/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js.map +1 -1
  50. package/build/components/global-styles/font-library-modal/index.js +1 -1
  51. package/build/components/global-styles/font-library-modal/index.js.map +1 -1
  52. package/build/components/global-styles/font-library-modal/installed-fonts.js +10 -9
  53. package/build/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
  54. package/build/components/global-styles/font-library-modal/library-font-details.js.map +1 -1
  55. package/build/components/global-styles/font-library-modal/library-font-variant.js.map +1 -1
  56. package/build/components/global-styles/font-library-modal/resolvers.js.map +1 -1
  57. package/build/components/global-styles/font-library-modal/upload-fonts.js.map +1 -1
  58. package/build/components/global-styles/font-library-modal/utils/constants.js.map +1 -1
  59. package/build/components/global-styles/font-library-modal/utils/filter-fonts.js.map +1 -1
  60. package/build/components/global-styles/font-library-modal/utils/fonts-outline.js.map +1 -1
  61. package/build/components/global-styles/font-library-modal/utils/index.js.map +1 -1
  62. package/build/components/global-styles/font-library-modal/utils/make-families-from-faces.js.map +1 -1
  63. package/build/components/global-styles/font-library-modal/utils/preview-styles.js.map +1 -1
  64. package/build/components/global-styles/font-library-modal/utils/sort-font-faces.js.map +1 -1
  65. package/build/components/global-styles/font-library-modal/utils/toggleFont.js.map +1 -1
  66. package/build/components/global-styles/global-styles-provider.js.map +1 -1
  67. package/build/components/global-styles/gradients-palette-panel.js.map +1 -1
  68. package/build/components/global-styles/header.js.map +1 -1
  69. package/build/components/global-styles/highlighted-colors.js +1 -1
  70. package/build/components/global-styles/highlighted-colors.js.map +1 -1
  71. package/build/components/global-styles/hooks.js +11 -3
  72. package/build/components/global-styles/hooks.js.map +1 -1
  73. package/build/components/global-styles/icon-with-current-color.js.map +1 -1
  74. package/build/components/global-styles/index.js.map +1 -1
  75. package/build/components/global-styles/navigation-button.js.map +1 -1
  76. package/build/components/global-styles/palette.js.map +1 -1
  77. package/build/components/global-styles/preview-colors.js.map +1 -1
  78. package/build/components/global-styles/preview-iframe.js.map +1 -1
  79. package/build/components/global-styles/preview-styles.js.map +1 -1
  80. package/build/components/global-styles/root-menu.js +2 -2
  81. package/build/components/global-styles/root-menu.js.map +1 -1
  82. package/build/components/global-styles/screen-background.js +1 -1
  83. package/build/components/global-styles/screen-background.js.map +1 -1
  84. package/build/components/global-styles/screen-block-list.js.map +1 -1
  85. package/build/components/global-styles/screen-block.js.map +1 -1
  86. package/build/components/global-styles/screen-color-palette.js.map +1 -1
  87. package/build/components/global-styles/screen-colors.js.map +1 -1
  88. package/build/components/global-styles/screen-css.js.map +1 -1
  89. package/build/components/global-styles/screen-layout.js.map +1 -1
  90. package/build/components/global-styles/screen-revisions/index.js +1 -1
  91. package/build/components/global-styles/screen-revisions/index.js.map +1 -1
  92. package/build/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
  93. package/build/components/global-styles/screen-revisions/use-global-styles-revisions.js.map +1 -1
  94. package/build/components/global-styles/screen-root.js.map +1 -1
  95. package/build/components/global-styles/screen-style-variations.js.map +1 -1
  96. package/build/components/global-styles/screen-typography-element.js.map +1 -1
  97. package/build/components/global-styles/screen-typography.js.map +1 -1
  98. package/build/components/global-styles/style-variations-container.js.map +1 -1
  99. package/build/components/global-styles/subtitle.js.map +1 -1
  100. package/build/components/global-styles/typography-elements.js.map +1 -1
  101. package/build/components/global-styles/typography-example.js.map +1 -1
  102. package/build/components/global-styles/typography-panel.js.map +1 -1
  103. package/build/components/global-styles/typography-preview.js.map +1 -1
  104. package/build/components/global-styles/ui.js +1 -1
  105. package/build/components/global-styles/ui.js.map +1 -1
  106. package/build/components/global-styles/utils.js.map +1 -1
  107. package/build/components/global-styles/variations/variation.js.map +1 -1
  108. package/build/components/global-styles/variations/variations-color.js.map +1 -1
  109. package/build/components/global-styles/variations/variations-panel.js.map +1 -1
  110. package/build/components/global-styles/variations/variations-typography.js.map +1 -1
  111. package/build/components/global-styles-renderer/index.js.map +1 -1
  112. package/build/components/header-edit-mode/document-tools/index.js.map +1 -1
  113. package/build/components/header-edit-mode/index.js +4 -4
  114. package/build/components/header-edit-mode/index.js.map +1 -1
  115. package/build/components/header-edit-mode/more-menu/copy-content-menu-item.js.map +1 -1
  116. package/build/components/header-edit-mode/more-menu/index.js +10 -12
  117. package/build/components/header-edit-mode/more-menu/index.js.map +1 -1
  118. package/build/components/header-edit-mode/more-menu/site-export.js.map +1 -1
  119. package/build/components/header-edit-mode/more-menu/welcome-guide-menu-item.js.map +1 -1
  120. package/build/components/header-edit-mode/tools-more-menu-group/index.js.map +1 -1
  121. package/build/components/keyboard-shortcuts/edit-mode.js +0 -23
  122. package/build/components/keyboard-shortcuts/edit-mode.js.map +1 -1
  123. package/build/components/keyboard-shortcuts/global.js.map +1 -1
  124. package/build/components/keyboard-shortcuts/register.js +0 -18
  125. package/build/components/keyboard-shortcuts/register.js.map +1 -1
  126. package/build/components/layout/animation.js +3 -2
  127. package/build/components/layout/animation.js.map +1 -1
  128. package/build/components/layout/hooks.js.map +1 -1
  129. package/build/components/layout/index.js +13 -48
  130. package/build/components/layout/index.js.map +1 -1
  131. package/build/components/layout/router.js +73 -7
  132. package/build/components/layout/router.js.map +1 -1
  133. package/build/components/media/index.js.map +1 -1
  134. package/build/components/page/header.js.map +1 -1
  135. package/build/components/page/index.js +5 -2
  136. package/build/components/page/index.js.map +1 -1
  137. package/build/components/page-pages/index.js +15 -17
  138. package/build/components/page-pages/index.js.map +1 -1
  139. package/build/components/page-patterns/dataviews-pattern-actions.js +5 -4
  140. package/build/components/page-patterns/dataviews-pattern-actions.js.map +1 -1
  141. package/build/components/page-patterns/delete-category-menu-item.js.map +1 -1
  142. package/build/components/page-patterns/header.js +2 -2
  143. package/build/components/page-patterns/header.js.map +1 -1
  144. package/build/components/page-patterns/index.js +124 -17
  145. package/build/components/page-patterns/index.js.map +1 -1
  146. package/build/components/page-patterns/rename-category-menu-item.js.map +1 -1
  147. package/build/components/page-patterns/search-items.js +2 -1
  148. package/build/components/page-patterns/search-items.js.map +1 -1
  149. package/build/components/page-patterns/use-pattern-settings.js.map +1 -1
  150. package/build/components/page-patterns/use-patterns.js +5 -10
  151. package/build/components/page-patterns/use-patterns.js.map +1 -1
  152. package/build/components/page-patterns/utils.js.map +1 -1
  153. package/build/components/page-templates-template-parts/add-new-template-part.js +2 -1
  154. package/build/components/page-templates-template-parts/add-new-template-part.js.map +1 -1
  155. package/build/components/page-templates-template-parts/hooks.js.map +1 -1
  156. package/build/components/page-templates-template-parts/index.js +13 -25
  157. package/build/components/page-templates-template-parts/index.js.map +1 -1
  158. package/build/components/pagination/index.js.map +1 -1
  159. package/build/components/pattern-modal/duplicate.js +6 -3
  160. package/build/components/pattern-modal/duplicate.js.map +1 -1
  161. package/build/components/pattern-modal/index.js.map +1 -1
  162. package/build/components/pattern-modal/rename.js +6 -3
  163. package/build/components/pattern-modal/rename.js.map +1 -1
  164. package/build/components/plugin-template-setting-panel/index.js.map +1 -1
  165. package/build/components/{template-actions/rename-menu-item.js → rename-post-menu-item/index.js} +18 -16
  166. package/build/components/rename-post-menu-item/index.js.map +1 -0
  167. package/build/components/resizable-frame/index.js +1 -5
  168. package/build/components/resizable-frame/index.js.map +1 -1
  169. package/build/components/revisions/index.js.map +1 -1
  170. package/build/components/routes/link.js.map +1 -1
  171. package/build/components/routes/use-title.js.map +1 -1
  172. package/build/components/save-button/index.js.map +1 -1
  173. package/build/components/save-hub/index.js.map +1 -1
  174. package/build/components/save-panel/index.js +3 -3
  175. package/build/components/save-panel/index.js.map +1 -1
  176. package/build/components/sidebar/index.js +41 -75
  177. package/build/components/sidebar/index.js.map +1 -1
  178. package/build/components/sidebar-button/index.js.map +1 -1
  179. package/build/components/sidebar-dataviews/add-new-view.js.map +1 -1
  180. package/build/components/sidebar-dataviews/custom-dataviews-list.js.map +1 -1
  181. package/build/components/sidebar-dataviews/dataview-item.js.map +1 -1
  182. package/build/components/sidebar-dataviews/default-views.js +1 -1
  183. package/build/components/sidebar-dataviews/default-views.js.map +1 -1
  184. package/build/components/sidebar-dataviews/index.js +1 -1
  185. package/build/components/sidebar-dataviews/index.js.map +1 -1
  186. package/build/components/sidebar-edit-mode/default-sidebar.js +18 -7
  187. package/build/components/sidebar-edit-mode/default-sidebar.js.map +1 -1
  188. package/build/components/sidebar-edit-mode/global-styles-sidebar.js +5 -3
  189. package/build/components/sidebar-edit-mode/global-styles-sidebar.js.map +1 -1
  190. package/build/components/sidebar-edit-mode/index.js +29 -54
  191. package/build/components/sidebar-edit-mode/index.js.map +1 -1
  192. package/build/components/sidebar-edit-mode/page-panels/index.js +23 -2
  193. package/build/components/sidebar-edit-mode/page-panels/index.js.map +1 -1
  194. package/build/components/sidebar-edit-mode/page-panels/page-content.js.map +1 -1
  195. package/build/components/sidebar-edit-mode/page-panels/page-status.js.map +1 -1
  196. package/build/components/sidebar-edit-mode/page-panels/page-summary.js +2 -2
  197. package/build/components/sidebar-edit-mode/page-panels/page-summary.js.map +1 -1
  198. package/build/components/sidebar-edit-mode/settings-header/index.js +4 -5
  199. package/build/components/sidebar-edit-mode/settings-header/index.js.map +1 -1
  200. package/build/components/sidebar-edit-mode/template-panel/hooks.js.map +1 -1
  201. package/build/components/sidebar-edit-mode/template-panel/index.js +1 -1
  202. package/build/components/sidebar-edit-mode/template-panel/index.js.map +1 -1
  203. package/build/components/sidebar-navigation-item/index.js +31 -0
  204. package/build/components/sidebar-navigation-item/index.js.map +1 -1
  205. package/build/components/sidebar-navigation-screen/index.js +36 -9
  206. package/build/components/sidebar-navigation-screen/index.js.map +1 -1
  207. package/build/components/sidebar-navigation-screen-details-footer/index.js.map +1 -1
  208. package/build/components/sidebar-navigation-screen-details-panel/index.js.map +1 -1
  209. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js.map +1 -1
  210. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js.map +1 -1
  211. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js.map +1 -1
  212. package/build/components/sidebar-navigation-screen-global-styles/index.js +1 -2
  213. package/build/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
  214. package/build/components/sidebar-navigation-screen-main/index.js +6 -15
  215. package/build/components/sidebar-navigation-screen-main/index.js.map +1 -1
  216. package/build/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js +1 -1
  217. package/build/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js.map +1 -1
  218. package/build/components/sidebar-navigation-screen-navigation-menu/index.js +7 -2
  219. package/build/components/sidebar-navigation-screen-navigation-menu/index.js.map +1 -1
  220. package/build/components/sidebar-navigation-screen-navigation-menu/more-menu.js.map +1 -1
  221. package/build/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js.map +1 -1
  222. package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +1 -1
  223. package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +1 -1
  224. package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js.map +1 -1
  225. package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +20 -15
  226. package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js.map +1 -1
  227. package/build/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js.map +1 -1
  228. package/build/components/sidebar-navigation-screen-navigation-menus/constants.js.map +1 -1
  229. package/build/components/sidebar-navigation-screen-navigation-menus/index.js +1 -1
  230. package/build/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
  231. package/build/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +6 -5
  232. package/build/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js.map +1 -1
  233. package/build/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +1 -1
  234. package/build/components/sidebar-navigation-screen-page/index.js +22 -12
  235. package/build/components/sidebar-navigation-screen-page/index.js.map +1 -1
  236. package/build/components/sidebar-navigation-screen-page/page-details.js.map +1 -1
  237. package/build/components/sidebar-navigation-screen-page/status-label.js.map +1 -1
  238. package/build/components/sidebar-navigation-screen-pattern/index.js +14 -5
  239. package/build/components/sidebar-navigation-screen-pattern/index.js.map +1 -1
  240. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js.map +1 -1
  241. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js.map +1 -1
  242. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js.map +1 -1
  243. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js.map +1 -1
  244. package/build/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js.map +1 -1
  245. package/build/components/sidebar-navigation-screen-pattern/use-navigation-menu-title.js.map +1 -1
  246. package/build/components/sidebar-navigation-screen-pattern/use-pattern-details.js.map +1 -1
  247. package/build/components/sidebar-navigation-screen-patterns/category-item.js.map +1 -1
  248. package/build/components/sidebar-navigation-screen-patterns/index.js +33 -27
  249. package/build/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
  250. package/build/components/sidebar-navigation-screen-patterns/use-default-pattern-categories.js.map +1 -1
  251. package/build/components/sidebar-navigation-screen-patterns/use-pattern-categories.js.map +1 -1
  252. package/build/components/sidebar-navigation-screen-patterns/use-template-part-areas.js.map +1 -1
  253. package/build/components/sidebar-navigation-screen-patterns/use-theme-patterns.js.map +1 -1
  254. package/build/components/sidebar-navigation-screen-template/home-template-details.js.map +1 -1
  255. package/build/components/sidebar-navigation-screen-template/index.js +10 -7
  256. package/build/components/sidebar-navigation-screen-template/index.js.map +1 -1
  257. package/build/components/sidebar-navigation-screen-template/template-areas.js.map +1 -1
  258. package/build/components/sidebar-navigation-screen-templates-browse/content.js.map +1 -1
  259. package/build/components/sidebar-navigation-screen-templates-browse/index.js +6 -8
  260. package/build/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -1
  261. package/build/components/site-hub/index.js +22 -21
  262. package/build/components/site-hub/index.js.map +1 -1
  263. package/build/components/site-icon/index.js.map +1 -1
  264. package/build/components/start-template-options/index.js.map +1 -1
  265. package/build/components/style-book/index.js.map +1 -1
  266. package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js +14 -5
  267. package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
  268. package/build/components/sync-state-with-url/use-sync-canvas-mode-with-url.js.map +1 -1
  269. package/build/components/table/index.js.map +1 -1
  270. package/build/components/template-actions/index.js +7 -8
  271. package/build/components/template-actions/index.js.map +1 -1
  272. package/build/components/template-part-converter/convert-to-regular.js.map +1 -1
  273. package/build/components/template-part-converter/convert-to-template-part.js.map +1 -1
  274. package/build/components/template-part-converter/index.js.map +1 -1
  275. package/build/components/use-edited-entity-record/index.js.map +1 -1
  276. package/build/components/welcome-guide/editor.js.map +1 -1
  277. package/build/components/welcome-guide/image.js.map +1 -1
  278. package/build/components/welcome-guide/index.js.map +1 -1
  279. package/build/components/welcome-guide/page.js.map +1 -1
  280. package/build/components/welcome-guide/styles.js +6 -3
  281. package/build/components/welcome-guide/styles.js.map +1 -1
  282. package/build/components/welcome-guide/template.js.map +1 -1
  283. package/build/hooks/commands/use-common-commands.js.map +1 -1
  284. package/build/hooks/commands/use-edit-mode-commands.js +10 -28
  285. package/build/hooks/commands/use-edit-mode-commands.js.map +1 -1
  286. package/build/hooks/components.js.map +1 -1
  287. package/build/hooks/index.js.map +1 -1
  288. package/build/hooks/push-changes-to-global-styles/index.js +3 -40
  289. package/build/hooks/push-changes-to-global-styles/index.js.map +1 -1
  290. package/build/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +1 -1
  291. package/build/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map +1 -1
  292. package/build/index.js +3 -8
  293. package/build/index.js.map +1 -1
  294. package/build/lock-unlock.js.map +1 -1
  295. package/build/store/actions.js +21 -96
  296. package/build/store/actions.js.map +1 -1
  297. package/build/store/constants.js.map +1 -1
  298. package/build/store/index.js +1 -1
  299. package/build/store/index.js.map +1 -1
  300. package/build/store/private-actions.js +1 -85
  301. package/build/store/private-actions.js.map +1 -1
  302. package/build/store/private-selectors.js.map +1 -1
  303. package/build/store/reducer.js.map +1 -1
  304. package/build/store/selectors.js.map +1 -1
  305. package/build/utils/clone-deep.js.map +1 -1
  306. package/build/utils/constants.js +2 -1
  307. package/build/utils/constants.js.map +1 -1
  308. package/build/utils/get-is-list-page.js.map +1 -1
  309. package/build/utils/is-previewing-theme.js.map +1 -1
  310. package/build/utils/is-template-removable.js.map +1 -1
  311. package/build/utils/is-template-revertable.js.map +1 -1
  312. package/build/utils/math.js.map +1 -1
  313. package/build/utils/set-nested-value.js +44 -0
  314. package/build/utils/set-nested-value.js.map +1 -0
  315. package/build/utils/template-part-create.js.map +1 -1
  316. package/build/utils/use-activate-theme.js.map +1 -1
  317. package/build/utils/use-actual-current-theme.js.map +1 -1
  318. package/build-module/components/add-new-page/index.js.map +1 -1
  319. package/build-module/components/add-new-pattern/index.js.map +1 -1
  320. package/build-module/components/add-new-template/add-custom-generic-template-modal-content.js.map +1 -1
  321. package/build-module/components/add-new-template/add-custom-template-modal-content.js.map +1 -1
  322. package/build-module/components/add-new-template/index.js +283 -14
  323. package/build-module/components/add-new-template/index.js.map +1 -1
  324. package/build-module/components/add-new-template/utils.js +21 -11
  325. package/build-module/components/add-new-template/utils.js.map +1 -1
  326. package/build-module/components/app/index.js.map +1 -1
  327. package/build-module/components/async/index.js +44 -0
  328. package/build-module/components/async/index.js.map +1 -0
  329. package/build-module/components/block-editor/block-inspector-button.js +9 -8
  330. package/build-module/components/block-editor/block-inspector-button.js.map +1 -1
  331. package/build-module/components/block-editor/editor-canvas.js +16 -7
  332. package/build-module/components/block-editor/editor-canvas.js.map +1 -1
  333. package/build-module/components/block-editor/inserter-media-categories.js.map +1 -1
  334. package/build-module/components/block-editor/resizable-editor.js.map +1 -1
  335. package/build-module/components/block-editor/resize-handle.js.map +1 -1
  336. package/build-module/components/block-editor/site-editor-canvas.js +5 -1
  337. package/build-module/components/block-editor/site-editor-canvas.js.map +1 -1
  338. package/build-module/components/block-editor/use-navigate-to-entity-record.js.map +1 -1
  339. package/build-module/components/block-editor/use-site-editor-settings.js.map +1 -1
  340. package/build-module/components/canvas-loader/index.js.map +1 -1
  341. package/build-module/components/code-editor/index.js.map +1 -1
  342. package/build-module/components/create-template-part-modal/index.js.map +1 -1
  343. package/build-module/components/editor/index.js +35 -8
  344. package/build-module/components/editor/index.js.map +1 -1
  345. package/build-module/components/editor-canvas-container/index.js.map +1 -1
  346. package/build-module/components/error-boundary/index.js.map +1 -1
  347. package/build-module/components/error-boundary/warning.js.map +1 -1
  348. package/build-module/components/global-styles/background-panel.js +14 -1
  349. package/build-module/components/global-styles/background-panel.js.map +1 -1
  350. package/build-module/components/global-styles/block-preview-panel.js +6 -1
  351. package/build-module/components/global-styles/block-preview-panel.js.map +1 -1
  352. package/build-module/components/global-styles/color-indicator-wrapper.js.map +1 -1
  353. package/build-module/components/global-styles/color-palette-panel.js.map +1 -1
  354. package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
  355. package/build-module/components/global-styles/font-families.js.map +1 -1
  356. package/build-module/components/global-styles/font-family-item.js.map +1 -1
  357. package/build-module/components/global-styles/font-library-modal/collection-font-variant.js.map +1 -1
  358. package/build-module/components/global-styles/font-library-modal/context.js +59 -32
  359. package/build-module/components/global-styles/font-library-modal/context.js.map +1 -1
  360. package/build-module/components/global-styles/font-library-modal/font-card.js.map +1 -1
  361. package/build-module/components/global-styles/font-library-modal/font-collection.js +12 -5
  362. package/build-module/components/global-styles/font-library-modal/font-collection.js.map +1 -1
  363. package/build-module/components/global-styles/font-library-modal/font-demo.js.map +1 -1
  364. package/build-module/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js.map +1 -1
  365. package/build-module/components/global-styles/font-library-modal/index.js +2 -2
  366. package/build-module/components/global-styles/font-library-modal/index.js.map +1 -1
  367. package/build-module/components/global-styles/font-library-modal/installed-fonts.js +11 -10
  368. package/build-module/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
  369. package/build-module/components/global-styles/font-library-modal/library-font-details.js.map +1 -1
  370. package/build-module/components/global-styles/font-library-modal/library-font-variant.js.map +1 -1
  371. package/build-module/components/global-styles/font-library-modal/resolvers.js.map +1 -1
  372. package/build-module/components/global-styles/font-library-modal/upload-fonts.js.map +1 -1
  373. package/build-module/components/global-styles/font-library-modal/utils/constants.js.map +1 -1
  374. package/build-module/components/global-styles/font-library-modal/utils/filter-fonts.js.map +1 -1
  375. package/build-module/components/global-styles/font-library-modal/utils/fonts-outline.js.map +1 -1
  376. package/build-module/components/global-styles/font-library-modal/utils/index.js.map +1 -1
  377. package/build-module/components/global-styles/font-library-modal/utils/make-families-from-faces.js.map +1 -1
  378. package/build-module/components/global-styles/font-library-modal/utils/preview-styles.js.map +1 -1
  379. package/build-module/components/global-styles/font-library-modal/utils/sort-font-faces.js.map +1 -1
  380. package/build-module/components/global-styles/font-library-modal/utils/toggleFont.js.map +1 -1
  381. package/build-module/components/global-styles/global-styles-provider.js.map +1 -1
  382. package/build-module/components/global-styles/gradients-palette-panel.js.map +1 -1
  383. package/build-module/components/global-styles/header.js.map +1 -1
  384. package/build-module/components/global-styles/highlighted-colors.js +1 -1
  385. package/build-module/components/global-styles/highlighted-colors.js.map +1 -1
  386. package/build-module/components/global-styles/hooks.js +11 -3
  387. package/build-module/components/global-styles/hooks.js.map +1 -1
  388. package/build-module/components/global-styles/icon-with-current-color.js.map +1 -1
  389. package/build-module/components/global-styles/index.js.map +1 -1
  390. package/build-module/components/global-styles/navigation-button.js.map +1 -1
  391. package/build-module/components/global-styles/palette.js.map +1 -1
  392. package/build-module/components/global-styles/preview-colors.js.map +1 -1
  393. package/build-module/components/global-styles/preview-iframe.js.map +1 -1
  394. package/build-module/components/global-styles/preview-styles.js.map +1 -1
  395. package/build-module/components/global-styles/root-menu.js +2 -2
  396. package/build-module/components/global-styles/root-menu.js.map +1 -1
  397. package/build-module/components/global-styles/screen-background.js +1 -1
  398. package/build-module/components/global-styles/screen-background.js.map +1 -1
  399. package/build-module/components/global-styles/screen-block-list.js.map +1 -1
  400. package/build-module/components/global-styles/screen-block.js.map +1 -1
  401. package/build-module/components/global-styles/screen-color-palette.js.map +1 -1
  402. package/build-module/components/global-styles/screen-colors.js.map +1 -1
  403. package/build-module/components/global-styles/screen-css.js.map +1 -1
  404. package/build-module/components/global-styles/screen-layout.js.map +1 -1
  405. package/build-module/components/global-styles/screen-revisions/index.js +1 -1
  406. package/build-module/components/global-styles/screen-revisions/index.js.map +1 -1
  407. package/build-module/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
  408. package/build-module/components/global-styles/screen-revisions/use-global-styles-revisions.js.map +1 -1
  409. package/build-module/components/global-styles/screen-root.js.map +1 -1
  410. package/build-module/components/global-styles/screen-style-variations.js.map +1 -1
  411. package/build-module/components/global-styles/screen-typography-element.js.map +1 -1
  412. package/build-module/components/global-styles/screen-typography.js.map +1 -1
  413. package/build-module/components/global-styles/style-variations-container.js.map +1 -1
  414. package/build-module/components/global-styles/subtitle.js.map +1 -1
  415. package/build-module/components/global-styles/typography-elements.js.map +1 -1
  416. package/build-module/components/global-styles/typography-example.js.map +1 -1
  417. package/build-module/components/global-styles/typography-panel.js.map +1 -1
  418. package/build-module/components/global-styles/typography-preview.js.map +1 -1
  419. package/build-module/components/global-styles/ui.js.map +1 -1
  420. package/build-module/components/global-styles/utils.js.map +1 -1
  421. package/build-module/components/global-styles/variations/variation.js.map +1 -1
  422. package/build-module/components/global-styles/variations/variations-color.js.map +1 -1
  423. package/build-module/components/global-styles/variations/variations-panel.js.map +1 -1
  424. package/build-module/components/global-styles/variations/variations-typography.js.map +1 -1
  425. package/build-module/components/global-styles-renderer/index.js.map +1 -1
  426. package/build-module/components/header-edit-mode/document-tools/index.js.map +1 -1
  427. package/build-module/components/header-edit-mode/index.js +3 -3
  428. package/build-module/components/header-edit-mode/index.js.map +1 -1
  429. package/build-module/components/header-edit-mode/more-menu/copy-content-menu-item.js.map +1 -1
  430. package/build-module/components/header-edit-mode/more-menu/index.js +8 -8
  431. package/build-module/components/header-edit-mode/more-menu/index.js.map +1 -1
  432. package/build-module/components/header-edit-mode/more-menu/site-export.js.map +1 -1
  433. package/build-module/components/header-edit-mode/more-menu/welcome-guide-menu-item.js.map +1 -1
  434. package/build-module/components/header-edit-mode/tools-more-menu-group/index.js.map +1 -1
  435. package/build-module/components/keyboard-shortcuts/edit-mode.js +0 -23
  436. package/build-module/components/keyboard-shortcuts/edit-mode.js.map +1 -1
  437. package/build-module/components/keyboard-shortcuts/global.js.map +1 -1
  438. package/build-module/components/keyboard-shortcuts/register.js +0 -18
  439. package/build-module/components/keyboard-shortcuts/register.js.map +1 -1
  440. package/build-module/components/layout/animation.js +4 -3
  441. package/build-module/components/layout/animation.js.map +1 -1
  442. package/build-module/components/layout/hooks.js.map +1 -1
  443. package/build-module/components/layout/index.js +13 -48
  444. package/build-module/components/layout/index.js.map +1 -1
  445. package/build-module/components/layout/router.js +73 -7
  446. package/build-module/components/layout/router.js.map +1 -1
  447. package/build-module/components/media/index.js.map +1 -1
  448. package/build-module/components/page/header.js.map +1 -1
  449. package/build-module/components/page/index.js +5 -2
  450. package/build-module/components/page/index.js.map +1 -1
  451. package/build-module/components/page-pages/index.js +14 -16
  452. package/build-module/components/page-pages/index.js.map +1 -1
  453. package/build-module/components/page-patterns/dataviews-pattern-actions.js +5 -4
  454. package/build-module/components/page-patterns/dataviews-pattern-actions.js.map +1 -1
  455. package/build-module/components/page-patterns/delete-category-menu-item.js.map +1 -1
  456. package/build-module/components/page-patterns/header.js +2 -2
  457. package/build-module/components/page-patterns/header.js.map +1 -1
  458. package/build-module/components/page-patterns/index.js +126 -19
  459. package/build-module/components/page-patterns/index.js.map +1 -1
  460. package/build-module/components/page-patterns/rename-category-menu-item.js.map +1 -1
  461. package/build-module/components/page-patterns/search-items.js +3 -2
  462. package/build-module/components/page-patterns/search-items.js.map +1 -1
  463. package/build-module/components/page-patterns/use-pattern-settings.js.map +1 -1
  464. package/build-module/components/page-patterns/use-patterns.js +2 -6
  465. package/build-module/components/page-patterns/use-patterns.js.map +1 -1
  466. package/build-module/components/page-patterns/utils.js.map +1 -1
  467. package/build-module/components/page-templates-template-parts/add-new-template-part.js +3 -2
  468. package/build-module/components/page-templates-template-parts/add-new-template-part.js.map +1 -1
  469. package/build-module/components/page-templates-template-parts/hooks.js.map +1 -1
  470. package/build-module/components/page-templates-template-parts/index.js +13 -25
  471. package/build-module/components/page-templates-template-parts/index.js.map +1 -1
  472. package/build-module/components/pagination/index.js.map +1 -1
  473. package/build-module/components/pattern-modal/duplicate.js +4 -1
  474. package/build-module/components/pattern-modal/duplicate.js.map +1 -1
  475. package/build-module/components/pattern-modal/index.js.map +1 -1
  476. package/build-module/components/pattern-modal/rename.js +4 -1
  477. package/build-module/components/pattern-modal/rename.js.map +1 -1
  478. package/build-module/components/plugin-template-setting-panel/index.js.map +1 -1
  479. package/build-module/components/{template-actions/rename-menu-item.js → rename-post-menu-item/index.js} +17 -15
  480. package/build-module/components/rename-post-menu-item/index.js.map +1 -0
  481. package/build-module/components/resizable-frame/index.js +1 -5
  482. package/build-module/components/resizable-frame/index.js.map +1 -1
  483. package/build-module/components/revisions/index.js.map +1 -1
  484. package/build-module/components/routes/link.js.map +1 -1
  485. package/build-module/components/routes/use-title.js.map +1 -1
  486. package/build-module/components/save-button/index.js.map +1 -1
  487. package/build-module/components/save-hub/index.js.map +1 -1
  488. package/build-module/components/save-panel/index.js +2 -2
  489. package/build-module/components/save-panel/index.js.map +1 -1
  490. package/build-module/components/sidebar/index.js +42 -75
  491. package/build-module/components/sidebar/index.js.map +1 -1
  492. package/build-module/components/sidebar-button/index.js.map +1 -1
  493. package/build-module/components/sidebar-dataviews/add-new-view.js.map +1 -1
  494. package/build-module/components/sidebar-dataviews/custom-dataviews-list.js.map +1 -1
  495. package/build-module/components/sidebar-dataviews/dataview-item.js.map +1 -1
  496. package/build-module/components/sidebar-dataviews/default-views.js +1 -1
  497. package/build-module/components/sidebar-dataviews/default-views.js.map +1 -1
  498. package/build-module/components/sidebar-dataviews/index.js +1 -1
  499. package/build-module/components/sidebar-dataviews/index.js.map +1 -1
  500. package/build-module/components/sidebar-edit-mode/default-sidebar.js +16 -5
  501. package/build-module/components/sidebar-edit-mode/default-sidebar.js.map +1 -1
  502. package/build-module/components/sidebar-edit-mode/global-styles-sidebar.js +5 -3
  503. package/build-module/components/sidebar-edit-mode/global-styles-sidebar.js.map +1 -1
  504. package/build-module/components/sidebar-edit-mode/index.js +28 -53
  505. package/build-module/components/sidebar-edit-mode/index.js.map +1 -1
  506. package/build-module/components/sidebar-edit-mode/page-panels/index.js +23 -2
  507. package/build-module/components/sidebar-edit-mode/page-panels/index.js.map +1 -1
  508. package/build-module/components/sidebar-edit-mode/page-panels/page-content.js.map +1 -1
  509. package/build-module/components/sidebar-edit-mode/page-panels/page-status.js.map +1 -1
  510. package/build-module/components/sidebar-edit-mode/page-panels/page-summary.js +4 -4
  511. package/build-module/components/sidebar-edit-mode/page-panels/page-summary.js.map +1 -1
  512. package/build-module/components/sidebar-edit-mode/settings-header/index.js +4 -5
  513. package/build-module/components/sidebar-edit-mode/settings-header/index.js.map +1 -1
  514. package/build-module/components/sidebar-edit-mode/template-panel/hooks.js.map +1 -1
  515. package/build-module/components/sidebar-edit-mode/template-panel/index.js +1 -1
  516. package/build-module/components/sidebar-edit-mode/template-panel/index.js.map +1 -1
  517. package/build-module/components/sidebar-navigation-item/index.js +31 -0
  518. package/build-module/components/sidebar-navigation-item/index.js.map +1 -1
  519. package/build-module/components/sidebar-navigation-screen/index.js +37 -10
  520. package/build-module/components/sidebar-navigation-screen/index.js.map +1 -1
  521. package/build-module/components/sidebar-navigation-screen-details-footer/index.js.map +1 -1
  522. package/build-module/components/sidebar-navigation-screen-details-panel/index.js.map +1 -1
  523. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js.map +1 -1
  524. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js.map +1 -1
  525. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js.map +1 -1
  526. package/build-module/components/sidebar-navigation-screen-global-styles/index.js +2 -3
  527. package/build-module/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
  528. package/build-module/components/sidebar-navigation-screen-main/index.js +7 -16
  529. package/build-module/components/sidebar-navigation-screen-main/index.js.map +1 -1
  530. package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js +1 -1
  531. package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js.map +1 -1
  532. package/build-module/components/sidebar-navigation-screen-navigation-menu/index.js +8 -3
  533. package/build-module/components/sidebar-navigation-screen-navigation-menu/index.js.map +1 -1
  534. package/build-module/components/sidebar-navigation-screen-navigation-menu/more-menu.js.map +1 -1
  535. package/build-module/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js.map +1 -1
  536. package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +1 -1
  537. package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +1 -1
  538. package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js.map +1 -1
  539. package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +20 -15
  540. package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js.map +1 -1
  541. package/build-module/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js.map +1 -1
  542. package/build-module/components/sidebar-navigation-screen-navigation-menus/constants.js.map +1 -1
  543. package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js +1 -1
  544. package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
  545. package/build-module/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +6 -5
  546. package/build-module/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js.map +1 -1
  547. package/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +1 -1
  548. package/build-module/components/sidebar-navigation-screen-page/index.js +24 -14
  549. package/build-module/components/sidebar-navigation-screen-page/index.js.map +1 -1
  550. package/build-module/components/sidebar-navigation-screen-page/page-details.js.map +1 -1
  551. package/build-module/components/sidebar-navigation-screen-page/status-label.js.map +1 -1
  552. package/build-module/components/sidebar-navigation-screen-pattern/index.js +14 -5
  553. package/build-module/components/sidebar-navigation-screen-pattern/index.js.map +1 -1
  554. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js.map +1 -1
  555. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js.map +1 -1
  556. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js.map +1 -1
  557. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js.map +1 -1
  558. package/build-module/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js.map +1 -1
  559. package/build-module/components/sidebar-navigation-screen-pattern/use-navigation-menu-title.js.map +1 -1
  560. package/build-module/components/sidebar-navigation-screen-pattern/use-pattern-details.js.map +1 -1
  561. package/build-module/components/sidebar-navigation-screen-patterns/category-item.js.map +1 -1
  562. package/build-module/components/sidebar-navigation-screen-patterns/index.js +34 -28
  563. package/build-module/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
  564. package/build-module/components/sidebar-navigation-screen-patterns/use-default-pattern-categories.js.map +1 -1
  565. package/build-module/components/sidebar-navigation-screen-patterns/use-pattern-categories.js.map +1 -1
  566. package/build-module/components/sidebar-navigation-screen-patterns/use-template-part-areas.js.map +1 -1
  567. package/build-module/components/sidebar-navigation-screen-patterns/use-theme-patterns.js.map +1 -1
  568. package/build-module/components/sidebar-navigation-screen-template/home-template-details.js.map +1 -1
  569. package/build-module/components/sidebar-navigation-screen-template/index.js +12 -8
  570. package/build-module/components/sidebar-navigation-screen-template/index.js.map +1 -1
  571. package/build-module/components/sidebar-navigation-screen-template/template-areas.js.map +1 -1
  572. package/build-module/components/sidebar-navigation-screen-templates-browse/content.js.map +1 -1
  573. package/build-module/components/sidebar-navigation-screen-templates-browse/index.js +6 -8
  574. package/build-module/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -1
  575. package/build-module/components/site-hub/index.js +22 -21
  576. package/build-module/components/site-hub/index.js.map +1 -1
  577. package/build-module/components/site-icon/index.js.map +1 -1
  578. package/build-module/components/start-template-options/index.js.map +1 -1
  579. package/build-module/components/style-book/index.js.map +1 -1
  580. package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js +14 -5
  581. package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
  582. package/build-module/components/sync-state-with-url/use-sync-canvas-mode-with-url.js.map +1 -1
  583. package/build-module/components/table/index.js.map +1 -1
  584. package/build-module/components/template-actions/index.js +7 -8
  585. package/build-module/components/template-actions/index.js.map +1 -1
  586. package/build-module/components/template-part-converter/convert-to-regular.js.map +1 -1
  587. package/build-module/components/template-part-converter/convert-to-template-part.js.map +1 -1
  588. package/build-module/components/template-part-converter/index.js.map +1 -1
  589. package/build-module/components/use-edited-entity-record/index.js.map +1 -1
  590. package/build-module/components/welcome-guide/editor.js.map +1 -1
  591. package/build-module/components/welcome-guide/image.js.map +1 -1
  592. package/build-module/components/welcome-guide/index.js.map +1 -1
  593. package/build-module/components/welcome-guide/page.js.map +1 -1
  594. package/build-module/components/welcome-guide/styles.js +6 -3
  595. package/build-module/components/welcome-guide/styles.js.map +1 -1
  596. package/build-module/components/welcome-guide/template.js.map +1 -1
  597. package/build-module/hooks/commands/use-common-commands.js.map +1 -1
  598. package/build-module/hooks/commands/use-edit-mode-commands.js +11 -29
  599. package/build-module/hooks/commands/use-edit-mode-commands.js.map +1 -1
  600. package/build-module/hooks/components.js.map +1 -1
  601. package/build-module/hooks/index.js.map +1 -1
  602. package/build-module/hooks/push-changes-to-global-styles/index.js +1 -38
  603. package/build-module/hooks/push-changes-to-global-styles/index.js.map +1 -1
  604. package/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +1 -1
  605. package/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map +1 -1
  606. package/build-module/index.js +4 -6
  607. package/build-module/index.js.map +1 -1
  608. package/build-module/lock-unlock.js.map +1 -1
  609. package/build-module/store/actions.js +16 -92
  610. package/build-module/store/actions.js.map +1 -1
  611. package/build-module/store/constants.js.map +1 -1
  612. package/build-module/store/index.js.map +1 -1
  613. package/build-module/store/private-actions.js +0 -83
  614. package/build-module/store/private-actions.js.map +1 -1
  615. package/build-module/store/private-selectors.js.map +1 -1
  616. package/build-module/store/reducer.js.map +1 -1
  617. package/build-module/store/selectors.js.map +1 -1
  618. package/build-module/utils/clone-deep.js.map +1 -1
  619. package/build-module/utils/constants.js +1 -0
  620. package/build-module/utils/constants.js.map +1 -1
  621. package/build-module/utils/get-is-list-page.js.map +1 -1
  622. package/build-module/utils/is-previewing-theme.js.map +1 -1
  623. package/build-module/utils/is-template-removable.js.map +1 -1
  624. package/build-module/utils/is-template-revertable.js.map +1 -1
  625. package/build-module/utils/math.js.map +1 -1
  626. package/build-module/utils/set-nested-value.js +38 -0
  627. package/build-module/utils/set-nested-value.js.map +1 -0
  628. package/build-module/utils/template-part-create.js.map +1 -1
  629. package/build-module/utils/use-activate-theme.js.map +1 -1
  630. package/build-module/utils/use-actual-current-theme.js.map +1 -1
  631. package/build-style/style-rtl.css +172 -585
  632. package/build-style/style.css +172 -585
  633. package/package.json +43 -44
  634. package/src/components/add-new-template/index.js +412 -12
  635. package/src/components/add-new-template/style.scss +0 -22
  636. package/src/components/add-new-template/utils.js +44 -24
  637. package/src/components/async/index.js +43 -0
  638. package/src/components/block-editor/block-inspector-button.js +9 -11
  639. package/src/components/block-editor/editor-canvas.js +45 -21
  640. package/src/components/block-editor/site-editor-canvas.js +6 -1
  641. package/src/components/editor/index.js +50 -13
  642. package/src/components/global-styles/background-panel.js +16 -0
  643. package/src/components/global-styles/block-preview-panel.js +6 -1
  644. package/src/components/global-styles/font-library-modal/context.js +76 -51
  645. package/src/components/global-styles/font-library-modal/font-collection.js +247 -223
  646. package/src/components/global-styles/font-library-modal/index.js +2 -2
  647. package/src/components/global-styles/font-library-modal/installed-fonts.js +156 -147
  648. package/src/components/global-styles/font-library-modal/style.scss +31 -13
  649. package/src/components/global-styles/highlighted-colors.js +1 -1
  650. package/src/components/global-styles/hooks.js +20 -3
  651. package/src/components/global-styles/root-menu.js +2 -2
  652. package/src/components/global-styles/screen-background.js +1 -1
  653. package/src/components/global-styles/screen-revisions/index.js +1 -1
  654. package/src/components/header-edit-mode/index.js +3 -5
  655. package/src/components/header-edit-mode/more-menu/index.js +6 -17
  656. package/src/components/header-edit-mode/style.scss +1 -1
  657. package/src/components/keyboard-shortcuts/edit-mode.js +0 -29
  658. package/src/components/keyboard-shortcuts/register.js +0 -20
  659. package/src/components/layout/animation.js +6 -3
  660. package/src/components/layout/index.js +12 -50
  661. package/src/components/layout/router.js +75 -12
  662. package/src/components/layout/style.scss +15 -37
  663. package/src/components/page/index.js +7 -2
  664. package/src/components/page-pages/index.js +33 -23
  665. package/src/components/page-pages/style.scss +29 -22
  666. package/src/components/page-patterns/dataviews-pattern-actions.js +5 -6
  667. package/src/components/page-patterns/header.js +4 -2
  668. package/src/components/page-patterns/index.js +168 -56
  669. package/src/components/page-patterns/search-items.js +3 -0
  670. package/src/components/page-patterns/style.scss +7 -6
  671. package/src/components/page-patterns/use-patterns.js +2 -6
  672. package/src/components/page-templates-template-parts/add-new-template-part.js +4 -2
  673. package/src/components/page-templates-template-parts/index.js +24 -39
  674. package/src/components/pattern-modal/duplicate.js +2 -1
  675. package/src/components/pattern-modal/rename.js +2 -1
  676. package/src/components/{template-actions/rename-menu-item.js → rename-post-menu-item/index.js} +20 -24
  677. package/src/components/resizable-frame/index.js +2 -6
  678. package/src/components/save-panel/index.js +2 -2
  679. package/src/components/sidebar/index.js +52 -100
  680. package/src/components/sidebar/style.scss +41 -6
  681. package/src/components/sidebar-dataviews/default-views.js +1 -1
  682. package/src/components/sidebar-dataviews/index.js +1 -1
  683. package/src/components/sidebar-edit-mode/default-sidebar.js +13 -6
  684. package/src/components/sidebar-edit-mode/global-styles-sidebar.js +7 -3
  685. package/src/components/sidebar-edit-mode/index.js +39 -75
  686. package/src/components/sidebar-edit-mode/page-panels/index.js +25 -2
  687. package/src/components/sidebar-edit-mode/page-panels/page-summary.js +20 -12
  688. package/src/components/sidebar-edit-mode/page-panels/style.scss +0 -6
  689. package/src/components/sidebar-edit-mode/settings-header/index.js +4 -5
  690. package/src/components/sidebar-edit-mode/style.scss +1 -1
  691. package/src/components/sidebar-edit-mode/template-panel/index.js +1 -1
  692. package/src/components/sidebar-navigation-item/index.js +29 -0
  693. package/src/components/sidebar-navigation-screen/index.js +29 -12
  694. package/src/components/sidebar-navigation-screen/style.scss +1 -21
  695. package/src/components/sidebar-navigation-screen-global-styles/index.js +2 -11
  696. package/src/components/sidebar-navigation-screen-main/index.js +11 -23
  697. package/src/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js +1 -1
  698. package/src/components/sidebar-navigation-screen-navigation-menu/index.js +7 -6
  699. package/src/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +1 -1
  700. package/src/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +14 -14
  701. package/src/components/sidebar-navigation-screen-navigation-menus/index.js +1 -1
  702. package/src/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +4 -5
  703. package/src/components/sidebar-navigation-screen-page/index.js +23 -13
  704. package/src/components/sidebar-navigation-screen-page/style.scss +8 -2
  705. package/src/components/sidebar-navigation-screen-pattern/index.js +9 -6
  706. package/src/components/sidebar-navigation-screen-patterns/index.js +70 -60
  707. package/src/components/sidebar-navigation-screen-patterns/style.scss +5 -0
  708. package/src/components/sidebar-navigation-screen-template/index.js +8 -12
  709. package/src/components/sidebar-navigation-screen-templates-browse/index.js +2 -7
  710. package/src/components/site-hub/index.js +80 -90
  711. package/src/components/site-hub/style.scss +14 -34
  712. package/src/components/sync-state-with-url/use-init-edited-entity-from-url.js +50 -35
  713. package/src/components/template-actions/index.js +8 -11
  714. package/src/components/welcome-guide/style.scss +1 -1
  715. package/src/components/welcome-guide/styles.js +6 -5
  716. package/src/hooks/commands/use-edit-mode-commands.js +12 -33
  717. package/src/hooks/push-changes-to-global-styles/index.js +1 -40
  718. package/src/hooks/use-theme-style-variations/test/use-theme-style-variations-by-property.js +4 -0
  719. package/src/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +5 -1
  720. package/src/index.js +9 -10
  721. package/src/store/actions.js +25 -141
  722. package/src/store/private-actions.js +0 -133
  723. package/src/store/test/actions.js +7 -2
  724. package/src/style.scss +0 -2
  725. package/src/utils/constants.js +1 -0
  726. package/src/utils/set-nested-value.js +39 -0
  727. package/build/components/add-new-template/new-template.js +0 -298
  728. package/build/components/add-new-template/new-template.js.map +0 -1
  729. package/build/components/add-new-template/template-actions-loading-screen.js +0 -27
  730. package/build/components/add-new-template/template-actions-loading-screen.js.map +0 -1
  731. package/build/components/header-edit-mode/plugin-more-menu-item/index.js +0 -78
  732. package/build/components/header-edit-mode/plugin-more-menu-item/index.js.map +0 -1
  733. package/build/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js +0 -71
  734. package/build/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js.map +0 -1
  735. package/build/components/keyboard-shortcut-help-modal/config.js +0 -78
  736. package/build/components/keyboard-shortcut-help-modal/config.js.map +0 -1
  737. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +0 -48
  738. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +0 -1
  739. package/build/components/keyboard-shortcut-help-modal/index.js +0 -119
  740. package/build/components/keyboard-shortcut-help-modal/index.js.map +0 -1
  741. package/build/components/keyboard-shortcut-help-modal/shortcut.js +0 -54
  742. package/build/components/keyboard-shortcut-help-modal/shortcut.js.map +0 -1
  743. package/build/components/page-actions/index.js +0 -35
  744. package/build/components/page-actions/index.js.map +0 -1
  745. package/build/components/page-actions/trash-page-menu-item.js +0 -54
  746. package/build/components/page-actions/trash-page-menu-item.js.map +0 -1
  747. package/build/components/page-templates-template-parts/actions.js +0 -207
  748. package/build/components/page-templates-template-parts/actions.js.map +0 -1
  749. package/build/components/preferences-modal/index.js +0 -38
  750. package/build/components/preferences-modal/index.js.map +0 -1
  751. package/build/components/sidebar-edit-mode/constants.js +0 -9
  752. package/build/components/sidebar-edit-mode/constants.js.map +0 -1
  753. package/build/components/sidebar-edit-mode/plugin-sidebar/index.js +0 -89
  754. package/build/components/sidebar-edit-mode/plugin-sidebar/index.js.map +0 -1
  755. package/build/components/sidebar-navigation-screen-navigation-item/index.js +0 -54
  756. package/build/components/sidebar-navigation-screen-navigation-item/index.js.map +0 -1
  757. package/build/components/sync-state-with-url/use-sync-path-with-url.js +0 -132
  758. package/build/components/sync-state-with-url/use-sync-path-with-url.js.map +0 -1
  759. package/build/components/template-actions/rename-menu-item.js.map +0 -1
  760. package/build-module/components/add-new-template/new-template.js +0 -290
  761. package/build-module/components/add-new-template/new-template.js.map +0 -1
  762. package/build-module/components/add-new-template/template-actions-loading-screen.js +0 -20
  763. package/build-module/components/add-new-template/template-actions-loading-screen.js.map +0 -1
  764. package/build-module/components/header-edit-mode/plugin-more-menu-item/index.js +0 -73
  765. package/build-module/components/header-edit-mode/plugin-more-menu-item/index.js.map +0 -1
  766. package/build-module/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js +0 -65
  767. package/build-module/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js.map +0 -1
  768. package/build-module/components/keyboard-shortcut-help-modal/config.js +0 -71
  769. package/build-module/components/keyboard-shortcut-help-modal/config.js.map +0 -1
  770. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +0 -40
  771. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +0 -1
  772. package/build-module/components/keyboard-shortcut-help-modal/index.js +0 -110
  773. package/build-module/components/keyboard-shortcut-help-modal/index.js.map +0 -1
  774. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +0 -47
  775. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js.map +0 -1
  776. package/build-module/components/page-actions/index.js +0 -27
  777. package/build-module/components/page-actions/index.js.map +0 -1
  778. package/build-module/components/page-actions/trash-page-menu-item.js +0 -47
  779. package/build-module/components/page-actions/trash-page-menu-item.js.map +0 -1
  780. package/build-module/components/page-templates-template-parts/actions.js +0 -199
  781. package/build-module/components/page-templates-template-parts/actions.js.map +0 -1
  782. package/build-module/components/preferences-modal/index.js +0 -30
  783. package/build-module/components/preferences-modal/index.js.map +0 -1
  784. package/build-module/components/sidebar-edit-mode/constants.js +0 -3
  785. package/build-module/components/sidebar-edit-mode/constants.js.map +0 -1
  786. package/build-module/components/sidebar-edit-mode/plugin-sidebar/index.js +0 -83
  787. package/build-module/components/sidebar-edit-mode/plugin-sidebar/index.js.map +0 -1
  788. package/build-module/components/sidebar-navigation-screen-navigation-item/index.js +0 -46
  789. package/build-module/components/sidebar-navigation-screen-navigation-item/index.js.map +0 -1
  790. package/build-module/components/sync-state-with-url/use-sync-path-with-url.js +0 -124
  791. package/build-module/components/sync-state-with-url/use-sync-path-with-url.js.map +0 -1
  792. package/build-module/components/template-actions/rename-menu-item.js.map +0 -1
  793. package/src/components/add-new-template/new-template.js +0 -429
  794. package/src/components/add-new-template/template-actions-loading-screen.js +0 -23
  795. package/src/components/header-edit-mode/plugin-more-menu-item/index.js +0 -73
  796. package/src/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js +0 -64
  797. package/src/components/keyboard-shortcut-help-modal/config.js +0 -53
  798. package/src/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +0 -41
  799. package/src/components/keyboard-shortcut-help-modal/index.js +0 -151
  800. package/src/components/keyboard-shortcut-help-modal/shortcut.js +0 -70
  801. package/src/components/keyboard-shortcut-help-modal/style.scss +0 -61
  802. package/src/components/page-actions/index.js +0 -30
  803. package/src/components/page-actions/trash-page-menu-item.js +0 -63
  804. package/src/components/page-templates-template-parts/actions.js +0 -277
  805. package/src/components/preferences-modal/index.js +0 -29
  806. package/src/components/sidebar-edit-mode/constants.js +0 -2
  807. package/src/components/sidebar-edit-mode/plugin-sidebar/index.js +0 -80
  808. package/src/components/sidebar-navigation-screen-navigation-item/index.js +0 -59
  809. package/src/components/sync-state-with-url/use-sync-path-with-url.js +0 -147
@@ -1 +1 @@
1
- {"version":3,"names":["_i18n","require","_data","_htmlEntities","_coreData","getExternalLink","url","text","getExternalLinkAttributes","getOpenverseLicense","license","licenseVersion","licenseName","trim","toUpperCase","replace","includes","getOpenverseCaption","item","title","foreign_landing_url","foreignLandingUrl","creator","creator_url","creatorUrl","license_version","license_url","licenseUrl","fullLicense","_creator","decodeEntities","_caption","sprintf","_x","coreMediaFetch","query","mediaItems","resolveSelect","coreStore","getMediaItems","orderBy","search","map","mediaItem","alt","alt_text","source_url","previewUrl","media_details","sizes","medium","caption","raw","inserterMediaCategories","name","labels","__","search_items","mediaType","fetch","media_type","defaultArgs","mature","excluded_source","finalQuery","mapFromInserterMediaRequest","per_page","URL","Object","entries","forEach","key","value","queryKey","searchParams","set","response","window","headers","jsonResponse","json","results","result","toLowerCase","startsWith","slice","sourceId","id","undefined","thumbnail","getReportUrl","isExternalResource","_default","exports","default"],"sources":["@wordpress/edit-site/src/components/block-editor/inserter-media-categories.js"],"sourcesContent":["/**\n * The `edit-site` settings here need to be in sync with the corresponding ones in `site-editor` package.\n * See `packages/edit-site/src/components/block-editor/inserter-media-categories.js`.\n *\n * In the future we could consider creating an Openvese package that can be used in both `editor` and `site-editor`.\n * The rest of the settings would still need to be in sync though.\n */\n\n/**\n * WordPress dependencies\n */\nimport { __, sprintf, _x } from '@wordpress/i18n';\nimport { resolveSelect } from '@wordpress/data';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport { store as coreStore } from '@wordpress/core-data';\n\n/** @typedef {import('@wordpress/block-editor').InserterMediaRequest} InserterMediaRequest */\n/** @typedef {import('@wordpress/block-editor').InserterMediaItem} InserterMediaItem */\n/** @typedef {import('@wordpress/block-editor').InserterMediaCategory} InserterMediaCategory */\n\nconst getExternalLink = ( url, text ) =>\n\t`<a ${ getExternalLinkAttributes( url ) }>${ text }</a>`;\n\nconst getExternalLinkAttributes = ( url ) =>\n\t`href=\"${ url }\" target=\"_blank\" rel=\"noreferrer noopener\"`;\n\nconst getOpenverseLicense = ( license, licenseVersion ) => {\n\tlet licenseName = license.trim();\n\t// PDM has no abbreviation\n\tif ( license !== 'pdm' ) {\n\t\tlicenseName = license.toUpperCase().replace( 'SAMPLING', 'Sampling' );\n\t}\n\t// If version is known, append version to the name.\n\t// The license has to have a version to be valid. Only\n\t// PDM (public domain mark) doesn't have a version.\n\tif ( licenseVersion ) {\n\t\tlicenseName += ` ${ licenseVersion }`;\n\t}\n\t// For licenses other than public-domain marks, prepend 'CC' to the name.\n\tif ( ! [ 'pdm', 'cc0' ].includes( license ) ) {\n\t\tlicenseName = `CC ${ licenseName }`;\n\t}\n\treturn licenseName;\n};\n\nconst getOpenverseCaption = ( item ) => {\n\tconst {\n\t\ttitle,\n\t\tforeign_landing_url: foreignLandingUrl,\n\t\tcreator,\n\t\tcreator_url: creatorUrl,\n\t\tlicense,\n\t\tlicense_version: licenseVersion,\n\t\tlicense_url: licenseUrl,\n\t} = item;\n\tconst fullLicense = getOpenverseLicense( license, licenseVersion );\n\tconst _creator = decodeEntities( creator );\n\tlet _caption;\n\tif ( _creator ) {\n\t\t_caption = title\n\t\t\t? sprintf(\n\t\t\t\t\t// translators: %1s: Title of a media work from Openverse; %2s: Name of the work's creator; %3s: Work's licence e.g: \"CC0 1.0\".\n\t\t\t\t\t_x( '\"%1$s\" by %2$s/ %3$s', 'caption' ),\n\t\t\t\t\tgetExternalLink(\n\t\t\t\t\t\tforeignLandingUrl,\n\t\t\t\t\t\tdecodeEntities( title )\n\t\t\t\t\t),\n\t\t\t\t\tcreatorUrl\n\t\t\t\t\t\t? getExternalLink( creatorUrl, _creator )\n\t\t\t\t\t\t: _creator,\n\t\t\t\t\tlicenseUrl\n\t\t\t\t\t\t? getExternalLink(\n\t\t\t\t\t\t\t\t`${ licenseUrl }?ref=openverse`,\n\t\t\t\t\t\t\t\tfullLicense\n\t\t\t\t\t\t )\n\t\t\t\t\t\t: fullLicense\n\t\t\t )\n\t\t\t: sprintf(\n\t\t\t\t\t// translators: %1s: Link attributes for a given Openverse media work; %2s: Name of the work's creator; %3s: Works's licence e.g: \"CC0 1.0\".\n\t\t\t\t\t_x( '<a %1$s>Work</a> by %2$s/ %3$s', 'caption' ),\n\t\t\t\t\tgetExternalLinkAttributes( foreignLandingUrl ),\n\t\t\t\t\tcreatorUrl\n\t\t\t\t\t\t? getExternalLink( creatorUrl, _creator )\n\t\t\t\t\t\t: _creator,\n\t\t\t\t\tlicenseUrl\n\t\t\t\t\t\t? getExternalLink(\n\t\t\t\t\t\t\t\t`${ licenseUrl }?ref=openverse`,\n\t\t\t\t\t\t\t\tfullLicense\n\t\t\t\t\t\t )\n\t\t\t\t\t\t: fullLicense\n\t\t\t );\n\t} else {\n\t\t_caption = title\n\t\t\t? sprintf(\n\t\t\t\t\t// translators: %1s: Title of a media work from Openverse; %2s: Work's licence e.g: \"CC0 1.0\".\n\t\t\t\t\t_x( '\"%1$s\"/ %2$s', 'caption' ),\n\t\t\t\t\tgetExternalLink(\n\t\t\t\t\t\tforeignLandingUrl,\n\t\t\t\t\t\tdecodeEntities( title )\n\t\t\t\t\t),\n\t\t\t\t\tlicenseUrl\n\t\t\t\t\t\t? getExternalLink(\n\t\t\t\t\t\t\t\t`${ licenseUrl }?ref=openverse`,\n\t\t\t\t\t\t\t\tfullLicense\n\t\t\t\t\t\t )\n\t\t\t\t\t\t: fullLicense\n\t\t\t )\n\t\t\t: sprintf(\n\t\t\t\t\t// translators: %1s: Link attributes for a given Openverse media work; %2s: Works's licence e.g: \"CC0 1.0\".\n\t\t\t\t\t_x( '<a %1$s>Work</a>/ %3$s', 'caption' ),\n\t\t\t\t\tgetExternalLinkAttributes( foreignLandingUrl ),\n\t\t\t\t\tlicenseUrl\n\t\t\t\t\t\t? getExternalLink(\n\t\t\t\t\t\t\t\t`${ licenseUrl }?ref=openverse`,\n\t\t\t\t\t\t\t\tfullLicense\n\t\t\t\t\t\t )\n\t\t\t\t\t\t: fullLicense\n\t\t\t );\n\t}\n\treturn _caption.replace( /\\s{2}/g, ' ' );\n};\n\nconst coreMediaFetch = async ( query = {} ) => {\n\tconst mediaItems = await resolveSelect( coreStore ).getMediaItems( {\n\t\t...query,\n\t\torderBy: !! query?.search ? 'relevance' : 'date',\n\t} );\n\treturn mediaItems.map( ( mediaItem ) => ( {\n\t\t...mediaItem,\n\t\talt: mediaItem.alt_text,\n\t\turl: mediaItem.source_url,\n\t\tpreviewUrl: mediaItem.media_details?.sizes?.medium?.source_url,\n\t\tcaption: mediaItem.caption?.raw,\n\t} ) );\n};\n\n/** @type {InserterMediaCategory[]} */\nconst inserterMediaCategories = [\n\t{\n\t\tname: 'images',\n\t\tlabels: {\n\t\t\tname: __( 'Images' ),\n\t\t\tsearch_items: __( 'Search images' ),\n\t\t},\n\t\tmediaType: 'image',\n\t\tasync fetch( query = {} ) {\n\t\t\treturn coreMediaFetch( { ...query, media_type: 'image' } );\n\t\t},\n\t},\n\t{\n\t\tname: 'videos',\n\t\tlabels: {\n\t\t\tname: __( 'Videos' ),\n\t\t\tsearch_items: __( 'Search videos' ),\n\t\t},\n\t\tmediaType: 'video',\n\t\tasync fetch( query = {} ) {\n\t\t\treturn coreMediaFetch( { ...query, media_type: 'video' } );\n\t\t},\n\t},\n\t{\n\t\tname: 'audio',\n\t\tlabels: {\n\t\t\tname: __( 'Audio' ),\n\t\t\tsearch_items: __( 'Search audio' ),\n\t\t},\n\t\tmediaType: 'audio',\n\t\tasync fetch( query = {} ) {\n\t\t\treturn coreMediaFetch( { ...query, media_type: 'audio' } );\n\t\t},\n\t},\n\t{\n\t\tname: 'openverse',\n\t\tlabels: {\n\t\t\tname: __( 'Openverse' ),\n\t\t\tsearch_items: __( 'Search Openverse' ),\n\t\t},\n\t\tmediaType: 'image',\n\t\tasync fetch( query = {} ) {\n\t\t\tconst defaultArgs = {\n\t\t\t\tmature: false,\n\t\t\t\texcluded_source: 'flickr,inaturalist,wikimedia',\n\t\t\t\tlicense: 'pdm,cc0',\n\t\t\t};\n\t\t\tconst finalQuery = { ...query, ...defaultArgs };\n\t\t\tconst mapFromInserterMediaRequest = {\n\t\t\t\tper_page: 'page_size',\n\t\t\t\tsearch: 'q',\n\t\t\t};\n\t\t\tconst url = new URL(\n\t\t\t\t'https://api.openverse.engineering/v1/images/'\n\t\t\t);\n\t\t\tObject.entries( finalQuery ).forEach( ( [ key, value ] ) => {\n\t\t\t\tconst queryKey = mapFromInserterMediaRequest[ key ] || key;\n\t\t\t\turl.searchParams.set( queryKey, value );\n\t\t\t} );\n\t\t\tconst response = await window.fetch( url, {\n\t\t\t\theaders: {\n\t\t\t\t\t'User-Agent': 'WordPress/inserter-media-fetch',\n\t\t\t\t},\n\t\t\t} );\n\t\t\tconst jsonResponse = await response.json();\n\t\t\tconst results = jsonResponse.results;\n\t\t\treturn results.map( ( result ) => ( {\n\t\t\t\t...result,\n\t\t\t\t// This is a temp solution for better titles, until Openverse API\n\t\t\t\t// completes the cleaning up of some titles of their upstream data.\n\t\t\t\ttitle: result.title?.toLowerCase().startsWith( 'file:' )\n\t\t\t\t\t? result.title.slice( 5 )\n\t\t\t\t\t: result.title,\n\t\t\t\tsourceId: result.id,\n\t\t\t\tid: undefined,\n\t\t\t\tcaption: getOpenverseCaption( result ),\n\t\t\t\tpreviewUrl: result.thumbnail,\n\t\t\t} ) );\n\t\t},\n\t\tgetReportUrl: ( { sourceId } ) =>\n\t\t\t`https://wordpress.org/openverse/image/${ sourceId }/report/`,\n\t\tisExternalResource: true,\n\t},\n];\n\nexport default inserterMediaCategories;\n"],"mappings":";;;;;;AAWA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,aAAA,GAAAF,OAAA;AAKA,IAAAG,SAAA,GAAAH,OAAA;AAlBA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAKA;AACA;AACA;;AAGA;AACA;AACA;;AAEA,MAAMI,eAAe,GAAGA,CAAEC,GAAG,EAAEC,IAAI,KACjC,MAAMC,yBAAyB,CAAEF,GAAI,CAAG,IAAIC,IAAM,MAAK;AAEzD,MAAMC,yBAAyB,GAAKF,GAAG,IACrC,SAASA,GAAK,6CAA4C;AAE5D,MAAMG,mBAAmB,GAAGA,CAAEC,OAAO,EAAEC,cAAc,KAAM;EAC1D,IAAIC,WAAW,GAAGF,OAAO,CAACG,IAAI,CAAC,CAAC;EAChC;EACA,IAAKH,OAAO,KAAK,KAAK,EAAG;IACxBE,WAAW,GAAGF,OAAO,CAACI,WAAW,CAAC,CAAC,CAACC,OAAO,CAAE,UAAU,EAAE,UAAW,CAAC;EACtE;EACA;EACA;EACA;EACA,IAAKJ,cAAc,EAAG;IACrBC,WAAW,IAAK,IAAID,cAAgB,EAAC;EACtC;EACA;EACA,IAAK,CAAE,CAAE,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AU,UAAS;EAC9DK,kBAAkB,EAAE;AACrB,CAAC,CACD;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEazC,uBAAuB"}
1
+ {"version":3,"names":["_i18n","require","_data","_htmlEntities","_coreData","getExternalLink","url","text","getExternalLinkAttributes","getOpenverseLicense","license","licenseVersion","licenseName","trim","toUpperCase","replace","includes","getOpenverseCaption","item","title","foreign_landing_url","foreignLandingUrl","creator","creator_url","creatorUrl","license_version","license_url","licenseUrl","fullLicense","_creator","decodeEntities","_caption","sprintf","_x","coreMediaFetch","query","mediaItems","resolveSelect","coreStore","getMediaItems","orderBy","search","map","mediaItem","alt","alt_text","source_url","previewUrl","media_details","sizes","medium","caption","raw","inserterMediaCategories","name","labels","__","search_items","mediaType","fetch","media_type","defaultArgs","mature","excluded_source","finalQuery","mapFromInserterMediaRequest","per_page","URL","Object","entries","forEach","key","value","queryKey","searchParams","set","response","window","headers","jsonResponse","json","results","result","toLowerCase","startsWith","slice","sourceId","id","undefined","thumbnail","getReportUrl","isExternalResource","_default","exports","default"],"sources":["@wordpress/edit-site/src/components/block-editor/inserter-media-categories.js"],"sourcesContent":["/**\n * The `edit-site` settings here need to be in sync with the corresponding ones in `site-editor` package.\n * See `packages/edit-site/src/components/block-editor/inserter-media-categories.js`.\n *\n * In the future we could consider creating an Openvese package that can be used in both `editor` and `site-editor`.\n * The rest of the settings would still need to be in sync though.\n */\n\n/**\n * WordPress dependencies\n */\nimport { __, sprintf, _x } from '@wordpress/i18n';\nimport { resolveSelect } from '@wordpress/data';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport { store as coreStore } from '@wordpress/core-data';\n\n/** @typedef {import('@wordpress/block-editor').InserterMediaRequest} InserterMediaRequest */\n/** @typedef {import('@wordpress/block-editor').InserterMediaItem} InserterMediaItem */\n/** @typedef {import('@wordpress/block-editor').InserterMediaCategory} InserterMediaCategory */\n\nconst getExternalLink = ( url, text ) =>\n\t`<a ${ getExternalLinkAttributes( url ) }>${ text }</a>`;\n\nconst getExternalLinkAttributes = ( url ) =>\n\t`href=\"${ url }\" target=\"_blank\" rel=\"noreferrer noopener\"`;\n\nconst getOpenverseLicense = ( license, licenseVersion ) => {\n\tlet licenseName = license.trim();\n\t// PDM has no abbreviation\n\tif ( license !== 'pdm' ) {\n\t\tlicenseName = license.toUpperCase().replace( 'SAMPLING', 'Sampling' );\n\t}\n\t// If version is known, append version to the name.\n\t// The license has to have a version to be valid. Only\n\t// PDM (public domain mark) doesn't have a version.\n\tif ( licenseVersion ) {\n\t\tlicenseName += ` ${ licenseVersion }`;\n\t}\n\t// For licenses other than public-domain marks, prepend 'CC' to the name.\n\tif ( ! [ 'pdm', 'cc0' ].includes( license ) ) {\n\t\tlicenseName = `CC ${ licenseName }`;\n\t}\n\treturn licenseName;\n};\n\nconst getOpenverseCaption = ( item ) => {\n\tconst {\n\t\ttitle,\n\t\tforeign_landing_url: foreignLandingUrl,\n\t\tcreator,\n\t\tcreator_url: creatorUrl,\n\t\tlicense,\n\t\tlicense_version: licenseVersion,\n\t\tlicense_url: licenseUrl,\n\t} = item;\n\tconst fullLicense = getOpenverseLicense( license, licenseVersion );\n\tconst _creator = decodeEntities( creator );\n\tlet _caption;\n\tif ( _creator ) {\n\t\t_caption = title\n\t\t\t? sprintf(\n\t\t\t\t\t// translators: %1s: Title of a media work from Openverse; %2s: Name of the work's creator; %3s: Work's licence e.g: \"CC0 1.0\".\n\t\t\t\t\t_x( '\"%1$s\" by %2$s/ %3$s', 'caption' ),\n\t\t\t\t\tgetExternalLink(\n\t\t\t\t\t\tforeignLandingUrl,\n\t\t\t\t\t\tdecodeEntities( title )\n\t\t\t\t\t),\n\t\t\t\t\tcreatorUrl\n\t\t\t\t\t\t? getExternalLink( creatorUrl, _creator )\n\t\t\t\t\t\t: _creator,\n\t\t\t\t\tlicenseUrl\n\t\t\t\t\t\t? getExternalLink(\n\t\t\t\t\t\t\t\t`${ licenseUrl }?ref=openverse`,\n\t\t\t\t\t\t\t\tfullLicense\n\t\t\t\t\t\t )\n\t\t\t\t\t\t: fullLicense\n\t\t\t )\n\t\t\t: sprintf(\n\t\t\t\t\t// translators: %1s: Link attributes for a given Openverse media work; %2s: Name of the work's creator; %3s: Works's licence e.g: \"CC0 1.0\".\n\t\t\t\t\t_x( '<a %1$s>Work</a> by %2$s/ %3$s', 'caption' ),\n\t\t\t\t\tgetExternalLinkAttributes( foreignLandingUrl ),\n\t\t\t\t\tcreatorUrl\n\t\t\t\t\t\t? getExternalLink( creatorUrl, _creator )\n\t\t\t\t\t\t: _creator,\n\t\t\t\t\tlicenseUrl\n\t\t\t\t\t\t? getExternalLink(\n\t\t\t\t\t\t\t\t`${ licenseUrl }?ref=openverse`,\n\t\t\t\t\t\t\t\tfullLicense\n\t\t\t\t\t\t )\n\t\t\t\t\t\t: fullLicense\n\t\t\t );\n\t} else {\n\t\t_caption = title\n\t\t\t? sprintf(\n\t\t\t\t\t// translators: %1s: Title of a media work from Openverse; %2s: Work's licence e.g: \"CC0 1.0\".\n\t\t\t\t\t_x( '\"%1$s\"/ %2$s', 'caption' ),\n\t\t\t\t\tgetExternalLink(\n\t\t\t\t\t\tforeignLandingUrl,\n\t\t\t\t\t\tdecodeEntities( title )\n\t\t\t\t\t),\n\t\t\t\t\tlicenseUrl\n\t\t\t\t\t\t? getExternalLink(\n\t\t\t\t\t\t\t\t`${ licenseUrl }?ref=openverse`,\n\t\t\t\t\t\t\t\tfullLicense\n\t\t\t\t\t\t )\n\t\t\t\t\t\t: fullLicense\n\t\t\t )\n\t\t\t: sprintf(\n\t\t\t\t\t// translators: %1s: Link attributes for a given Openverse media work; %2s: Works's licence e.g: \"CC0 1.0\".\n\t\t\t\t\t_x( '<a %1$s>Work</a>/ %3$s', 'caption' ),\n\t\t\t\t\tgetExternalLinkAttributes( foreignLandingUrl ),\n\t\t\t\t\tlicenseUrl\n\t\t\t\t\t\t? getExternalLink(\n\t\t\t\t\t\t\t\t`${ licenseUrl }?ref=openverse`,\n\t\t\t\t\t\t\t\tfullLicense\n\t\t\t\t\t\t )\n\t\t\t\t\t\t: fullLicense\n\t\t\t );\n\t}\n\treturn _caption.replace( /\\s{2}/g, ' ' );\n};\n\nconst coreMediaFetch = async ( query = {} ) => {\n\tconst mediaItems = await resolveSelect( coreStore ).getMediaItems( {\n\t\t...query,\n\t\torderBy: !! query?.search ? 'relevance' : 'date',\n\t} );\n\treturn mediaItems.map( ( mediaItem ) => ( {\n\t\t...mediaItem,\n\t\talt: mediaItem.alt_text,\n\t\turl: mediaItem.source_url,\n\t\tpreviewUrl: mediaItem.media_details?.sizes?.medium?.source_url,\n\t\tcaption: mediaItem.caption?.raw,\n\t} ) );\n};\n\n/** @type {InserterMediaCategory[]} */\nconst inserterMediaCategories = [\n\t{\n\t\tname: 'images',\n\t\tlabels: {\n\t\t\tname: __( 'Images' ),\n\t\t\tsearch_items: __( 'Search images' ),\n\t\t},\n\t\tmediaType: 'image',\n\t\tasync fetch( query = {} ) {\n\t\t\treturn coreMediaFetch( { ...query, media_type: 'image' } );\n\t\t},\n\t},\n\t{\n\t\tname: 'videos',\n\t\tlabels: {\n\t\t\tname: __( 'Videos' ),\n\t\t\tsearch_items: __( 'Search videos' ),\n\t\t},\n\t\tmediaType: 'video',\n\t\tasync fetch( query = {} ) {\n\t\t\treturn coreMediaFetch( { ...query, media_type: 'video' } );\n\t\t},\n\t},\n\t{\n\t\tname: 'audio',\n\t\tlabels: {\n\t\t\tname: __( 'Audio' ),\n\t\t\tsearch_items: __( 'Search audio' ),\n\t\t},\n\t\tmediaType: 'audio',\n\t\tasync fetch( query = {} ) {\n\t\t\treturn coreMediaFetch( { ...query, media_type: 'audio' } );\n\t\t},\n\t},\n\t{\n\t\tname: 'openverse',\n\t\tlabels: {\n\t\t\tname: __( 'Openverse' ),\n\t\t\tsearch_items: __( 'Search Openverse' ),\n\t\t},\n\t\tmediaType: 'image',\n\t\tasync fetch( query = {} ) {\n\t\t\tconst defaultArgs = {\n\t\t\t\tmature: false,\n\t\t\t\texcluded_source: 'flickr,inaturalist,wikimedia',\n\t\t\t\tlicense: 'pdm,cc0',\n\t\t\t};\n\t\t\tconst finalQuery = { ...query, ...defaultArgs };\n\t\t\tconst mapFromInserterMediaRequest = {\n\t\t\t\tper_page: 'page_size',\n\t\t\t\tsearch: 'q',\n\t\t\t};\n\t\t\tconst url = new URL(\n\t\t\t\t'https://api.openverse.engineering/v1/images/'\n\t\t\t);\n\t\t\tObject.entries( finalQuery ).forEach( ( [ key, value ] ) => {\n\t\t\t\tconst queryKey = mapFromInserterMediaRequest[ key ] || key;\n\t\t\t\turl.searchParams.set( queryKey, value );\n\t\t\t} );\n\t\t\tconst response = await window.fetch( url, {\n\t\t\t\theaders: {\n\t\t\t\t\t'User-Agent': 'WordPress/inserter-media-fetch',\n\t\t\t\t},\n\t\t\t} );\n\t\t\tconst jsonResponse = await response.json();\n\t\t\tconst results = jsonResponse.results;\n\t\t\treturn results.map( ( result ) => ( {\n\t\t\t\t...result,\n\t\t\t\t// This is a temp solution for better titles, until Openverse API\n\t\t\t\t// completes the cleaning up of some titles of their upstream data.\n\t\t\t\ttitle: result.title?.toLowerCase().startsWith( 'file:' )\n\t\t\t\t\t? result.title.slice( 5 )\n\t\t\t\t\t: result.title,\n\t\t\t\tsourceId: result.id,\n\t\t\t\tid: undefined,\n\t\t\t\tcaption: getOpenverseCaption( result ),\n\t\t\t\tpreviewUrl: result.thumbnail,\n\t\t\t} ) );\n\t\t},\n\t\tgetReportUrl: ( { sourceId } ) =>\n\t\t\t`https://wordpress.org/openverse/image/${ sourceId }/report/`,\n\t\tisExternalResource: true,\n\t},\n];\n\nexport default inserterMediaCategories;\n"],"mappings":";;;;;;AAWA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,aAAA,GAAAF,OAAA;AAKA,IAAAG,SAAA,GAAAH,OAAA;AAlBA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA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AACI,IAAI,CAAC,CAAC;IAC1C,MAAMC,OAAO,GAAGF,YAAY,CAACE,OAAO;IACpC,OAAOA,OAAO,CAACvC,GAAG,CAAIwC,MAAM,KAAQ;MACnC,GAAGA,MAAM;MACT;MACA;MACA/D,KAAK,EAAE+D,MAAM,CAAC/D,KAAK,EAAEgE,WAAW,CAAC,CAAC,CAACC,UAAU,CAAE,OAAQ,CAAC,GACrDF,MAAM,CAAC/D,KAAK,CAACkE,KAAK,CAAE,CAAE,CAAC,GACvBH,MAAM,CAAC/D,KAAK;MACfmE,QAAQ,EAAEJ,MAAM,CAACK,EAAE;MACnBA,EAAE,EAAEC,SAAS;MACbrC,OAAO,EAAElC,mBAAmB,CAAEiE,MAAO,CAAC;MACtCnC,UAAU,EAAEmC,MAAM,CAACO;IACpB,CAAC,CAAG,CAAC;EACN,CAAC;EACDC,YAAY,EAAEA,CAAE;IAAEJ;EAAS,CAAC,KAC1B,yCAAyCA,QAAU,UAAS;EAC9DK,kBAAkB,EAAE;AACrB,CAAC,CACD;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEazC,uBAAuB","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_element","require","_components","_resizeHandle","_interopRequireDefault","HANDLE_STYLES_OVERRIDE","position","undefined","userSelect","cursor","width","height","top","right","bottom","left","ResizableEditor","enableResizing","children","setWidth","useState","resizableRef","useRef","resizeWidthBy","useCallback","deltaPixels","current","offsetWidth","_react","createElement","ResizableBox","ref","api","resizable","size","onResizeStop","event","direction","element","style","minWidth","maxWidth","maxHeight","enable","showHandle","resizeRatio","handleComponent","default","handleClasses","handleStyles","_default","exports"],"sources":["@wordpress/edit-site/src/components/block-editor/resizable-editor.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useState, useRef, useCallback } from '@wordpress/element';\nimport { ResizableBox } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport ResizeHandle from './resize-handle';\n\n// Removes the inline styles in the drag handles.\nconst HANDLE_STYLES_OVERRIDE = {\n\tposition: undefined,\n\tuserSelect: undefined,\n\tcursor: undefined,\n\twidth: undefined,\n\theight: undefined,\n\ttop: undefined,\n\tright: undefined,\n\tbottom: undefined,\n\tleft: undefined,\n};\n\nfunction ResizableEditor( { enableResizing, height, children } ) {\n\tconst [ width, setWidth ] = useState( '100%' );\n\tconst resizableRef = useRef();\n\tconst resizeWidthBy = useCallback( ( deltaPixels ) => {\n\t\tif ( resizableRef.current ) {\n\t\t\tsetWidth( resizableRef.current.offsetWidth + deltaPixels );\n\t\t}\n\t}, [] );\n\treturn (\n\t\t<ResizableBox\n\t\t\tref={ ( api ) => {\n\t\t\t\tresizableRef.current = api?.resizable;\n\t\t\t} }\n\t\t\tsize={ {\n\t\t\t\twidth: enableResizing ? width : '100%',\n\t\t\t\theight: enableResizing && height ? height : '100%',\n\t\t\t} }\n\t\t\tonResizeStop={ ( event, direction, element ) => {\n\t\t\t\tsetWidth( element.style.width );\n\t\t\t} }\n\t\t\tminWidth={ 300 }\n\t\t\tmaxWidth=\"100%\"\n\t\t\tmaxHeight=\"100%\"\n\t\t\tenable={ {\n\t\t\t\tleft: enableResizing,\n\t\t\t\tright: enableResizing,\n\t\t\t} }\n\t\t\tshowHandle={ enableResizing }\n\t\t\t// The editor is centered horizontally, resizing it only\n\t\t\t// moves half the distance. Hence double the ratio to correctly\n\t\t\t// align the cursor to the resizer handle.\n\t\t\tresizeRatio={ 2 }\n\t\t\thandleComponent={ {\n\t\t\t\tleft: (\n\t\t\t\t\t<ResizeHandle\n\t\t\t\t\t\tdirection=\"left\"\n\t\t\t\t\t\tresizeWidthBy={ resizeWidthBy }\n\t\t\t\t\t/>\n\t\t\t\t),\n\t\t\t\tright: (\n\t\t\t\t\t<ResizeHandle\n\t\t\t\t\t\tdirection=\"right\"\n\t\t\t\t\t\tresizeWidthBy={ resizeWidthBy }\n\t\t\t\t\t/>\n\t\t\t\t),\n\t\t\t} }\n\t\t\thandleClasses={ undefined }\n\t\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AAGP,KAAK,GAAG,MAAM;MACtCC,MAAM,EAAEM,cAAc,IAAIN,MAAM,GAAGA,MAAM,GAAG;IAC7C,CAAG;IACHwB,YAAY,EAAGA,CAAEC,KAAK,EAAEC,SAAS,EAAEC,OAAO,KAAM;MAC/CnB,QAAQ,CAAEmB,OAAO,CAACC,KAAK,CAAC7B,KAAM,CAAC;IAChC,CAAG;IACH8B,QAAQ,EAAG,GAAK;IAChBC,QAAQ,EAAC,MAAM;IACfC,SAAS,EAAC,MAAM;IAChBC,MAAM,EAAG;MACR5B,IAAI,EAAEE,cAAc;MACpBJ,KAAK,EAAEI;IACR,CAAG;IACH2B,UAAU,EAAG3B;IACb;IACA;IACA;IAAA;IACA4B,WAAW,EAAG,CAAG;IACjBC,eAAe,EAAG;MACjB/B,IAAI,EACH,IAAAa,MAAA,CAAAC,aAAA,EAAC1B,aAAA,CAAA4C,OAAY;QACZV,SAAS,EAAC,MAAM;QAChBd,aAAa,EAAGA;MAAe,CAC/B,CACD;MACDV,KAAK,EACJ,IAAAe,MAAA,CAAAC,aAAA,EAAC1B,aAAA,CAAA4C,OAAY;QACZV,SAAS,EAAC,OAAO;QACjBd,aAAa,EAAGA;MAAe,CAC/B;IAEH,CAAG;IACHyB,aAAa,EAAGzC,SAAW;IAC3B0C,YAAY,EAAG;MACdlC,IAAI,EAAEV,sBAAsB;MAC5BQ,KAAK,EAAER;IACR;EAAG,GAEDa,QACW,CAAC;AAEjB;AAAC,IAAAgC,QAAA,GAAAC,OAAA,CAAAJ,OAAA,GAEc/B,eAAe"}
1
+ {"version":3,"names":["_element","require","_components","_resizeHandle","_interopRequireDefault","HANDLE_STYLES_OVERRIDE","position","undefined","userSelect","cursor","width","height","top","right","bottom","left","ResizableEditor","enableResizing","children","setWidth","useState","resizableRef","useRef","resizeWidthBy","useCallback","deltaPixels","current","offsetWidth","_react","createElement","ResizableBox","ref","api","resizable","size","onResizeStop","event","direction","element","style","minWidth","maxWidth","maxHeight","enable","showHandle","resizeRatio","handleComponent","default","handleClasses","handleStyles","_default","exports"],"sources":["@wordpress/edit-site/src/components/block-editor/resizable-editor.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useState, useRef, useCallback } from '@wordpress/element';\nimport { ResizableBox } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport ResizeHandle from './resize-handle';\n\n// Removes the inline styles in the drag handles.\nconst HANDLE_STYLES_OVERRIDE = {\n\tposition: undefined,\n\tuserSelect: undefined,\n\tcursor: undefined,\n\twidth: undefined,\n\theight: undefined,\n\ttop: undefined,\n\tright: undefined,\n\tbottom: undefined,\n\tleft: undefined,\n};\n\nfunction ResizableEditor( { enableResizing, height, children } ) {\n\tconst [ width, setWidth ] = useState( '100%' );\n\tconst resizableRef = useRef();\n\tconst resizeWidthBy = useCallback( ( deltaPixels ) => {\n\t\tif ( resizableRef.current ) {\n\t\t\tsetWidth( resizableRef.current.offsetWidth + deltaPixels );\n\t\t}\n\t}, [] );\n\treturn (\n\t\t<ResizableBox\n\t\t\tref={ ( api ) => {\n\t\t\t\tresizableRef.current = api?.resizable;\n\t\t\t} }\n\t\t\tsize={ {\n\t\t\t\twidth: enableResizing ? width : '100%',\n\t\t\t\theight: enableResizing && height ? height : '100%',\n\t\t\t} }\n\t\t\tonResizeStop={ ( event, direction, element ) => {\n\t\t\t\tsetWidth( element.style.width );\n\t\t\t} }\n\t\t\tminWidth={ 300 }\n\t\t\tmaxWidth=\"100%\"\n\t\t\tmaxHeight=\"100%\"\n\t\t\tenable={ {\n\t\t\t\tleft: enableResizing,\n\t\t\t\tright: enableResizing,\n\t\t\t} }\n\t\t\tshowHandle={ enableResizing }\n\t\t\t// The editor is centered horizontally, resizing it only\n\t\t\t// moves half the distance. Hence double the ratio to correctly\n\t\t\t// align the cursor to the resizer handle.\n\t\t\tresizeRatio={ 2 }\n\t\t\thandleComponent={ {\n\t\t\t\tleft: (\n\t\t\t\t\t<ResizeHandle\n\t\t\t\t\t\tdirection=\"left\"\n\t\t\t\t\t\tresizeWidthBy={ resizeWidthBy }\n\t\t\t\t\t/>\n\t\t\t\t),\n\t\t\t\tright: (\n\t\t\t\t\t<ResizeHandle\n\t\t\t\t\t\tdirection=\"right\"\n\t\t\t\t\t\tresizeWidthBy={ resizeWidthBy }\n\t\t\t\t\t/>\n\t\t\t\t),\n\t\t\t} }\n\t\t\thandleClasses={ undefined }\n\t\t\thandleStyles={ {\n\t\t\t\tleft: HANDLE_STYLES_OVERRIDE,\n\t\t\t\tright: HANDLE_STYLES_OVERRIDE,\n\t\t\t} }\n\t\t>\n\t\t\t{ children }\n\t\t</ResizableBox>\n\t);\n}\n\nexport default ResizableEditor;\n"],"mappings":";;;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAKA,IAAAE,aAAA,GAAAC,sBAAA,CAAAH,OAAA;AATA;AACA;AACA;;AAIA;AACA;AACA;;AAGA;AACA,MAAMI,sBAAsB,GAAG;EAC9BC,QAAQ,EAAEC,SAAS;EACnBC,UAAU,EAAED,SAAS;EACrBE,MAAM,EAAEF,SAAS;EACjBG,KAAK,EAAEH,SAAS;EAChBI,MAAM,EAAEJ,SAAS;EACjBK,GAAG,EAAEL,SAAS;EACdM,KAAK,EAAEN,SAAS;EAChBO,MAAM,EAAEP,SAAS;EACjBQ,IAAI,EAAER;AACP,CAAC;AAED,SAASS,eAAeA,CAAE;EAAEC,cAAc;EAAEN,MAAM;EAAEO;AAAS,CAAC,EAAG;EAChE,MAAM,CAAER,KAAK,EAAES,QAAQ,CAAE,GAAG,IAAAC,iBAAQ,EAAE,MAAO,CAAC;EAC9C,MAAMC,YAAY,GAAG,IAAAC,eAAM,EAAC,CAAC;EAC7B,MAAMC,aAAa,GAAG,IAAAC,oBAAW,EAAIC,WAAW,IAAM;IACrD,IAAKJ,YAAY,CAACK,OAAO,EAAG;MAC3BP,QAAQ,CAAEE,YAAY,CAACK,OAAO,CAACC,WAAW,GAAGF,WAAY,CAAC;IAC3D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"names":["_i18n","require","_keycodes","_components","DELTA_DISTANCE","ResizeHandle","variation","direction","resizeWidthBy","handleKeyDown","event","keyCode","LEFT","RIGHT","_react","createElement","Fragment","className","__","onKeyDown","type","VisuallyHidden","id"],"sources":["@wordpress/edit-site/src/components/block-editor/resize-handle.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { LEFT, RIGHT } from '@wordpress/keycodes';\nimport { VisuallyHidden } from '@wordpress/components';\n\nconst DELTA_DISTANCE = 20; // The distance to resize per keydown in pixels.\n\nexport default function ResizeHandle( {\n\tvariation = 'default',\n\tdirection,\n\tresizeWidthBy,\n} ) {\n\tfunction handleKeyDown( event ) {\n\t\tconst { keyCode } = event;\n\n\t\tif (\n\t\t\t( direction === 'left' && keyCode === LEFT ) ||\n\t\t\t( direction === 'right' && keyCode === RIGHT )\n\t\t) {\n\t\t\tresizeWidthBy( DELTA_DISTANCE );\n\t\t} else if (\n\t\t\t( direction === 'left' && keyCode === RIGHT ) ||\n\t\t\t( direction === 'right' && keyCode === LEFT )\n\t\t) {\n\t\t\tresizeWidthBy( -DELTA_DISTANCE );\n\t\t}\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<button\n\t\t\t\tclassName={ `resizable-editor__drag-handle is-${ direction } is-variation-${ variation }` }\n\t\t\t\taria-label={ __( 'Drag to resize' ) }\n\t\t\t\taria-describedby={ `resizable-editor__resize-help-${ direction }` }\n\t\t\t\tonKeyDown={ handleKeyDown }\n\t\t\t\ttype=\"button\"\n\t\t\t/>\n\t\t\t<VisuallyHidden\n\t\t\t\tid={ `resizable-editor__resize-help-${ direction }` }\n\t\t\t>\n\t\t\t\t{ __( 'Use left and right arrow keys to resize the canvas.' ) }\n\t\t\t</VisuallyHidden>\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AALA;AACA;AACA;;AAKA,MAAMG,cAAc,GAAG,EAAE,CAAC,CAAC;;AAEZ,SAASC,YAAYA,CAAE;EACrCC,SAAS,GAAG,SAAS;EACrBC,SAAS;EACTC;AACD,CAAC,EAAG;EACH,SAASC,aAAaA,CAAEC,KAAK,EAAG;IAC/B,MAAM;MAAEC;IAAQ,CAAC,GAAGD,KAAK;IAEzB,IACGH,SAAS,KAAK,MAAM,IAAII,OAAO,KAAKC,cAAI,IACxCL,SAAS,KAAK,OAAO,IAAII,OAAO,KAAKE,eAAO,EAC7C;MACDL,aAAa,CAAEJ,cAAe,CAAC;IAChC,CAAC,MAAM,IACJG,SAAS,KAAK,MAAM,IAAII,OAAO,KAAKE,eAAK,IACzCN,SAAS,KAAK,OAAO,IAAII,OAAO,KAAKC,cAAM,EAC5C;MACDJ,aAAa,CAAE,CAACJ,cAAe,CAAC;IACjC;EACD;EAEA,OACC,IAAAU,MAAA,CAAAC,aAAA,EAAAD,MAAA,CAAAE,QAAA,QACC,IAAAF,MAAA,CAAAC,aAAA;IACCE,SAAS,EAAI,oCAAoCV,SAAW,iBAAiBD,SAAW,EAAG;IAC3F,cAAa,IAAAY,QAAE,EAAE,gBAAiB,CAAG;IACrC,oBAAoB,iCAAiCX,SAAW,EAAG;IACnEY,SAAS,EAAGV,aAAe;IAC3BW,IAAI,EAAC;EAAQ,CACb,CAAC,EACF,IAAAN,MAAA,CAAAC,aAAA,EAACZ,WAAA,CAAAkB,cAAc;IACdC,EAAE,EAAI,iCAAiCf,SAAW;EAAG,GAEnD,IAAAW,QAAE,EAAE,qDAAsD,CAC7C,CACf,CAAC;AAEL"}
1
+ {"version":3,"names":["_i18n","require","_keycodes","_components","DELTA_DISTANCE","ResizeHandle","variation","direction","resizeWidthBy","handleKeyDown","event","keyCode","LEFT","RIGHT","_react","createElement","Fragment","className","__","onKeyDown","type","VisuallyHidden","id"],"sources":["@wordpress/edit-site/src/components/block-editor/resize-handle.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { LEFT, RIGHT } from '@wordpress/keycodes';\nimport { VisuallyHidden } from '@wordpress/components';\n\nconst DELTA_DISTANCE = 20; // The distance to resize per keydown in pixels.\n\nexport default function ResizeHandle( {\n\tvariation = 'default',\n\tdirection,\n\tresizeWidthBy,\n} ) {\n\tfunction handleKeyDown( event ) {\n\t\tconst { keyCode } = event;\n\n\t\tif (\n\t\t\t( direction === 'left' && keyCode === LEFT ) ||\n\t\t\t( direction === 'right' && keyCode === RIGHT )\n\t\t) {\n\t\t\tresizeWidthBy( DELTA_DISTANCE );\n\t\t} else if (\n\t\t\t( direction === 'left' && keyCode === RIGHT ) ||\n\t\t\t( direction === 'right' && keyCode === LEFT )\n\t\t) {\n\t\t\tresizeWidthBy( -DELTA_DISTANCE );\n\t\t}\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<button\n\t\t\t\tclassName={ `resizable-editor__drag-handle is-${ direction } is-variation-${ variation }` }\n\t\t\t\taria-label={ __( 'Drag to resize' ) }\n\t\t\t\taria-describedby={ `resizable-editor__resize-help-${ direction }` }\n\t\t\t\tonKeyDown={ handleKeyDown }\n\t\t\t\ttype=\"button\"\n\t\t\t/>\n\t\t\t<VisuallyHidden\n\t\t\t\tid={ `resizable-editor__resize-help-${ direction }` }\n\t\t\t>\n\t\t\t\t{ __( 'Use left and right arrow keys to resize the canvas.' ) }\n\t\t\t</VisuallyHidden>\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AALA;AACA;AACA;;AAKA,MAAMG,cAAc,GAAG,EAAE,CAAC,CAAC;;AAEZ,SAASC,YAAYA,CAAE;EACrCC,SAAS,GAAG,SAAS;EACrBC,SAAS;EACTC;AACD,CAAC,EAAG;EACH,SAASC,aAAaA,CAAEC,KAAK,EAAG;IAC/B,MAAM;MAAEC;IAAQ,CAAC,GAAGD,KAAK;IAEzB,IACGH,SAAS,KAAK,MAAM,IAAII,OAAO,KAAKC,cAAI,IACxCL,SAAS,KAAK,OAAO,IAAII,OAAO,KAAKE,eAAO,EAC7C;MACDL,aAAa,CAAEJ,cAAe,CAAC;IAChC,CAAC,MAAM,IACJG,SAAS,KAAK,MAAM,IAAII,OAAO,KAAKE,eAAK,IACzCN,SAAS,KAAK,OAAO,IAAII,OAAO,KAAKC,cAAM,EAC5C;MACDJ,aAAa,CAAE,CAACJ,cAAe,CAAC;IACjC;EACD;EAEA,OACC,IAAAU,MAAA,CAAAC,aAAA,EAAAD,MAAA,CAAAE,QAAA,QACC,IAAAF,MAAA,CAAAC,aAAA;IACCE,SAAS,EAAI,oCAAoCV,SAAW,iBAAiBD,SAAW,EAAG;IAC3F,cAAa,IAAAY,QAAE,EAAE,gBAAiB,CAAG;IACrC,oBAAoB,iCAAiCX,SAAW,EAAG;IACnEY,SAAS,EAAGV,aAAe;IAC3BW,IAAI,EAAC;EAAQ,CACb,CAAC,EACF,IAAAN,MAAA,CAAAC,aAAA,EAACZ,WAAA,CAAAkB,cAAc;IACdC,EAAE,EAAI,iCAAiCf,SAAW;EAAG,GAEnD,IAAAW,QAAE,EAAE,qDAAsD,CAC7C,CACf,CAAC;AAEL","ignoreList":[]}
@@ -86,6 +86,10 @@ function SiteEditorCanvas({
86
86
  enableResizing: enableResizing,
87
87
  settings: settings,
88
88
  onClick: onClick
89
- }, resizeObserver))));
89
+ },
90
+ // Avoid resize listeners when not needed,
91
+ // these will trigger unnecessary re-renders
92
+ // when animating the iframe width.
93
+ enableResizing && resizeObserver))));
90
94
  }
91
95
  //# sourceMappingURL=site-editor-canvas.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_classnames","_interopRequireDefault","require","_data","_compose","_blockEditor","_resizableEditor","_editorCanvas","_editorCanvasContainer","_useSiteEditorSettings","_store","_constants","_lockUnlock","_router","useLocation","unlock","routerPrivateApis","SiteEditorCanvas","onClick","location","templateType","isFocusableEntity","isViewMode","isZoomOutMode","useSelect","select","getEditedPostType","getCanvasMode","editSiteStore","__unstableGetEditorMode","blockEditorStore","_templateType","FOCUSABLE_ENTITIES","includes","isFocusMode","params","focusMode","resizeObserver","sizes","useResizeObserver","settings","useSiteEditorSettings","isMobileViewport","useViewportMatch","enableResizing","TEMPLATE_POST_TYPE","isTemplateTypeNavigation","NAVIGATION_POST_TYPE","isNavigationFocusMode","forceFullHeight","_react","createElement","default","Slot","editorCanvasView","className","classnames","height"],"sources":["@wordpress/edit-site/src/components/block-editor/site-editor-canvas.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { useViewportMatch, useResizeObserver } from '@wordpress/compose';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport ResizableEditor from './resizable-editor';\nimport EditorCanvas from './editor-canvas';\nimport EditorCanvasContainer from '../editor-canvas-container';\nimport useSiteEditorSettings from './use-site-editor-settings';\nimport { store as editSiteStore } from '../../store';\nimport {\n\tFOCUSABLE_ENTITIES,\n\tNAVIGATION_POST_TYPE,\n\tTEMPLATE_POST_TYPE,\n} from '../../utils/constants';\nimport { unlock } from '../../lock-unlock';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\nconst { useLocation } = unlock( routerPrivateApis );\n\nexport default function SiteEditorCanvas( { onClick } ) {\n\tconst location = useLocation();\n\tconst { templateType, isFocusableEntity, isViewMode, isZoomOutMode } =\n\t\tuseSelect( ( select ) => {\n\t\t\tconst { getEditedPostType, getCanvasMode } = unlock(\n\t\t\t\tselect( editSiteStore )\n\t\t\t);\n\t\t\tconst { __unstableGetEditorMode } = select( blockEditorStore );\n\t\t\tconst _templateType = getEditedPostType();\n\n\t\t\treturn {\n\t\t\t\ttemplateType: _templateType,\n\t\t\t\tisFocusableEntity: FOCUSABLE_ENTITIES.includes( _templateType ),\n\t\t\t\tisViewMode: getCanvasMode() === 'view',\n\t\t\t\tisZoomOutMode: __unstableGetEditorMode() === 'zoom-out',\n\t\t\t};\n\t\t}, [] );\n\tconst isFocusMode = location.params.focusMode || isFocusableEntity;\n\tconst [ resizeObserver, sizes ] = useResizeObserver();\n\n\tconst settings = useSiteEditorSettings();\n\n\tconst isMobileViewport = useViewportMatch( 'small', '<' );\n\tconst enableResizing =\n\t\tisFocusMode &&\n\t\t! isViewMode &&\n\t\t// Disable resizing in mobile viewport.\n\t\t! isMobileViewport &&\n\t\t// Dsiable resizing in zoomed-out mode.\n\t\t! isZoomOutMode &&\n\t\t// Disable resizing when editing a template in focus mode.\n\t\ttemplateType !== TEMPLATE_POST_TYPE;\n\n\tconst isTemplateTypeNavigation = templateType === NAVIGATION_POST_TYPE;\n\tconst isNavigationFocusMode = isTemplateTypeNavigation && isFocusMode;\n\tconst forceFullHeight = isNavigationFocusMode;\n\n\treturn (\n\t\t<EditorCanvasContainer.Slot>\n\t\t\t{ ( [ editorCanvasView ] ) =>\n\t\t\t\teditorCanvasView ? (\n\t\t\t\t\t<div className=\"edit-site-visual-editor is-focus-mode\">\n\t\t\t\t\t\t{ editorCanvasView }\n\t\t\t\t\t</div>\n\t\t\t\t) : (\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={ classnames( 'edit-site-visual-editor', {\n\t\t\t\t\t\t\t'is-focus-mode': isFocusMode || !! editorCanvasView,\n\t\t\t\t\t\t\t'is-view-mode': isViewMode,\n\t\t\t\t\t\t} ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t<ResizableEditor\n\t\t\t\t\t\t\tenableResizing={ enableResizing }\n\t\t\t\t\t\t\theight={\n\t\t\t\t\t\t\t\tsizes.height && ! forceFullHeight\n\t\t\t\t\t\t\t\t\t? sizes.height\n\t\t\t\t\t\t\t\t\t: '100%'\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<EditorCanvas\n\t\t\t\t\t\t\t\tenableResizing={ enableResizing }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EhC;IACjB,CAAE;EAAG,GAEL,IAAA4B,MAAA,CAAAC,aAAA,EAAC7C,gBAAA,CAAA8C,OAAe;IACfR,cAAc,EAAGA,cAAgB;IACjCa,MAAM,EACLnB,KAAK,CAACmB,MAAM,IAAI,CAAER,eAAe,GAC9BX,KAAK,CAACmB,MAAM,GACZ;EACH,GAED,IAAAP,MAAA,CAAAC,aAAA,EAAC5C,aAAA,CAAA6C,OAAY;IACZR,cAAc,EAAGA,cAAgB;IACjCJ,QAAQ,EAAGA,QAAU;IACrBtB,OAAO,EAAGA;EAAS,GAEjBmB,cACW,CACE,CACb,CAGoB,CAAC;AAE/B"}
1
+ {"version":3,"names":["_classnames","_interopRequireDefault","require","_data","_compose","_blockEditor","_resizableEditor","_editorCanvas","_editorCanvasContainer","_useSiteEditorSettings","_store","_constants","_lockUnlock","_router","useLocation","unlock","routerPrivateApis","SiteEditorCanvas","onClick","location","templateType","isFocusableEntity","isViewMode","isZoomOutMode","useSelect","select","getEditedPostType","getCanvasMode","editSiteStore","__unstableGetEditorMode","blockEditorStore","_templateType","FOCUSABLE_ENTITIES","includes","isFocusMode","params","focusMode","resizeObserver","sizes","useResizeObserver","settings","useSiteEditorSettings","isMobileViewport","useViewportMatch","enableResizing","TEMPLATE_POST_TYPE","isTemplateTypeNavigation","NAVIGATION_POST_TYPE","isNavigationFocusMode","forceFullHeight","_react","createElement","default","Slot","editorCanvasView","className","classnames","height"],"sources":["@wordpress/edit-site/src/components/block-editor/site-editor-canvas.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { useViewportMatch, useResizeObserver } from '@wordpress/compose';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport ResizableEditor from './resizable-editor';\nimport EditorCanvas from './editor-canvas';\nimport EditorCanvasContainer from '../editor-canvas-container';\nimport useSiteEditorSettings from './use-site-editor-settings';\nimport { store as editSiteStore } from '../../store';\nimport {\n\tFOCUSABLE_ENTITIES,\n\tNAVIGATION_POST_TYPE,\n\tTEMPLATE_POST_TYPE,\n} from '../../utils/constants';\nimport { unlock } from '../../lock-unlock';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\nconst { useLocation } = unlock( routerPrivateApis );\n\nexport default function SiteEditorCanvas( { onClick } ) {\n\tconst location = useLocation();\n\tconst { templateType, isFocusableEntity, isViewMode, isZoomOutMode } =\n\t\tuseSelect( ( select ) => {\n\t\t\tconst { getEditedPostType, getCanvasMode } = unlock(\n\t\t\t\tselect( editSiteStore )\n\t\t\t);\n\t\t\tconst { __unstableGetEditorMode } = select( blockEditorStore );\n\t\t\tconst _templateType = getEditedPostType();\n\n\t\t\treturn {\n\t\t\t\ttemplateType: _templateType,\n\t\t\t\tisFocusableEntity: FOCUSABLE_ENTITIES.includes( _templateType ),\n\t\t\t\tisViewMode: getCanvasMode() === 'view',\n\t\t\t\tisZoomOutMode: __unstableGetEditorMode() === 'zoom-out',\n\t\t\t};\n\t\t}, [] );\n\tconst isFocusMode = location.params.focusMode || isFocusableEntity;\n\tconst [ resizeObserver, sizes ] = useResizeObserver();\n\n\tconst settings = useSiteEditorSettings();\n\n\tconst isMobileViewport = useViewportMatch( 'small', '<' );\n\tconst enableResizing =\n\t\tisFocusMode &&\n\t\t! isViewMode &&\n\t\t// Disable resizing in mobile viewport.\n\t\t! isMobileViewport &&\n\t\t// Dsiable resizing in zoomed-out mode.\n\t\t! isZoomOutMode &&\n\t\t// Disable resizing when editing a template in focus mode.\n\t\ttemplateType !== TEMPLATE_POST_TYPE;\n\n\tconst isTemplateTypeNavigation = templateType === NAVIGATION_POST_TYPE;\n\tconst isNavigationFocusMode = isTemplateTypeNavigation && isFocusMode;\n\tconst forceFullHeight = isNavigationFocusMode;\n\n\treturn (\n\t\t<EditorCanvasContainer.Slot>\n\t\t\t{ ( [ editorCanvasView ] ) =>\n\t\t\t\teditorCanvasView ? (\n\t\t\t\t\t<div className=\"edit-site-visual-editor is-focus-mode\">\n\t\t\t\t\t\t{ editorCanvasView }\n\t\t\t\t\t</div>\n\t\t\t\t) : (\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={ classnames( 'edit-site-visual-editor', {\n\t\t\t\t\t\t\t'is-focus-mode': isFocusMode || !! editorCanvasView,\n\t\t\t\t\t\t\t'is-view-mode': isViewMode,\n\t\t\t\t\t\t} ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t<ResizableEditor\n\t\t\t\t\t\t\tenableResizing={ enableResizing }\n\t\t\t\t\t\t\theight={\n\t\t\t\t\t\t\t\tsizes.height && ! forceFullHeight\n\t\t\t\t\t\t\t\t\t? sizes.height\n\t\t\t\t\t\t\t\t\t: '100%'\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<EditorCanvas\n\t\t\t\t\t\t\t\tenableResizing={ enableResizing }\n\t\t\t\t\t\t\t\tsettings={ settings }\n\t\t\t\t\t\t\t\tonClick={ onClick }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t// Avoid resize listeners when not needed,\n\t\t\t\t\t\t\t\t\t// these will trigger unnecessary re-renders\n\t\t\t\t\t\t\t\t\t// when animating the iframe width.\n\t\t\t\t\t\t\t\t\tenableResizing && resizeObserver\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t</EditorCanvas>\n\t\t\t\t\t\t</ResizableEditor>\n\t\t\t\t\t</div>\n\t\t\t\t)\n\t\t\t}\n\t\t</EditorCanvasContainer.Slot>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAIA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AAKA,IAAAI,gBAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,aAAA,GAAAN,sBAA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unlock","routerPrivateApis","useNavigateToEntityRecord","history","onNavigateToEntityRecord","useCallback","params","push","focusMode","canvas"],"sources":["@wordpress/edit-site/src/components/block-editor/use-navigate-to-entity-record.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\nimport { useCallback } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\nconst { useHistory } = unlock( routerPrivateApis );\n\nexport default function useNavigateToEntityRecord() {\n\tconst history = useHistory();\n\n\tconst onNavigateToEntityRecord = useCallback(\n\t\t( params ) => {\n\t\t\thistory.push( { ...params, focusMode: true, canvas: 'edit' } );\n\t\t},\n\t\t[ history ]\n\t);\n\n\treturn onNavigateToEntityRecord;\n}\n"],"mappings":";;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AAKA,IAAAE,WAAA,GAAAF,OAAA;AATA;AACA;AACA;;AAIA;AACA;AACA;;AAGA,MAAM;EAAEG;AAAW,CAAC,GAAG,IAAAC,kBAAM,EAAEC,mBAAkB,CAAC;AAEnC,SAASC,yBAAyBA,CAAA,EAAG;EACnD,MAAMC,OAAO,GAAGJ,UAAU,CAAC,CAAC;EAE5B,MAAMK,wBAAwB,GAAG,IAAAC,oBAAW,EACzCC,MAAM,IAAM;IACbH,OAAO,CAACI,IAAI,CAAE;MAAE,GAAGD,MAAM;MAAEE,SAAS,EAAE,IAAI;MAAEC,MAAM,EAAE;IAAO,CAAE,CAAC;EAC/D,CAAC,EACD,CAAEN,OAAO,CACV,CAAC;EAED,OAAOC,wBAAwB;AAChC"}
1
+ {"version":3,"names":["_router","require","_element","_lockUnlock","useHistory","unlock","routerPrivateApis","useNavigateToEntityRecord","history","onNavigateToEntityRecord","useCallback","params","push","focusMode","canvas"],"sources":["@wordpress/edit-site/src/components/block-editor/use-navigate-to-entity-record.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\nimport { useCallback } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\nconst { useHistory } = unlock( routerPrivateApis );\n\nexport default function useNavigateToEntityRecord() {\n\tconst history = useHistory();\n\n\tconst onNavigateToEntityRecord = useCallback(\n\t\t( params ) => {\n\t\t\thistory.push( { ...params, focusMode: true, canvas: 'edit' } );\n\t\t},\n\t\t[ history ]\n\t);\n\n\treturn onNavigateToEntityRecord;\n}\n"],"mappings":";;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AAKA,IAAAE,WAAA,GAAAF,OAAA;AATA;AACA;AACA;;AAIA;AACA;AACA;;AAGA,MAAM;EAAEG;AAAW,CAAC,GAAG,IAAAC,kBAAM,EAAEC,mBAAkB,CAAC;AAEnC,SAASC,yBAAyBA,CAAA,EAAG;EACnD,MAAMC,OAAO,GAAGJ,UAAU,CAAC,CAAC;EAE5B,MAAMK,wBAAwB,GAAG,IAAAC,oBAAW,EACzCC,MAAM,IAAM;IACbH,OAAO,CAACI,IAAI,CAAE;MAAE,GAAGD,MAAM;MAAEE,SAAS,EAAE,IAAI;MAAEC,MAAM,EAAE;IAAO,CAAE,CAAC;EAC/D,CAAC,EACD,CAAEN,OAAO,CACV,CAAC;EAED,OAAOC,wBAAwB;AAChC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_data","require","_element","_coreData","_editor","_router","_compose","_store","_lockUnlock","_useNavigateToEntityRecord","_interopRequireDefault","_constants","useBlockEditorSettings","unlock","editorPrivateApis","useLocation","useHistory","routerPrivateApis","useArchiveLabel","templateSlug","taxonomyMatches","match","taxonomy","term","isAuthor","authorSlug","authorMatches","useSelect","select","getEntityRecords","getTaxonomy","getAuthors","coreStore","archiveTypeLabel","archiveNameLabel","labels","singular_name","records","slug","per_page","name","authorRecords","useNavigateToPreviousEntityRecord","location","previousLocation","usePrevious","history","goBack","useMemo","isFocusMode","params","focusMode","postId","FOCUSABLE_ENTITIES","includes","postType","didComeFromEditorCanvas","canvas","showBackButton","back","undefined","useSpecificEditorSettings","onNavigateToEntityRecord","useNavigateToEntityRecord","canvasMode","settings","postWithTemplate","getEditedPostType","getEditedPostId","getEditedPostContext","getCanvasMode","getSettings","editSiteStore","getEditedEntityRecord","usedPostType","usedPostId","_record","_context","archiveLabels","defaultRenderingMode","onNavigateToPreviousEntityRecord","defaultEditorSettings","richEditingEnabled","supportsTemplateMode","__experimentalArchiveTitleTypeLabel","__experimentalArchiveTitleNameLabel","__unstableIsPreviewMode","useSiteEditorSettings"],"sources":["@wordpress/edit-site/src/components/block-editor/use-site-editor-settings.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { useMemo } from '@wordpress/element';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { privateApis as editorPrivateApis } from '@wordpress/editor';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\nimport { usePrevious } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\nimport useNavigateToEntityRecord from './use-navigate-to-entity-record';\nimport { FOCUSABLE_ENTITIES } from '../../utils/constants';\n\nconst { useBlockEditorSettings } = unlock( editorPrivateApis );\nconst { useLocation, useHistory } = unlock( routerPrivateApis );\n\nfunction useArchiveLabel( templateSlug ) {\n\tconst taxonomyMatches = templateSlug?.match(\n\t\t/^(category|tag|taxonomy-([^-]+))$|^(((category|tag)|taxonomy-([^-]+))-(.+))$/\n\t);\n\tlet taxonomy;\n\tlet term;\n\tlet isAuthor = false;\n\tlet authorSlug;\n\tif ( taxonomyMatches ) {\n\t\t// If is for a all taxonomies of a type\n\t\tif ( taxonomyMatches[ 1 ] ) {\n\t\t\ttaxonomy = taxonomyMatches[ 2 ]\n\t\t\t\t? taxonomyMatches[ 2 ]\n\t\t\t\t: taxonomyMatches[ 1 ];\n\t\t}\n\t\t// If is for a all taxonomies of a type\n\t\telse if ( taxonomyMatches[ 3 ] ) {\n\t\t\ttaxonomy = taxonomyMatches[ 6 ]\n\t\t\t\t? taxonomyMatches[ 6 ]\n\t\t\t\t: taxonomyMatches[ 4 ];\n\t\t\tterm = taxonomyMatches[ 7 ];\n\t\t}\n\t\ttaxonomy = taxonomy === 'tag' ? 'post_tag' : taxonomy;\n\n\t\t//getTaxonomy( 'category' );\n\t\t//wp.data.select('core').getEntityRecords( 'taxonomy', 'category', {slug: 'newcat'} );\n\t} else {\n\t\tconst authorMatches = templateSlug?.match( /^(author)$|^author-(.+)$/ );\n\t\tif ( authorMatches ) {\n\t\t\tisAuthor = true;\n\t\t\tif ( authorMatches[ 2 ] ) {\n\t\t\t\tauthorSlug = authorMatches[ 2 ];\n\t\t\t}\n\t\t}\n\t}\n\treturn useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEntityRecords, getTaxonomy, getAuthors } =\n\t\t\t\tselect( coreStore );\n\t\t\tlet archiveTypeLabel;\n\t\t\tlet archiveNameLabel;\n\t\t\tif ( taxonomy ) {\n\t\t\t\tarchiveTypeLabel =\n\t\t\t\t\tgetTaxonomy( taxonomy )?.labels?.singular_name;\n\t\t\t}\n\t\t\tif ( term ) {\n\t\t\t\tconst records = getEntityRecords( 'taxonomy', taxonomy, {\n\t\t\t\t\tslug: term,\n\t\t\t\t\tper_page: 1,\n\t\t\t\t} );\n\t\t\t\tif ( records && records[ 0 ] ) {\n\t\t\t\t\tarchiveNameLabel = records[ 0 ].name;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( isAuthor ) {\n\t\t\t\tarchiveTypeLabel = 'Author';\n\t\t\t\tif ( authorSlug ) {\n\t\t\t\t\tconst authorRecords = getAuthors( { slug: authorSlug } );\n\t\t\t\t\tif ( authorRecords && authorRecords[ 0 ] ) {\n\t\t\t\t\t\tarchiveNameLabel = authorRecords[ 0 ].name;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn {\n\t\t\t\tarchiveTypeLabel,\n\t\t\t\tarchiveNameLabel,\n\t\t\t};\n\t\t},\n\t\t[ authorSlug, isAuthor, taxonomy, term ]\n\t);\n}\n\nfunction useNavigateToPreviousEntityRecord() {\n\tconst location = useLocation();\n\tconst previousLocation = usePrevious( location );\n\tconst history = useHistory();\n\tconst goBack = useMemo( () => {\n\t\tconst isFocusMode =\n\t\t\tlocation.params.focusMode ||\n\t\t\t( location.params.postId &&\n\t\t\t\tFOCUSABLE_ENTITIES.includes( location.params.postType ) );\n\t\tconst didComeFromEditorCanvas =\n\t\t\tpreviousLocation?.params.canvas === 'edit';\n\t\tconst showBackButton = isFocusMode && didComeFromEditorCanvas;\n\t\treturn showBackButton ? () => history.back() : undefined;\n\t\t// Disable reason: previousLocation changes when the component updates for any reason, not\n\t\t// just when location changes. Until this is fixed we can't add it to deps. See\n\t\t// https://github.com/WordPress/gutenberg/pull/58710#discussion_r1479219465.\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [ location, history ] );\n\treturn goBack;\n}\n\nexport function useSpecificEditorSettings() {\n\tconst onNavigateToEntityRecord = useNavigateToEntityRecord();\n\tconst { templateSlug, canvasMode, settings, postWithTemplate } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetEditedPostType,\n\t\t\t\tgetEditedPostId,\n\t\t\t\tgetEditedPostContext,\n\t\t\t\tgetCanvasMode,\n\t\t\t\tgetSettings,\n\t\t\t} = unlock( select( editSiteStore ) );\n\t\t\tconst { getEditedEntityRecord } = select( coreStore );\n\t\t\tconst usedPostType = getEditedPostType();\n\t\t\tconst usedPostId = getEditedPostId();\n\t\t\tconst _record = getEditedEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\tusedPostType,\n\t\t\t\tusedPostId\n\t\t\t);\n\t\t\tconst _context = getEditedPostContext();\n\t\t\treturn {\n\t\t\t\ttemplateSlug: _record.slug,\n\t\t\t\tcanvasMode: getCanvasMode(),\n\t\t\t\tsettings: getSettings(),\n\t\t\t\tpostWithTemplate: _context?.postId,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\tconst archiveLabels = useArchiveLabel( templateSlug );\n\tconst defaultRenderingMode = postWithTemplate\n\t\t? 'template-locked'\n\t\t: 'post-only';\n\tconst onNavigateToPreviousEntityRecord =\n\t\tuseNavigateToPreviousEntityRecord();\n\tconst defaultEditorSettings = useMemo( () => {\n\t\treturn {\n\t\t\t...settings,\n\n\t\t\trichEditingEnabled: true,\n\t\t\tsupportsTemplateMode: true,\n\t\t\tfocusMode: canvasMode !== 'view',\n\t\t\tdefaultRenderingMode,\n\t\t\tonNavigateToEntityRecord,\n\t\t\tonNavigateToPreviousEntityRecord,\n\t\t\t// I wonder if they should be set in the post editor too\n\t\t\t__experimentalArchiveTitleTypeLabel: archiveLabels.archiveTypeLabel,\n\t\t\t__experimentalArchiveTitleNameLabel: archiveLabels.archiveNameLabel,\n\t\t\t__unstableIsPreviewMode: canvasMode === 'view',\n\t\t};\n\t}, [\n\t\tsettings,\n\t\tcanvasMode,\n\t\tdefaultRenderingMode,\n\t\tonNavigateToEntityRecord,\n\t\tonNavigateToPreviousEntityRecord,\n\t\tarchiveLabels.archiveTypeLabel,\n\t\tarchiveLabels.archiveNameLabel,\n\t] );\n\n\treturn defaultEditorSettings;\n}\n\nexport default function useSiteEditorSettings() {\n\tconst defaultEditorSettings = useSpecificEditorSettings();\n\tconst { postType, postId } = useSelect( ( select ) => {\n\t\tconst { getEditedPostType, getEditedPostId } = unlock(\n\t\t\tselect( editSiteStore )\n\t\t);\n\t\tconst usedPostType = getEditedPostType();\n\t\tconst usedPostId = getEditedPostId();\n\t\treturn {\n\t\t\tpostType: usedPostType,\n\t\t\tpostId: usedPostId,\n\t\t};\n\t}, [] );\n\treturn useBlockEditorSettings( defaultEditorSettings, postType, postId );\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,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,CAAE4C,YAAc,CACvB,CAAC;IACD,MAAME,YAAY,GAAGP,iBAAiB,CAAC,CAAC;IACxC,MAAMQ,UAAU,GAAGP,eAAe,CAAC,CAAC;IACpC,OAAO;MACNb,QAAQ,EAAEmB,YAAY;MACtBtB,MAAM,EAAEuB;IACT,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;EACP,OAAO/D,sBAAsB,CAAEqE,qBAAqB,EAAE1B,QAAQ,EAAEH,MAAO,CAAC;AACzE"}
1
+ {"version":3,"names":["_data","require","_element","_coreData","_editor","_router","_compose","_store","_lockUnlock","_useNavigateToEntityRecord","_interopRequireDefault","_constants","useBlockEditorSettings","unlock","editorPrivateApis","useLocation","useHistory","routerPrivateApis","useArchiveLabel","templateSlug","taxonomyMatches","match","taxonomy","term","isAuthor","authorSlug","authorMatches","useSelect","select","getEntityRecords","getTaxonomy","getAuthors","coreStore","archiveTypeLabel","archiveNameLabel","labels","singular_name","records","slug","per_page","name","authorRecords","useNavigateToPreviousEntityRecord","location","previousLocation","usePrevious","history","goBack","useMemo","isFocusMode","params","focusMode","postId","FOCUSABLE_ENTITIES","includes","postType","didComeFromEditorCanvas","canvas","showBackButton","back","undefined","useSpecificEditorSettings","onNavigateToEntityRecord","useNavigateToEntityRecord","canvasMode","settings","postWithTemplate","getEditedPostType","getEditedPostId","getEditedPostContext","getCanvasMode","getSettings","editSiteStore","getEditedEntityRecord","usedPostType","usedPostId","_record","_context","archiveLabels","defaultRenderingMode","onNavigateToPreviousEntityRecord","defaultEditorSettings","richEditingEnabled","supportsTemplateMode","__experimentalArchiveTitleTypeLabel","__experimentalArchiveTitleNameLabel","__unstableIsPreviewMode","useSiteEditorSettings"],"sources":["@wordpress/edit-site/src/components/block-editor/use-site-editor-settings.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { useMemo } from '@wordpress/element';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { privateApis as editorPrivateApis } from '@wordpress/editor';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\nimport { usePrevious } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\nimport useNavigateToEntityRecord from './use-navigate-to-entity-record';\nimport { FOCUSABLE_ENTITIES } from '../../utils/constants';\n\nconst { useBlockEditorSettings } = unlock( editorPrivateApis );\nconst { useLocation, useHistory } = unlock( routerPrivateApis );\n\nfunction useArchiveLabel( templateSlug ) {\n\tconst taxonomyMatches = templateSlug?.match(\n\t\t/^(category|tag|taxonomy-([^-]+))$|^(((category|tag)|taxonomy-([^-]+))-(.+))$/\n\t);\n\tlet taxonomy;\n\tlet term;\n\tlet isAuthor = false;\n\tlet authorSlug;\n\tif ( taxonomyMatches ) {\n\t\t// If is for a all taxonomies of a type\n\t\tif ( taxonomyMatches[ 1 ] ) {\n\t\t\ttaxonomy = taxonomyMatches[ 2 ]\n\t\t\t\t? taxonomyMatches[ 2 ]\n\t\t\t\t: taxonomyMatches[ 1 ];\n\t\t}\n\t\t// If is for a all taxonomies of a type\n\t\telse if ( taxonomyMatches[ 3 ] ) {\n\t\t\ttaxonomy = taxonomyMatches[ 6 ]\n\t\t\t\t? taxonomyMatches[ 6 ]\n\t\t\t\t: taxonomyMatches[ 4 ];\n\t\t\tterm = taxonomyMatches[ 7 ];\n\t\t}\n\t\ttaxonomy = taxonomy === 'tag' ? 'post_tag' : taxonomy;\n\n\t\t//getTaxonomy( 'category' );\n\t\t//wp.data.select('core').getEntityRecords( 'taxonomy', 'category', {slug: 'newcat'} );\n\t} else {\n\t\tconst authorMatches = templateSlug?.match( /^(author)$|^author-(.+)$/ );\n\t\tif ( authorMatches ) {\n\t\t\tisAuthor = true;\n\t\t\tif ( authorMatches[ 2 ] ) {\n\t\t\t\tauthorSlug = authorMatches[ 2 ];\n\t\t\t}\n\t\t}\n\t}\n\treturn useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEntityRecords, getTaxonomy, getAuthors } =\n\t\t\t\tselect( coreStore );\n\t\t\tlet archiveTypeLabel;\n\t\t\tlet archiveNameLabel;\n\t\t\tif ( taxonomy ) {\n\t\t\t\tarchiveTypeLabel =\n\t\t\t\t\tgetTaxonomy( taxonomy )?.labels?.singular_name;\n\t\t\t}\n\t\t\tif ( term ) {\n\t\t\t\tconst records = getEntityRecords( 'taxonomy', taxonomy, {\n\t\t\t\t\tslug: term,\n\t\t\t\t\tper_page: 1,\n\t\t\t\t} );\n\t\t\t\tif ( records && records[ 0 ] ) {\n\t\t\t\t\tarchiveNameLabel = records[ 0 ].name;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( isAuthor ) {\n\t\t\t\tarchiveTypeLabel = 'Author';\n\t\t\t\tif ( authorSlug ) {\n\t\t\t\t\tconst authorRecords = getAuthors( { slug: authorSlug } );\n\t\t\t\t\tif ( authorRecords && authorRecords[ 0 ] ) {\n\t\t\t\t\t\tarchiveNameLabel = authorRecords[ 0 ].name;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn {\n\t\t\t\tarchiveTypeLabel,\n\t\t\t\tarchiveNameLabel,\n\t\t\t};\n\t\t},\n\t\t[ authorSlug, isAuthor, taxonomy, term ]\n\t);\n}\n\nfunction useNavigateToPreviousEntityRecord() {\n\tconst location = useLocation();\n\tconst previousLocation = usePrevious( location );\n\tconst history = useHistory();\n\tconst goBack = useMemo( () => {\n\t\tconst isFocusMode =\n\t\t\tlocation.params.focusMode ||\n\t\t\t( location.params.postId &&\n\t\t\t\tFOCUSABLE_ENTITIES.includes( location.params.postType ) );\n\t\tconst didComeFromEditorCanvas =\n\t\t\tpreviousLocation?.params.canvas === 'edit';\n\t\tconst showBackButton = isFocusMode && didComeFromEditorCanvas;\n\t\treturn showBackButton ? () => history.back() : undefined;\n\t\t// Disable reason: previousLocation changes when the component updates for any reason, not\n\t\t// just when location changes. Until this is fixed we can't add it to deps. See\n\t\t// https://github.com/WordPress/gutenberg/pull/58710#discussion_r1479219465.\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [ location, history ] );\n\treturn goBack;\n}\n\nexport function useSpecificEditorSettings() {\n\tconst onNavigateToEntityRecord = useNavigateToEntityRecord();\n\tconst { templateSlug, canvasMode, settings, postWithTemplate } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetEditedPostType,\n\t\t\t\tgetEditedPostId,\n\t\t\t\tgetEditedPostContext,\n\t\t\t\tgetCanvasMode,\n\t\t\t\tgetSettings,\n\t\t\t} = unlock( select( editSiteStore ) );\n\t\t\tconst { getEditedEntityRecord } = select( coreStore );\n\t\t\tconst usedPostType = getEditedPostType();\n\t\t\tconst usedPostId = getEditedPostId();\n\t\t\tconst _record = getEditedEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\tusedPostType,\n\t\t\t\tusedPostId\n\t\t\t);\n\t\t\tconst _context = getEditedPostContext();\n\t\t\treturn {\n\t\t\t\ttemplateSlug: _record.slug,\n\t\t\t\tcanvasMode: getCanvasMode(),\n\t\t\t\tsettings: getSettings(),\n\t\t\t\tpostWithTemplate: _context?.postId,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\tconst archiveLabels = useArchiveLabel( templateSlug );\n\tconst defaultRenderingMode = postWithTemplate\n\t\t? 'template-locked'\n\t\t: 'post-only';\n\tconst onNavigateToPreviousEntityRecord =\n\t\tuseNavigateToPreviousEntityRecord();\n\tconst defaultEditorSettings = useMemo( () => {\n\t\treturn {\n\t\t\t...settings,\n\n\t\t\trichEditingEnabled: true,\n\t\t\tsupportsTemplateMode: true,\n\t\t\tfocusMode: canvasMode !== 'view',\n\t\t\tdefaultRenderingMode,\n\t\t\tonNavigateToEntityRecord,\n\t\t\tonNavigateToPreviousEntityRecord,\n\t\t\t// I wonder if they should be set in the post editor too\n\t\t\t__experimentalArchiveTitleTypeLabel: archiveLabels.archiveTypeLabel,\n\t\t\t__experimentalArchiveTitleNameLabel: archiveLabels.archiveNameLabel,\n\t\t\t__unstableIsPreviewMode: canvasMode === 'view',\n\t\t};\n\t}, [\n\t\tsettings,\n\t\tcanvasMode,\n\t\tdefaultRenderingMode,\n\t\tonNavigateToEntityRecord,\n\t\tonNavigateToPreviousEntityRecord,\n\t\tarchiveLabels.archiveTypeLabel,\n\t\tarchiveLabels.archiveNameLabel,\n\t] );\n\n\treturn defaultEditorSettings;\n}\n\nexport default function useSiteEditorSettings() {\n\tconst defaultEditorSettings = useSpecificEditorSettings();\n\tconst { postType, postId } = useSelect( ( select ) => {\n\t\tconst { getEditedPostType, getEditedPostId } = unlock(\n\t\t\tselect( editSiteStore )\n\t\t);\n\t\tconst usedPostType = getEditedPostType();\n\t\tconst usedPostId = getEditedPostId();\n\t\treturn {\n\t\t\tpostType: usedPostType,\n\t\t\tpostId: usedPostId,\n\t\t};\n\t}, [] );\n\treturn useBlockEditorSettings( defaultEditorSettings, postType, postId );\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AAKA,IAAAM,MAAA,GAAAN,OAAA;AACA,IAAAO,WAAA,GAAAP,OAAA;AACA,IAAAQ,0BAAA,GAAAC,sBAAA,CAAAT,OAAA;AACA,IAAAU,UAAA,GAAAV,OAAA;AAhBA;AACA;AACA;;AAQA;AACA;AACA;;AAMA,MAAM;EAAEW;AAAuB,CAAC,GAAG,IAAAC,kBAAM,EAAEC,mBAAkB,CAAC;AAC9D,MAAM;EAAEC,WAAW;EAAEC;AAAW,CAAC,GAAG,IAAAH,kBAAM,EAAEI,mBAAkB,CAAC;AAE/D,SAASC,eAAeA,CAAEC,YAAY,EAAG;EACxC,MAAMC,eAAe,GAAGD,YAAY,EAAEE,KAAK,CAC1C,8EACD,CAAC;EACD,IAAIC,QAAQ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AK,MAAM;MAChCe,oBAAoB;MACpBjB,wBAAwB;MACxBkB,gCAAgC;MAChC;MACAI,mCAAmC,EAAEN,aAAa,CAAC7C,gBAAgB;MACnEoD,mCAAmC,EAAEP,aAAa,CAAC5C,gBAAgB;MACnEoD,uBAAuB,EAAEtB,UAAU,KAAK;IACzC,CAAC;EACF,CAAC,EAAE,CACFC,QAAQ,EACRD,UAAU,EACVe,oBAAoB,EACpBjB,wBAAwB,EACxBkB,gCAAgC,EAChCF,aAAa,CAAC7C,gBAAgB,EAC9B6C,aAAa,CAAC5C,gBAAgB,CAC7B,CAAC;EAEH,OAAO+C,qBAAqB;AAC7B;AAEe,SAASM,qBAAqBA,CAAA,EAAG;EAC/C,MAAMN,qBAAqB,GAAGpB,yBAAyB,CAAC,CAAC;EACzD,MAAM;IAAEN,QAAQ;IAAEH;EAAO,CAAC,GAAG,IAAAzB,eAAS,EAAIC,MAAM,IAAM;IACrD,MAAM;MAAEuC,iBAAiB;MAAEC;IAAgB,CAAC,GAAG,IAAAvD,kBAAM,EACpDe,MAAM,CAAE4C,YAAc,CACvB,CAAC;IACD,MAAME,YAAY,GAAGP,iBAAiB,CAAC,CAAC;IACxC,MAAMQ,UAAU,GAAGP,eAAe,CAAC,CAAC;IACpC,OAAO;MACNb,QAAQ,EAAEmB,YAAY;MACtBtB,MAAM,EAAEuB;IACT,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;EACP,OAAO/D,sBAAsB,CAAEqE,qBAAqB,EAAE1B,QAAQ,EAAEH,MAAO,CAAC;AACzE","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_blockEditor","require","_components","_coreData","_data","_lockUnlock","_hooks","ProgressBar","Theme","unlock","componentsPrivateApis","useGlobalStyle","blockEditorPrivateApis","CanvasLoader","id","_highlightedColors$0$","fallbackIndicatorColor","backgroundColor","highlightedColors","useStylesPreviewColors","indicatorColor","color","elapsed","total","useSelect","select","_selectorsByStatus$re","_selectorsByStatus$fi","selectorsByStatus","coreStore","countSelectorsByStatus","resolving","finished","_react","createElement","className","accent","background","max","value"],"sources":["@wordpress/edit-site/src/components/canvas-loader/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { privateApis as componentsPrivateApis } from '@wordpress/components';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { useStylesPreviewColors } from '../global-styles/hooks';\n\nconst { ProgressBar, Theme } = unlock( componentsPrivateApis );\nconst { useGlobalStyle } = unlock( blockEditorPrivateApis );\n\nexport default function CanvasLoader( { id } ) {\n\tconst [ fallbackIndicatorColor ] = useGlobalStyle( 'color.text' );\n\tconst [ backgroundColor ] = useGlobalStyle( 'color.background' );\n\tconst { highlightedColors } = useStylesPreviewColors();\n\tconst indicatorColor =\n\t\thighlightedColors[ 0 ]?.color ?? fallbackIndicatorColor;\n\tconst { elapsed, total } = useSelect( ( select ) => {\n\t\tconst selectorsByStatus = select( coreStore ).countSelectorsByStatus();\n\t\tconst resolving = selectorsByStatus.resolving ?? 0;\n\t\tconst finished = selectorsByStatus.finished ?? 0;\n\t\treturn {\n\t\t\telapsed: finished,\n\t\t\ttotal: finished + resolving,\n\t\t};\n\t}, [] );\n\n\treturn (\n\t\t<div className=\"edit-site-canvas-loader\">\n\t\t\t<Theme accent={ indicatorColor } background={ backgroundColor }>\n\t\t\t\t<ProgressBar id={ id } max={ total } value={ elapsed } />\n\t\t\t</Theme>\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AAKA,IAAAI,WAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AAZA;AACA;AACA;;AAMA;AACA;AACA;;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GpB;EAAiB,GAC9D,IAAAgB,MAAA,CAAAC,aAAA,EAAC3B,WAAW;IAACO,EAAE,EAAGA,EAAI;IAACwB,GAAG,EAAGf,KAAO;IAACgB,KAAK,EAAGjB;EAAS,CAAE,CAClD,CACH,CAAC;AAER"}
1
+ {"version":3,"names":["_blockEditor","require","_components","_coreData","_data","_lockUnlock","_hooks","ProgressBar","Theme","unlock","componentsPrivateApis","useGlobalStyle","blockEditorPrivateApis","CanvasLoader","id","_highlightedColors$0$","fallbackIndicatorColor","backgroundColor","highlightedColors","useStylesPreviewColors","indicatorColor","color","elapsed","total","useSelect","select","_selectorsByStatus$re","_selectorsByStatus$fi","selectorsByStatus","coreStore","countSelectorsByStatus","resolving","finished","_react","createElement","className","accent","background","max","value"],"sources":["@wordpress/edit-site/src/components/canvas-loader/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { privateApis as componentsPrivateApis } from '@wordpress/components';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { useStylesPreviewColors } from '../global-styles/hooks';\n\nconst { ProgressBar, Theme } = unlock( componentsPrivateApis );\nconst { useGlobalStyle } = unlock( blockEditorPrivateApis );\n\nexport default function CanvasLoader( { id } ) {\n\tconst [ fallbackIndicatorColor ] = useGlobalStyle( 'color.text' );\n\tconst [ backgroundColor ] = useGlobalStyle( 'color.background' );\n\tconst { highlightedColors } = useStylesPreviewColors();\n\tconst indicatorColor =\n\t\thighlightedColors[ 0 ]?.color ?? fallbackIndicatorColor;\n\tconst { elapsed, total } = useSelect( ( select ) => {\n\t\tconst selectorsByStatus = select( coreStore ).countSelectorsByStatus();\n\t\tconst resolving = selectorsByStatus.resolving ?? 0;\n\t\tconst finished = selectorsByStatus.finished ?? 0;\n\t\treturn {\n\t\t\telapsed: finished,\n\t\t\ttotal: finished + resolving,\n\t\t};\n\t}, [] );\n\n\treturn (\n\t\t<div className=\"edit-site-canvas-loader\">\n\t\t\t<Theme accent={ indicatorColor } background={ backgroundColor }>\n\t\t\t\t<ProgressBar id={ id } max={ total } value={ elapsed } />\n\t\t\t</Theme>\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AAKA,IAAAI,WAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AAZA;AACA;AACA;;AAMA;AACA;AACA;;AAIA,MAAM;EAAEM,WAAW;EAAEC;AAAM,CAAC,GAAG,IAAAC,kBAAM,EAAEC,uBAAsB,CAAC;AAC9D,MAAM;EAAEC;AAAe,CAAC,GAAG,IAAAF,kBAAM,EAAEG,wBAAuB,CAAC;AAE5C,SAASC,YAAYA,CAAE;EAAEC;AAAG,CAAC,EAAG;EAAA,IAAAC,qBAAA;EAC9C,MAAM,CAAEC,sBAAsB,CAAE,GAAGL,cAAc,CAAE,YAAa,CAAC;EACjE,MAAM,CAAEM,eAAe,CAAE,GAAGN,cAAc,CAAE,kBAAmB,CAAC;EAChE,MAAM;IAAEO;EAAkB,CAAC,GAAG,IAAAC,6BAAsB,EAAC,CAAC;EACtD,MAAMC,cAAc,IAAAL,qBAAA,GACnBG,iBAAiB,CAAE,CAAC,CAAE,EAAEG,KAAK,cAAAN,qBAAA,cAAAA,qBAAA,GAAIC,sBAAsB;EACxD,MAAM;IAAEM,OAAO;IAAEC;EAAM,CAAC,GAAG,IAAAC,eAAS,EAAIC,MAAM,IAAM;IAAA,IAAAC,qBAAA,EAAAC,qBAAA;IACnD,MAAMC,iBAAiB,GAAGH,MAAM,CAAEI,eAAU,CAAC,CAACC,sBAAsB,CAAC,CAAC;IACtE,MAAMC,SAAS,IAAAL,qBAAA,GAAGE,iBAAiB,CAACG,SAAS,cAAAL,qBAAA,cAAAA,qBAAA,GAAI,CAAC;IAClD,MAAMM,QAAQ,IAAAL,qBAAA,GAAGC,iBAAiB,CAACI,QAAQ,cAAAL,qBAAA,cAAAA,qBAAA,GAAI,CAAC;IAChD,OAAO;MACNL,OAAO,EAAEU,QAAQ;MACjBT,KAAK,EAAES,QAAQ,GAAGD;IACnB,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;EAEP,OACC,IAAAE,MAAA,CAAAC,aAAA;IAAKC,SAAS,EAAC;EAAyB,GACvC,IAAAF,MAAA,CAAAC,aAAA,EAAC1B,KAAK;IAAC4B,MAAM,EAAGhB,cAAgB;IAACiB,UAAU,EAAGpB;EAAiB,GAC9D,IAAAgB,MAAA,CAAAC,aAAA,EAAC3B,WAAW;IAACO,EAAE,EAAGA,EAAI;IAACwB,GAAG,EAAGf,KAAO;IAACgB,KAAK,EAAGjB;EAAS,CAAE,CAClD,CACH,CAAC;AAER","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_reactAutosizeTextarea","_interopRequireDefault","require","_blocks","_coreData","_data","_keyboardShortcuts","_i18n","_components","_element","_compose","_editor","_store","CodeEditor","instanceId","useInstanceId","shortcut","content","blocks","type","id","useSelect","select","getEditedEntityRecord","coreStore","getEditedPostType","getEditedPostId","editSiteStore","getShortcutRepresentation","keyboardShortcutsStore","_type","_id","editedRecord","editEntityRecord","useDispatch","realContent","useMemo","Function","__unstableSerializeAndClean","switchEditorMode","editorStore","_react","createElement","className","__","Button","variant","onClick","VisuallyHidden","as","htmlFor","default","autoComplete","dir","value","onChange","event","target","undefined","selection","placeholder"],"sources":["@wordpress/edit-site/src/components/code-editor/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport Textarea from 'react-autosize-textarea';\n\n/**\n * WordPress dependencies\n */\nimport { __unstableSerializeAndClean } from '@wordpress/blocks';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\nimport { __ } from '@wordpress/i18n';\nimport { Button, VisuallyHidden } from '@wordpress/components';\nimport { useMemo } from '@wordpress/element';\nimport { useInstanceId } from '@wordpress/compose';\nimport { store as editorStore } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\n\nexport default function CodeEditor() {\n\tconst instanceId = useInstanceId( CodeEditor );\n\tconst { shortcut, content, blocks, type, id } = useSelect( ( select ) => {\n\t\tconst { getEditedEntityRecord } = select( coreStore );\n\t\tconst { getEditedPostType, getEditedPostId } = select( editSiteStore );\n\t\tconst { getShortcutRepresentation } = select( keyboardShortcutsStore );\n\t\tconst _type = getEditedPostType();\n\t\tconst _id = getEditedPostId();\n\t\tconst editedRecord = getEditedEntityRecord( 'postType', _type, _id );\n\n\t\treturn {\n\t\t\tshortcut: getShortcutRepresentation( 'core/editor/toggle-mode' ),\n\t\t\tcontent: editedRecord?.content,\n\t\t\tblocks: editedRecord?.blocks,\n\t\t\ttype: _type,\n\t\t\tid: _id,\n\t\t};\n\t}, [] );\n\tconst { editEntityRecord } = useDispatch( coreStore );\n\t// Replicates the logic found in getEditedPostContent().\n\tconst realContent = useMemo( () => {\n\t\tif ( content instanceof Function ) {\n\t\t\treturn content( { blocks } );\n\t\t} else if ( blocks ) {\n\t\t\t// If we have parsed blocks already, they should be our source of truth.\n\t\t\t// Parsing applies block deprecations and legacy block conversions that\n\t\t\t// unparsed content will not have.\n\t\t\treturn __unstableSerializeAndClean( blocks );\n\t\t}\n\t\treturn content;\n\t}, [ content, blocks ] );\n\n\tconst { switchEditorMode } = useDispatch( editorStore );\n\treturn (\n\t\t<div className=\"edit-site-code-editor\">\n\t\t\t<div className=\"edit-site-code-editor__toolbar\">\n\t\t\t\t<h2>{ __( 'Editing code' ) }</h2>\n\t\t\t\t<Button\n\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\tonClick={ () => switchEditorMode( 'visual' ) }\n\t\t\t\t\tshortcut={ shortcut }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Exit code editor' ) }\n\t\t\t\t</Button>\n\t\t\t</div>\n\t\t\t<div className=\"edit-site-code-editor__body\">\n\t\t\t\t<VisuallyHidden\n\t\t\t\t\tas=\"label\"\n\t\t\t\t\thtmlFor={ `code-editor-text-area-${ instanceId }` }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Type text or HTML' ) }\n\t\t\t\t</VisuallyHidden>\n\t\t\t\t<Textarea\n\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\tdir=\"auto\"\n\t\t\t\t\tvalue={ realContent }\n\t\t\t\t\tonChange={ ( event ) => {\n\t\t\t\t\t\teditEntityRecord( 'postType', type, id, {\n\t\t\t\t\t\t\tcontent: event.target.value,\n\t\t\t\t\t\t\tblocks: undefined,\n\t\t\t\t\t\t\tselection: undefined,\n\t\t\t\t\t\t} );\n\t\t\t\t\t} }\n\t\t\t\t\tclassName=\"edit-site-code-editor-text-area\"\n\t\t\t\t\tid={ `code-editor-text-area-${ instanceId }` }\n\t\t\t\t\tplaceholder={ __( 'Start writing with text or HTML' ) }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,sBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,kBAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,WAAA,GAAAN,OAAA;AACA,IAAAO,QAAA,GAAAP,OAAA;AACA,IAAAQ,QAAA,GAAAR,OAAA;AACA,IAAAS,OAAA,GAAAT,OAAA;AAKA,IAAAU,MAAA,GAAAV,OAAA;AArBA;AACA;AACA;;AAGA;AACA;AACA;;AAWA;AACA;AACA;;AAGe,SAASW,UAAUA,CAAA,EAAG;EACpC,MAAMC,UA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AutosizeTextarea","_interopRequireDefault","require","_blocks","_coreData","_data","_keyboardShortcuts","_i18n","_components","_element","_compose","_editor","_store","CodeEditor","instanceId","useInstanceId","shortcut","content","blocks","type","id","useSelect","select","getEditedEntityRecord","coreStore","getEditedPostType","getEditedPostId","editSiteStore","getShortcutRepresentation","keyboardShortcutsStore","_type","_id","editedRecord","editEntityRecord","useDispatch","realContent","useMemo","Function","__unstableSerializeAndClean","switchEditorMode","editorStore","_react","createElement","className","__","Button","variant","onClick","VisuallyHidden","as","htmlFor","default","autoComplete","dir","value","onChange","event","target","undefined","selection","placeholder"],"sources":["@wordpress/edit-site/src/components/code-editor/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport Textarea from 'react-autosize-textarea';\n\n/**\n * WordPress dependencies\n */\nimport { __unstableSerializeAndClean } from '@wordpress/blocks';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\nimport { __ } from '@wordpress/i18n';\nimport { Button, VisuallyHidden } from '@wordpress/components';\nimport { useMemo } from '@wordpress/element';\nimport { useInstanceId } from '@wordpress/compose';\nimport { store as editorStore } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\n\nexport default function CodeEditor() {\n\tconst instanceId = useInstanceId( CodeEditor );\n\tconst { shortcut, content, blocks, type, id } = useSelect( ( select ) => {\n\t\tconst { getEditedEntityRecord } = select( coreStore );\n\t\tconst { getEditedPostType, getEditedPostId } = select( editSiteStore );\n\t\tconst { getShortcutRepresentation } = select( keyboardShortcutsStore );\n\t\tconst _type = getEditedPostType();\n\t\tconst _id = getEditedPostId();\n\t\tconst editedRecord = getEditedEntityRecord( 'postType', _type, _id );\n\n\t\treturn {\n\t\t\tshortcut: getShortcutRepresentation( 'core/editor/toggle-mode' ),\n\t\t\tcontent: editedRecord?.content,\n\t\t\tblocks: editedRecord?.blocks,\n\t\t\ttype: _type,\n\t\t\tid: _id,\n\t\t};\n\t}, [] );\n\tconst { editEntityRecord } = useDispatch( coreStore );\n\t// Replicates the logic found in getEditedPostContent().\n\tconst realContent = useMemo( () => {\n\t\tif ( content instanceof Function ) {\n\t\t\treturn content( { blocks } );\n\t\t} else if ( blocks ) {\n\t\t\t// If we have parsed blocks already, they should be our source of truth.\n\t\t\t// Parsing applies block deprecations and legacy block conversions that\n\t\t\t// unparsed content will not have.\n\t\t\treturn __unstableSerializeAndClean( blocks );\n\t\t}\n\t\treturn content;\n\t}, [ content, blocks ] );\n\n\tconst { switchEditorMode } = useDispatch( editorStore );\n\treturn (\n\t\t<div className=\"edit-site-code-editor\">\n\t\t\t<div className=\"edit-site-code-editor__toolbar\">\n\t\t\t\t<h2>{ __( 'Editing code' ) }</h2>\n\t\t\t\t<Button\n\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\tonClick={ () => switchEditorMode( 'visual' ) }\n\t\t\t\t\tshortcut={ shortcut }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Exit code editor' ) }\n\t\t\t\t</Button>\n\t\t\t</div>\n\t\t\t<div className=\"edit-site-code-editor__body\">\n\t\t\t\t<VisuallyHidden\n\t\t\t\t\tas=\"label\"\n\t\t\t\t\thtmlFor={ `code-editor-text-area-${ instanceId }` }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Type text or HTML' ) }\n\t\t\t\t</VisuallyHidden>\n\t\t\t\t<Textarea\n\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\tdir=\"auto\"\n\t\t\t\t\tvalue={ realContent }\n\t\t\t\t\tonChange={ ( event ) => {\n\t\t\t\t\t\teditEntityRecord( 'postType', type, id, {\n\t\t\t\t\t\t\tcontent: event.target.value,\n\t\t\t\t\t\t\tblocks: undefined,\n\t\t\t\t\t\t\tselection: undefined,\n\t\t\t\t\t\t} );\n\t\t\t\t\t} }\n\t\t\t\t\tclassName=\"edit-site-code-editor-text-area\"\n\t\t\t\t\tid={ `code-edit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EAAG,GAEjD,IAAA8B,QAAE,EAAE,mBAAoB,CACX,CAAC,EACjB,IAAAH,MAAA,CAAAC,aAAA,EAAC1C,sBAAA,CAAAmD,OAAQ;IACRC,YAAY,EAAC,KAAK;IAClBC,GAAG,EAAC,MAAM;IACVC,KAAK,EAAGnB,WAAa;IACrBoB,QAAQ,EAAKC,KAAK,IAAM;MACvBvB,gBAAgB,CAAE,UAAU,EAAEd,IAAI,EAAEC,EAAE,EAAE;QACvCH,OAAO,EAAEuC,KAAK,CAACC,MAAM,CAACH,KAAK;QAC3BpC,MAAM,EAAEwC,SAAS;QACjBC,SAAS,EAAED;MACZ,CAAE,CAAC;IACJ,CAAG;IACHf,SAAS,EAAC,iCAAiC;IAC3CvB,EAAE,EAAI,yBAAyBN,UAAY,EAAG;IAC9C8C,WAAW,EAAG,IAAAhB,QAAE,EAAE,iCAAkC;EAAG,CACvD,CACG,CACD,CAAC;AAER","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_data","require","_components","_i18n","_element","_compose","_editor","_notices","_coreData","_icons","_blocks","_constants","_templatePartCreate","CreateTemplatePartModal","modalTitle","__","restProps","_react","createElement","Modal","title","onRequestClose","closeModal","overlayClassName","CreateTemplatePartModalContents","defaultArea","TEMPLATE_PART_AREA_DEFAULT_CATEGORY","blocks","confirmLabel","onCreate","onError","defaultTitle","createErrorNotice","useDispatch","noticesStore","saveEntityRecord","coreStore","existingTemplateParts","useExistingTemplateParts","setTitle","useState","area","setArea","isSubmitting","setIsSubmitting","instanceId","useInstanceId","templatePartAreas","useSelect","select","editorStore","__experimentalGetDefaultTemplatePartAreas","createTemplatePart","uniqueTitle","getUniqueTemplatePartTitle","cleanSlug","getCleanTemplatePartSlug","templatePart","TEMPLATE_PART_POST_TYPE","slug","content","serialize","throwOnError","error","errorMessage","message","code","type","onSubmit","event","preventDefault","__experimentalVStack","spacing","TextControl","__nextHasNoMarginBottom","label","value","onChange","required","BaseControl","id","className","__experimentalRadioGroup","checked","map","icon","description","__experimentalRadio","key","Flex","align","justify","FlexItem","Icon","FlexBlock","check","__experimentalHStack","Button","variant","onClick","isBusy"],"sources":["@wordpress/edit-site/src/components/create-template-part-modal/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tIcon,\n\tBaseControl,\n\tTextControl,\n\tFlex,\n\tFlexItem,\n\tFlexBlock,\n\tButton,\n\tModal,\n\t__experimentalRadioGroup as RadioGroup,\n\t__experimentalRadio as Radio,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useState } from '@wordpress/element';\nimport { useInstanceId } from '@wordpress/compose';\nimport { store as editorStore } from '@wordpress/editor';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { check } from '@wordpress/icons';\nimport { serialize } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport {\n\tTEMPLATE_PART_POST_TYPE,\n\tTEMPLATE_PART_AREA_DEFAULT_CATEGORY,\n} from '../../utils/constants';\nimport {\n\tuseExistingTemplateParts,\n\tgetUniqueTemplatePartTitle,\n\tgetCleanTemplatePartSlug,\n} from '../../utils/template-part-create';\n\nexport default function CreateTemplatePartModal( {\n\tmodalTitle = __( 'Create template part' ),\n\t...restProps\n} ) {\n\treturn (\n\t\t<Modal\n\t\t\ttitle={ modalTitle }\n\t\t\tonRequestClose={ restProps.closeModal }\n\t\t\toverlayClassName=\"edit-site-create-template-part-modal\"\n\t\t>\n\t\t\t<CreateTemplatePartModalContents { ...restProps } />\n\t\t</Modal>\n\t);\n}\n\nexport function CreateTemplatePartModalContents( {\n\tdefaultArea = TEMPLATE_PART_AREA_DEFAULT_CATEGORY,\n\tblocks = [],\n\tconfirmLabel = __( 'Create' ),\n\tcloseModal,\n\tonCreate,\n\tonError,\n\tdefaultTitle = '',\n} ) {\n\tconst { createErrorNotice } = useDispatch( noticesStore );\n\tconst { saveEntityRecord } = useDispatch( coreStore );\n\tconst existingTemplateParts = useExistingTemplateParts();\n\n\tconst [ title, setTitle ] = useState( defaultTitle );\n\tconst [ area, setArea ] = useState( defaultArea );\n\tconst [ isSubmitting, setIsSubmitting ] = useState( false );\n\tconst instanceId = useInstanceId( CreateTemplatePartModal );\n\n\tconst templatePartAreas = useSelect(\n\t\t( select ) =>\n\t\t\tselect( editorStore ).__experimentalGetDefaultTemplatePartAreas(),\n\t\t[]\n\t);\n\tasync function createTemplatePart() {\n\t\tif ( ! title || isSubmitting ) {\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tsetIsSubmitting( true );\n\t\t\tconst uniqueTitle = getUniqueTemplatePartTitle(\n\t\t\t\ttitle,\n\t\t\t\texistingTemplateParts\n\t\t\t);\n\t\t\tconst cleanSlug = getCleanTemplatePartSlug( uniqueTitle );\n\n\t\t\tconst templatePart = await saveEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\tTEMPLATE_PART_POST_TYPE,\n\t\t\t\t{\n\t\t\t\t\tslug: cleanSlug,\n\t\t\t\t\ttitle: uniqueTitle,\n\t\t\t\t\tcontent: serialize( blocks ),\n\t\t\t\t\tarea,\n\t\t\t\t},\n\t\t\t\t{ throwOnError: true }\n\t\t\t);\n\t\t\tawait onCreate( templatePart );\n\n\t\t\t// TODO: Add a success notice?\n\t\t} catch ( error ) {\n\t\t\tconst errorMessage =\n\t\t\t\terror.message && error.code !== 'unknown_error'\n\t\t\t\t\t? error.message\n\t\t\t\t\t: __(\n\t\t\t\t\t\t\t'An error occurred while creating the template part.'\n\t\t\t\t\t );\n\n\t\t\tcreateErrorNotice( errorMessage, { type: 'snackbar' } );\n\n\t\t\tonError?.();\n\t\t} finally {\n\t\t\tsetIsSubmitting( false );\n\t\t}\n\t}\n\treturn (\n\t\t<form\n\t\t\tonSubmit={ async ( event ) => {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tawait createTemplatePart();\n\t\t\t} }\n\t\t>\n\t\t\t<VStack spacing=\"4\">\n\t\t\t\t<TextControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tlabel={ __( 'Name' ) }\n\t\t\t\t\tvalue={ title }\n\t\t\t\t\tonChange={ setTitle }\n\t\t\t\t\trequired\n\t\t\t\t/>\n\t\t\t\t<BaseControl\n\t\t\t\t\tlabel={ __( 'Area' ) }\n\t\t\t\t\tid={ `edit-site-create-template-part-modal__area-selection-${ instanceId }` }\n\t\t\t\t\tclassName=\"edit-site-create-template-part-modal__area-base-control\"\n\t\t\t\t>\n\t\t\t\t\t<RadioGroup\n\t\t\t\t\t\tlabel={ __( 'Area' ) }\n\t\t\t\t\t\tclassName=\"edit-site-create-template-part-modal__area-radio-group\"\n\t\t\t\t\t\tid={ `edit-site-create-template-part-modal__area-selection-${ instanceId }` }\n\t\t\t\t\t\tonChange={ setArea }\n\t\t\t\t\t\tchecked={ area }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ templatePartAreas.map(\n\t\t\t\t\t\t\t( { icon, label, area: value, description } ) => (\n\t\t\t\t\t\t\t\t<Radio\n\t\t\t\t\t\t\t\t\tkey={ label }\n\t\t\t\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\t\t\t\tclassName=\"edit-site-create-template-part-modal__area-radio\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Flex align=\"start\" justify=\"start\">\n\t\t\t\t\t\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t\t\t\t\t\t<Icon icon={ icon } />\n\t\t\t\t\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t\t\t\t\t\t<FlexBlock className=\"edit-site-create-template-part-modal__option-label\">\n\t\t\t\t\t\t\t\t\t\t\t{ label }\n\t\t\t\t\t\t\t\t\t\t\t<div>{ description }</div>\n\t\t\t\t\t\t\t\t\t\t</FlexBlock>\n\n\t\t\t\t\t\t\t\t\t\t<FlexItem className=\"edit-site-create-template-part-modal__checkbox\">\n\t\t\t\t\t\t\t\t\t\t\t{ area === value && (\n\t\t\t\t\t\t\t\t\t\t\t\t<Icon icon={ check } />\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t\t\t\t\t</Flex>\n\t\t\t\t\t\t\t\t</Radio>\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t) }\n\t\t\t\t\t</RadioGroup>\n\t\t\t\t</BaseControl>\n\t\t\t\t<HStack justify=\"right\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\tcloseModal();\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\taria-disabled={ ! title || isSubmitting }\n\t\t\t\t\t\tisBusy={ isSubmitting }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ confirmLabel }\n\t\t\t\t\t</Button>\n\t\t\t\t</HStack>\n\t\t\t</VStack>\n\t\t</form>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAcA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AACA,IAAAM,QAAA,GAAAN,OAAA;AACA,IAAAO,SAAA,GAAAP,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AACA,IAAAS,OAAA,GAAAT,OAAA;AAKA,IAAAU,UAAA,GAAAV,OAAA;AAIA,IAAAW,mBAAA,GAAAX,OAAA;AAlCA;AACA;AACA;;AAyBA;AACA;AACA;;AAWe,SAASY,uBAAuBA,CAAE;EA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MAAA,CAAAC,aAAA,EAAChB,WAAA,CAAA0F,QAAQ;IAACX,SAAS,EAAC;EAAgD,GACjExC,IAAI,KAAKmC,KAAK,IACf,IAAA3D,MAAA,CAAAC,aAAA,EAAChB,WAAA,CAAA2F,IAAI;IAACR,IAAI,EAAGU;EAAO,CAAE,CAEd,CACL,CACA,CAET,CACW,CACA,CAAC,EACd,IAAA9E,MAAA,CAAAC,aAAA,EAAChB,WAAA,CAAA8F,oBAAM;IAACL,OAAO,EAAC;EAAO,GACtB,IAAA1E,MAAA,CAAAC,aAAA,EAAChB,WAAA,CAAA+F,MAAM;IACNC,OAAO,EAAC,UAAU;IAClBC,OAAO,EAAGA,CAAA,KAAM;MACf7E,UAAU,CAAC,CAAC;IACb;EAAG,GAED,IAAAP,QAAE,EAAE,QAAS,CACR,CAAC,EACT,IAAAE,MAAA,CAAAC,aAAA,EAAChB,WAAA,CAAA+F,MAAM;IACNC,OAAO,EAAC,SAAS;IACjB/B,IAAI,EAAC,QAAQ;IACb,iBAAgB,CAAE/C,KAAK,IAAIuB,YAAc;IACzCyD,MAAM,EAAGzD;EAAc,GAErBf,YACK,CACD,CACD,CACH,CAAC;AAET"}
1
+ {"version":3,"names":["_data","require","_components","_i18n","_element","_compose","_editor","_notices","_coreData","_icons","_blocks","_constants","_templatePartCreate","CreateTemplatePartModal","modalTitle","__","restProps","_react","createElement","Modal","title","onRequestClose","closeModal","overlayClassName","CreateTemplatePartModalContents","defaultArea","TEMPLATE_PART_AREA_DEFAULT_CATEGORY","blocks","confirmLabel","onCreate","onError","defaultTitle","createErrorNotice","useDispatch","noticesStore","saveEntityRecord","coreStore","existingTemplateParts","useExistingTemplateParts","setTitle","useState","area","setArea","isSubmitting","setIsSubmitting","instanceId","useInstanceId","templatePartAreas","useSelect","select","editorStore","__experimentalGetDefaultTemplatePartAreas","createTemplatePart","uniqueTitle","getUniqueTemplatePartTitle","cleanSlug","getCleanTemplatePartSlug","templatePart","TEMPLATE_PART_POST_TYPE","slug","content","serialize","throwOnError","error","errorMessage","message","code","type","onSubmit","event","preventDefault","__experimentalVStack","spacing","TextControl","__nextHasNoMarginBottom","label","value","onChange","required","BaseControl","id","className","__experimentalRadioGroup","checked","map","icon","description","__experimentalRadio","key","Flex","align","justify","FlexItem","Icon","FlexBlock","check","__experimentalHStack","Button","variant","onClick","isBusy"],"sources":["@wordpress/edit-site/src/components/create-template-part-modal/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tIcon,\n\tBaseControl,\n\tTextControl,\n\tFlex,\n\tFlexItem,\n\tFlexBlock,\n\tButton,\n\tModal,\n\t__experimentalRadioGroup as RadioGroup,\n\t__experimentalRadio as Radio,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useState } from '@wordpress/element';\nimport { useInstanceId } from '@wordpress/compose';\nimport { store as editorStore } from '@wordpress/editor';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { check } from '@wordpress/icons';\nimport { serialize } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport {\n\tTEMPLATE_PART_POST_TYPE,\n\tTEMPLATE_PART_AREA_DEFAULT_CATEGORY,\n} from '../../utils/constants';\nimport {\n\tuseExistingTemplateParts,\n\tgetUniqueTemplatePartTitle,\n\tgetCleanTemplatePartSlug,\n} from '../../utils/template-part-create';\n\nexport default function CreateTemplatePartModal( {\n\tmodalTitle = __( 'Create template part' ),\n\t...restProps\n} ) {\n\treturn (\n\t\t<Modal\n\t\t\ttitle={ modalTitle }\n\t\t\tonRequestClose={ restProps.closeModal }\n\t\t\toverlayClassName=\"edit-site-create-template-part-modal\"\n\t\t>\n\t\t\t<CreateTemplatePartModalContents { ...restProps } />\n\t\t</Modal>\n\t);\n}\n\nexport function CreateTemplatePartModalContents( {\n\tdefaultArea = TEMPLATE_PART_AREA_DEFAULT_CATEGORY,\n\tblocks = [],\n\tconfirmLabel = __( 'Create' ),\n\tcloseModal,\n\tonCreate,\n\tonError,\n\tdefaultTitle = '',\n} ) {\n\tconst { createErrorNotice } = useDispatch( noticesStore );\n\tconst { saveEntityRecord } = useDispatch( coreStore );\n\tconst existingTemplateParts = useExistingTemplateParts();\n\n\tconst [ title, setTitle ] = useState( defaultTitle );\n\tconst [ area, setArea ] = useState( defaultArea );\n\tconst [ isSubmitting, setIsSubmitting ] = useState( false );\n\tconst instanceId = useInstanceId( CreateTemplatePartModal );\n\n\tconst templatePartAreas = useSelect(\n\t\t( select ) =>\n\t\t\tselect( editorStore ).__experimentalGetDefaultTemplatePartAreas(),\n\t\t[]\n\t);\n\tasync function createTemplatePart() {\n\t\tif ( ! title || isSubmitting ) {\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tsetIsSubmitting( true );\n\t\t\tconst uniqueTitle = getUniqueTemplatePartTitle(\n\t\t\t\ttitle,\n\t\t\t\texistingTemplateParts\n\t\t\t);\n\t\t\tconst cleanSlug = getCleanTemplatePartSlug( uniqueTitle );\n\n\t\t\tconst templatePart = await saveEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\tTEMPLATE_PART_POST_TYPE,\n\t\t\t\t{\n\t\t\t\t\tslug: cleanSlug,\n\t\t\t\t\ttitle: uniqueTitle,\n\t\t\t\t\tcontent: serialize( blocks ),\n\t\t\t\t\tarea,\n\t\t\t\t},\n\t\t\t\t{ throwOnError: true }\n\t\t\t);\n\t\t\tawait onCreate( templatePart );\n\n\t\t\t// TODO: Add a success notice?\n\t\t} catch ( error ) {\n\t\t\tconst errorMessage =\n\t\t\t\terror.message && error.code !== 'unknown_error'\n\t\t\t\t\t? error.message\n\t\t\t\t\t: __(\n\t\t\t\t\t\t\t'An error occurred while creating the template part.'\n\t\t\t\t\t );\n\n\t\t\tcreateErrorNotice( errorMessage, { type: 'snackbar' } );\n\n\t\t\tonError?.();\n\t\t} finally {\n\t\t\tsetIsSubmitting( false );\n\t\t}\n\t}\n\treturn (\n\t\t<form\n\t\t\tonSubmit={ async ( event ) => {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tawait createTemplatePart();\n\t\t\t} }\n\t\t>\n\t\t\t<VStack spacing=\"4\">\n\t\t\t\t<TextControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tlabel={ __( 'Name' ) }\n\t\t\t\t\tvalue={ title }\n\t\t\t\t\tonChange={ setTitle }\n\t\t\t\t\trequired\n\t\t\t\t/>\n\t\t\t\t<BaseControl\n\t\t\t\t\tlabel={ __( 'Area' ) }\n\t\t\t\t\tid={ `edit-site-create-template-part-modal__area-selection-${ instanceId }` }\n\t\t\t\t\tclassName=\"edit-site-create-template-part-modal__area-base-control\"\n\t\t\t\t>\n\t\t\t\t\t<RadioGroup\n\t\t\t\t\t\tlabel={ __( 'Area' ) }\n\t\t\t\t\t\tclassName=\"edit-site-create-template-part-modal__area-radio-group\"\n\t\t\t\t\t\tid={ `edit-site-create-template-part-modal__area-selection-${ instanceId }` }\n\t\t\t\t\t\tonChange={ setArea }\n\t\t\t\t\t\tchecked={ area }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ templatePartAreas.map(\n\t\t\t\t\t\t\t( { icon, label, area: value, description } ) => (\n\t\t\t\t\t\t\t\t<Radio\n\t\t\t\t\t\t\t\t\tkey={ label }\n\t\t\t\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\t\t\t\tclassName=\"edit-site-create-template-part-modal__area-radio\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Flex align=\"start\" justify=\"start\">\n\t\t\t\t\t\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t\t\t\t\t\t<Icon icon={ icon } />\n\t\t\t\t\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t\t\t\t\t\t<FlexBlock className=\"edit-site-create-template-part-modal__option-label\">\n\t\t\t\t\t\t\t\t\t\t\t{ label }\n\t\t\t\t\t\t\t\t\t\t\t<div>{ description }</div>\n\t\t\t\t\t\t\t\t\t\t</FlexBlock>\n\n\t\t\t\t\t\t\t\t\t\t<FlexItem className=\"edit-site-create-template-part-modal__checkbox\">\n\t\t\t\t\t\t\t\t\t\t\t{ area === value && (\n\t\t\t\t\t\t\t\t\t\t\t\t<Icon icon={ check } />\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t\t\t\t\t</Flex>\n\t\t\t\t\t\t\t\t</Radio>\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t) }\n\t\t\t\t\t</RadioGroup>\n\t\t\t\t</BaseControl>\n\t\t\t\t<HStack justify=\"right\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\tcloseModal();\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\taria-disabled={ ! title || isSubmitting }\n\t\t\t\t\t\tisBusy={ isSubmitting }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ confirmLabel }\n\t\t\t\t\t</Button>\n\t\t\t\t</HStack>\n\t\t\t</VStack>\n\t\t</form>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAcA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AACA,IAAAM,QAAA,GAAAN,OAAA;AACA,IAAAO,SAAA,GAAAP,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AACA,IAAAS,OAAA,GAAAT,OAAA;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WAAA,CAAA4F,SAAS;IAACb,SAAS,EAAC;EAAoD,GACtEN,KAAK,EACP,IAAA1D,MAAA,CAAAC,aAAA,eAAOoE,WAAkB,CACf,CAAC,EAEZ,IAAArE,MAAA,CAAAC,aAAA,EAAChB,WAAA,CAAA0F,QAAQ;IAACX,SAAS,EAAC;EAAgD,GACjExC,IAAI,KAAKmC,KAAK,IACf,IAAA3D,MAAA,CAAAC,aAAA,EAAChB,WAAA,CAAA2F,IAAI;IAACR,IAAI,EAAGU;EAAO,CAAE,CAEd,CACL,CACA,CAET,CACW,CACA,CAAC,EACd,IAAA9E,MAAA,CAAAC,aAAA,EAAChB,WAAA,CAAA8F,oBAAM;IAACL,OAAO,EAAC;EAAO,GACtB,IAAA1E,MAAA,CAAAC,aAAA,EAAChB,WAAA,CAAA+F,MAAM;IACNC,OAAO,EAAC,UAAU;IAClBC,OAAO,EAAGA,CAAA,KAAM;MACf7E,UAAU,CAAC,CAAC;IACb;EAAG,GAED,IAAAP,QAAE,EAAE,QAAS,CACR,CAAC,EACT,IAAAE,MAAA,CAAAC,aAAA,EAAChB,WAAA,CAAA+F,MAAM;IACNC,OAAO,EAAC,SAAS;IACjB/B,IAAI,EAAC,QAAQ;IACb,iBAAgB,CAAE/C,KAAK,IAAIuB,YAAc;IACzCyD,MAAM,EAAGzD;EAAc,GAErBf,YACK,CACD,CACD,CACH,CAAC;AAET","ignoreList":[]}
@@ -12,12 +12,12 @@ var _components = require("@wordpress/components");
12
12
  var _compose = require("@wordpress/compose");
13
13
  var _preferences = require("@wordpress/preferences");
14
14
  var _blockEditor = require("@wordpress/block-editor");
15
- var _interface = require("@wordpress/interface");
16
15
  var _editor = require("@wordpress/editor");
17
16
  var _i18n = require("@wordpress/i18n");
18
17
  var _coreData = require("@wordpress/core-data");
19
18
  var _sidebarEditMode = require("../sidebar-edit-mode");
20
19
  var _codeEditor = _interopRequireDefault(require("../code-editor"));
20
+ var _headerEditMode = _interopRequireDefault(require("../header-edit-mode"));
21
21
  var _editMode = _interopRequireDefault(require("../keyboard-shortcuts/edit-mode"));
22
22
  var _welcomeGuide = _interopRequireDefault(require("../welcome-guide"));
23
23
  var _startTemplateOptions = _interopRequireDefault(require("../start-template-options"));
@@ -47,7 +47,10 @@ var _useSiteEditorSettings = require("../block-editor/use-site-editor-settings")
47
47
  const {
48
48
  ExperimentalEditorProvider: EditorProvider,
49
49
  InserterSidebar,
50
- ListViewSidebar
50
+ ListViewSidebar,
51
+ InterfaceSkeleton,
52
+ ComplementaryArea,
53
+ interfaceStore
51
54
  } = (0, _lockUnlock.unlock)(_editor.privateApis);
52
55
  const interfaceLabels = {
53
56
  /* translators: accessibility text for the editor content landmark region. */
@@ -57,8 +60,11 @@ const interfaceLabels = {
57
60
  /* translators: accessibility text for the editor publish landmark region. */
58
61
  actions: (0, _i18n.__)('Editor publish'),
59
62
  /* translators: accessibility text for the editor footer landmark region. */
60
- footer: (0, _i18n.__)('Editor footer')
63
+ footer: (0, _i18n.__)('Editor footer'),
64
+ /* translators: accessibility text for the editor header landmark region. */
65
+ header: (0, _i18n.__)('Editor top bar')
61
66
  };
67
+ const ANIMATION_DURATION = 0.25;
62
68
  function Editor({
63
69
  isLoading,
64
70
  onClick
@@ -72,6 +78,7 @@ function Editor({
72
78
  type: editedPostType
73
79
  } = editedPost;
74
80
  const isLargeViewport = (0, _compose.useViewportMatch)('medium');
81
+ const disableMotion = (0, _compose.useReducedMotion)();
75
82
  const {
76
83
  context,
77
84
  contextPost,
@@ -98,7 +105,7 @@ function Editor({
98
105
  } = select(_blockEditor.store);
99
106
  const {
100
107
  getActiveComplementaryArea
101
- } = select(_interface.store);
108
+ } = select(interfaceStore);
102
109
  const {
103
110
  getEntityRecord
104
111
  } = select(_coreData.store);
@@ -120,7 +127,7 @@ function Editor({
120
127
  blockEditorMode: __unstableGetEditorMode(),
121
128
  isInserterOpen: isInserterOpened(),
122
129
  isListViewOpen: isListViewOpened(),
123
- isRightSidebarOpen: getActiveComplementaryArea(_store.store.name),
130
+ isRightSidebarOpen: getActiveComplementaryArea('core'),
124
131
  isDistractionFree: get('core', 'distractionFree'),
125
132
  showBlockBreadcrumbs: get('core', 'showBlockBreadcrumbs'),
126
133
  showIconLabels: get('core', 'showIconLabels'),
@@ -162,12 +169,32 @@ function Editor({
162
169
  __unstableTemplate: postWithTemplate ? editedPost : undefined,
163
170
  settings: settings,
164
171
  useSubRegistry: false
165
- }, (0, _react.createElement)(_sidebarEditMode.SidebarComplementaryAreaFills, null), isEditMode && (0, _react.createElement)(_startTemplateOptions.default, null), (0, _react.createElement)(_interface.InterfaceSkeleton, {
172
+ }, (0, _react.createElement)(_sidebarEditMode.SidebarComplementaryAreaFills, null), isEditMode && (0, _react.createElement)(_startTemplateOptions.default, null), (0, _react.createElement)(InterfaceSkeleton, {
166
173
  isDistractionFree: isDistractionFree,
167
174
  enableRegionNavigation: false,
168
175
  className: (0, _classnames.default)('edit-site-editor__interface-skeleton', {
169
176
  'show-icon-labels': showIconLabels
170
177
  }),
178
+ header: (0, _react.createElement)(_components.__unstableAnimatePresence, {
179
+ initial: false
180
+ }, canvasMode === 'edit' && (0, _react.createElement)(_components.__unstableMotion.div, {
181
+ initial: {
182
+ marginTop: -60
183
+ },
184
+ animate: {
185
+ marginTop: 0
186
+ },
187
+ exit: {
188
+ marginTop: -60
189
+ },
190
+ transition: {
191
+ type: 'tween',
192
+ duration:
193
+ // Disable transition in mobile to emulate a full page transition.
194
+ disableMotion || !isLargeViewport ? 0 : ANIMATION_DURATION,
195
+ ease: [0.6, 0, 0.4, 1]
196
+ }
197
+ }, (0, _react.createElement)(_headerEditMode.default, null))),
171
198
  notices: (0, _react.createElement)(_editor.EditorSnackbars, null),
172
199
  content: (0, _react.createElement)(_react.Fragment, null, (0, _react.createElement)(_globalStylesRenderer.GlobalStylesRenderer, null), isEditMode && (0, _react.createElement)(_editor.EditorNotices, null), showVisualEditor && (0, _react.createElement)(_react.Fragment, null, (0, _react.createElement)(_templatePartConverter.default, null), (0, _react.createElement)(_sidebarEditMode.SidebarInspectorFill, null, (0, _react.createElement)(_blockEditor.BlockInspector, null)), !isLargeViewport && (0, _react.createElement)(_blockEditor.BlockToolbar, {
173
200
  hideDragHandle: true
@@ -178,8 +205,8 @@ function Editor({
178
205
  closeGeneralSidebar: closeGeneralSidebar,
179
206
  isRightSidebarOpen: isRightSidebarOpen
180
207
  }) || shouldShowListView && (0, _react.createElement)(ListViewSidebar, null)),
181
- sidebar: !isDistractionFree && isEditMode && isRightSidebarOpen && !isDistractionFree && (0, _react.createElement)(_interface.ComplementaryArea.Slot, {
182
- scope: "core/edit-site"
208
+ sidebar: isEditMode && !isDistractionFree && (0, _react.createElement)(ComplementaryArea.Slot, {
209
+ scope: "core"
183
210
  }),
184
211
  footer: shouldShowBlockBreadcrumbs && (0, _react.createElement)(_blockEditor.BlockBreadcrumb, {
185
212
  rootLabelText: postTypeLabel
@@ -1 +1 @@
1
- {"version":3,"names":["_classnames","_interopRequireDefault","require","_data","_components","_compose","_preferences","_blockEditor","_interface","_editor","_i18n","_coreData","_sidebarEditMode","_codeEditor","_editMode","_welcomeGuide","_startTemplateOptions","_store","_globalStylesRenderer","_useTitle","_canvasLoader","_lockUnlock","_useEditedEntityRecord","_patternModal","_constants","_siteEditorCanvas","_templatePartConverter","_useSiteEditorSettings","ExperimentalEditorProvider","EditorProvider","InserterSidebar","ListViewSidebar","unlock","editorPrivateApis","interfaceLabels","body","__","sidebar","actions","footer","Editor","isLoading","onClick","record","editedPost","getTitle","isLoaded","hasLoadedPost","useEditedEntityRecord","type","editedPostType","isLargeViewport","useViewportMatch","context","contextPost","editorMode","canvasMode","blockEditorMode","isRightSidebarOpen","isInserterOpen","isListViewOpen","isDistractionFree","showIconLabels","showBlockBreadcrumbs","postTypeLabel","useSelect","select","get","preferencesStore","getEditedPostContext","getCanvasMode","editSiteStore","__unstableGetEditorMode","blockEditorStore","getActiveComplementaryArea","interfaceStore","getEntityRecord","coreDataStore","isInserterOpened","isListViewOpened","getPostTypeLabel","getEditorMode","editorStore","_context","postId","postType","undefined","name","isViewMode","isEditMode","showVisualEditor","shouldShowBlockBreadcrumbs","shouldShowInserter","shouldShowListView","secondarySidebarLabel","postWithTemplate","title","_POST_TYPE_LABELS$edi","sprintf","POST_TYPE_LABELS","TEMPLATE_POST_TYPE","useTitle","loadingProgressId","useInstanceId","CanvasLoader","closeGeneralSidebar","useDispatch","settings","useSpecificEditorSettings","isReady","_react","createElement","Fragment","default","id","Notice","status","isDismissible","post","__unstableTemplate","useSubRegistry","SidebarComplementaryAreaFills","InterfaceSkeleton","enableRegionNavigation","className","classnames","notices","EditorSnackbars","content","GlobalStylesRenderer","EditorNotices","SidebarInspectorFill","BlockInspector","BlockToolbar","hideDragHandle","EditorKeyboardShortcutsRegister","EditorKeyboardShortcuts","secondarySidebar","ComplementaryArea","Slot","scope","BlockBreadcrumb","rootLabelText","labels"],"sources":["@wordpress/edit-site/src/components/editor/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { Notice } from '@wordpress/components';\nimport { useInstanceId, useViewportMatch } from '@wordpress/compose';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport {\n\tBlockBreadcrumb,\n\tBlockToolbar,\n\tstore as blockEditorStore,\n\tBlockInspector,\n} from '@wordpress/block-editor';\nimport {\n\tInterfaceSkeleton,\n\tComplementaryArea,\n\tstore as interfaceStore,\n} from '@wordpress/interface';\nimport {\n\tEditorKeyboardShortcutsRegister,\n\tEditorKeyboardShortcuts,\n\tEditorNotices,\n\tEditorSnackbars,\n\tprivateApis as editorPrivateApis,\n\tstore as editorStore,\n} from '@wordpress/editor';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { store as coreDataStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport {\n\tSidebarComplementaryAreaFills,\n\tSidebarInspectorFill,\n} from '../sidebar-edit-mode';\nimport CodeEditor from '../code-editor';\nimport KeyboardShortcutsEditMode from '../keyboard-shortcuts/edit-mode';\nimport WelcomeGuide from '../welcome-guide';\nimport StartTemplateOptions from '../start-template-options';\nimport { store as editSiteStore } from '../../store';\nimport { GlobalStylesRenderer } from '../global-styles-renderer';\nimport useTitle from '../routes/use-title';\nimport CanvasLoader from '../canvas-loader';\nimport { unlock } from '../../lock-unlock';\nimport useEditedEntityRecord from '../use-edited-entity-record';\nimport PatternModal from '../pattern-modal';\nimport { POST_TYPE_LABELS, TEMPLATE_POST_TYPE } from '../../utils/constants';\nimport SiteEditorCanvas from '../block-editor/site-editor-canvas';\nimport TemplatePartConverter from '../template-part-converter';\nimport { useSpecificEditorSettings } from '../block-editor/use-site-editor-settings';\n\nconst {\n\tExperimentalEditorProvider: EditorProvider,\n\tInserterSidebar,\n\tListViewSidebar,\n} = unlock( editorPrivateApis );\n\nconst interfaceLabels = {\n\t/* translators: accessibility text for the editor content landmark region. */\n\tbody: __( 'Editor content' ),\n\t/* translators: accessibility text for the editor settings landmark region. */\n\tsidebar: __( 'Editor settings' ),\n\t/* translators: accessibility text for the editor publish landmark region. */\n\tactions: __( 'Editor publish' ),\n\t/* translators: accessibility text for the editor footer landmark region. */\n\tfooter: __( 'Editor footer' ),\n};\n\nexport default function Editor( { isLoading, onClick } ) {\n\tconst {\n\t\trecord: editedPost,\n\t\tgetTitle,\n\t\tisLoaded: hasLoadedPost,\n\t} = useEditedEntityRecord();\n\n\tconst { type: editedPostType } = editedPost;\n\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\n\tconst {\n\t\tcontext,\n\t\tcontextPost,\n\t\teditorMode,\n\t\tcanvasMode,\n\t\tblockEditorMode,\n\t\tisRightSidebarOpen,\n\t\tisInserterOpen,\n\t\tisListViewOpen,\n\t\tisDistractionFree,\n\t\tshowIconLabels,\n\t\tshowBlockBreadcrumbs,\n\t\tpostTypeLabel,\n\t} = useSelect( ( select ) => {\n\t\tconst { get } = select( preferencesStore );\n\t\tconst { getEditedPostContext, getCanvasMode } = unlock(\n\t\t\tselect( editSiteStore )\n\t\t);\n\t\tconst { __unstableGetEditorMode } = select( blockEditorStore );\n\t\tconst { getActiveComplementaryArea } = select( interfaceStore );\n\t\tconst { getEntityRecord } = select( coreDataStore );\n\t\tconst {\n\t\t\tisInserterOpened,\n\t\t\tisListViewOpened,\n\t\t\tgetPostTypeLabel,\n\t\t\tgetEditorMode,\n\t\t} = select( editorStore );\n\t\tconst _context = getEditedPostContext();\n\n\t\t// The currently selected entity to display.\n\t\t// Typically template or template part in the site editor.\n\t\treturn {\n\t\t\tcontext: _context,\n\t\t\tcontextPost: _context?.postId\n\t\t\t\t? getEntityRecord(\n\t\t\t\t\t\t'postType',\n\t\t\t\t\t\t_context.postType,\n\t\t\t\t\t\t_context.postId\n\t\t\t\t )\n\t\t\t\t: undefined,\n\t\t\teditorMode: getEditorMode(),\n\t\t\tcanvasMode: getCanvasMode(),\n\t\t\tblockEditorMode: __unstableGetEditorMode(),\n\t\t\tisInserterOpen: isInserterOpened(),\n\t\t\tisListViewOpen: isListViewOpened(),\n\t\t\tisRightSidebarOpen: getActiveComplementaryArea(\n\t\t\t\teditSiteStore.name\n\t\t\t),\n\t\t\tisDistractionFree: get( 'core', 'distractionFree' ),\n\t\t\tshowBlockBreadcrumbs: get( 'core', 'showBlockBreadcrumbs' ),\n\t\t\tshowIconLabels: get( 'core', 'showIconLabels' ),\n\t\t\tpostTypeLabel: getPostTypeLabel(),\n\t\t};\n\t}, [] );\n\n\tconst isViewMode = canvasMode === 'view';\n\tconst isEditMode = canvasMode === 'edit';\n\tconst showVisualEditor = isViewMode || editorMode === 'visual';\n\tconst shouldShowBlockBreadcrumbs =\n\t\t! isDistractionFree &&\n\t\tshowBlockBreadcrumbs &&\n\t\tisEditMode &&\n\t\tshowVisualEditor &&\n\t\tblockEditorMode !== 'zoom-out';\n\tconst shouldShowInserter = isEditMode && showVisualEditor && isInserterOpen;\n\tconst shouldShowListView = isEditMode && showVisualEditor && isListViewOpen;\n\tconst secondarySidebarLabel = isListViewOpen\n\t\t? __( 'List View' )\n\t\t: __( 'Block Library' );\n\tconst postWithTemplate = !! context?.postId;\n\n\tlet title;\n\tif ( hasLoadedPost ) {\n\t\ttitle = sprintf(\n\t\t\t// translators: A breadcrumb trail for the Admin document title. %1$s: title of template being edited, %2$s: type of template (Template or Template Part).\n\t\t\t__( '%1$s ‹ %2$s' ),\n\t\t\tgetTitle(),\n\t\t\tPOST_TYPE_LABELS[ editedPostType ] ??\n\t\t\t\tPOST_TYPE_LABELS[ TEMPLATE_POST_TYPE ]\n\t\t);\n\t}\n\n\t// Only announce the title once the editor is ready to prevent \"Replace\"\n\t// action in <URLQueryController> from double-announcing.\n\tuseTitle( hasLoadedPost && title );\n\n\tconst loadingProgressId = useInstanceId(\n\t\tCanvasLoader,\n\t\t'edit-site-editor__loading-progress'\n\t);\n\n\tconst { closeGeneralSidebar } = useDispatch( editSiteStore );\n\n\tconst settings = useSpecificEditorSettings();\n\tconst isReady =\n\t\t! isLoading &&\n\t\t( ( postWithTemplate && !! contextPost && !! editedPost ) ||\n\t\t\t( ! postWithTemplate && !! editedPost ) );\n\n\treturn (\n\t\t<>\n\t\t\t{ ! isReady ? <CanvasLoader id={ loadingProgressId } /> : null }\n\t\t\t{ isEditMode && <WelcomeGuide /> }\n\t\t\t{ hasLoadedPost && ! editedPost && (\n\t\t\t\t<Notice status=\"warning\" isDismissible={ false }>\n\t\t\t\t\t{ __(\n\t\t\t\t\t\t\"You attempted to edit an item that doesn't exist. Perhaps it was deleted?\"\n\t\t\t\t\t) }\n\t\t\t\t</Notice>\n\t\t\t) }\n\t\t\t{ isReady && (\n\t\t\t\t<EditorProvider\n\t\t\t\t\tpost={ postWithTemplate ? contextPost : editedPost }\n\t\t\t\t\t__unstableTemplate={\n\t\t\t\t\t\tpostWithTemplate ? editedPost : undefined\n\t\t\t\t\t}\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t\tuseSubRegistry={ false }\n\t\t\t\t>\n\t\t\t\t\t<SidebarComplementaryAreaFills />\n\t\t\t\t\t{ isEditMode && <StartTemplateOptions /> }\n\t\t\t\t\t<InterfaceSkeleton\n\t\t\t\t\t\tisDistractionFree={ isDistractionFree }\n\t\t\t\t\t\tenableRegionNavigation={ false }\n\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t'edit-site-editor__interface-skeleton',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t'show-icon-labels': showIconLabels,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tnotices={ <EditorSnackbars /> }\n\t\t\t\t\t\tcontent={\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t<GlobalStylesRenderer />\n\t\t\t\t\t\t\t\t{ isEditMode && <EditorNotices /> }\n\t\t\t\t\t\t\t\t{ showVisualEditor && (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t<TemplatePartConverter />\n\t\t\t\t\t\t\t\t\t\t<SidebarInspectorFill>\n\t\t\t\t\t\t\t\t\t\t\t<BlockInspector />\n\t\t\t\t\t\t\t\t\t\t</SidebarInspectorFill>\n\t\t\t\t\t\t\t\t\t\t{ ! isLargeViewport && (\n\t\t\t\t\t\t\t\t\t\t\t<BlockToolbar hideDragHandle />\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t<SiteEditorCanvas onClick={ onClick } />\n\t\t\t\t\t\t\t\t\t\t<PatternModal />\n\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t{ editorMode === 'text' && isEditMode && (\n\t\t\t\t\t\t\t\t\t<CodeEditor />\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t{ isEditMode && (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t<KeyboardShortcutsEditMode />\n\t\t\t\t\t\t\t\t\t\t<EditorKeyboardShortcutsRegister />\n\t\t\t\t\t\t\t\t\t\t<EditorKeyboardShortcuts />\n\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsecondarySidebar={\n\t\t\t\t\t\t\tisEditMode &&\n\t\t\t\t\t\t\t( ( shouldShowInserter && (\n\t\t\t\t\t\t\t\t<InserterSidebar\n\t\t\t\t\t\t\t\t\tcloseGeneralSidebar={ closeGeneralSidebar }\n\t\t\t\t\t\t\t\t\tisRightSidebarOpen={ isRightSidebarOpen }\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( shouldShowListView && <ListViewSidebar /> ) )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsidebar={\n\t\t\t\t\t\t\t! isDistractionFree &&\n\t\t\t\t\t\t\tisEditMode &&\n\t\t\t\t\t\t\tisRightSidebarOpen &&\n\t\t\t\t\t\t\t! isDistractionFree && (\n\t\t\t\t\t\t\t\t<ComplementaryArea.Slot scope=\"core/edit-site\" />\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfooter={\n\t\t\t\t\t\t\tshouldShowBlockBreadcrumbs && (\n\t\t\t\t\t\t\t\t<BlockBreadcrumb\n\t\t\t\t\t\t\t\t\trootLabelText={ postTypeLabel }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlabels={ {\n\t\t\t\t\t\t\t...interfaceLabels,\n\t\t\t\t\t\t\tsecondarySidebar: secondarySidebarLabel,\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t</EditorProvider>\n\t\t\t) }\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA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,aAAa,EAAG9E;IAAe,CAC/B,CAEF;IACD+E,MAAM,EAAG;MACR,GAAG7G,eAAe;MAClBuG,gBAAgB,EAAE3C;IACnB;EAAG,CACH,CACc,CAEhB,CAAC;AAEL"}
1
+ {"version":3,"names":["_classnames","_interopRequireDefault","require","_data","_components","_compose","_preferences","_blockEditor","_editor","_i18n","_coreData","_sidebarEditMode","_codeEditor","_headerEditMode","_editMode","_welcomeGuide","_startTemplateOptions","_store","_globalStylesRenderer","_useTitle","_canvasLoader","_lockUnlock","_useEditedEntityRecord","_patternModal","_constants","_siteEditorCanvas","_templatePartConverter","_useSiteEditorSettings","ExperimentalEditorProvider","EditorProvider","InserterSidebar","ListViewSidebar","InterfaceSkeleton","ComplementaryArea","interfaceStore","unlock","editorPrivateApis","interfaceLabels","body","__","sidebar","actions","footer","header","ANIMATION_DURATION","Editor","isLoading","onClick","record","editedPost","getTitle","isLoaded","hasLoadedPost","useEditedEntityRecord","type","editedPostType","isLargeViewport","useViewportMatch","disableMotion","useReducedMotion","context","contextPost","editorMode","canvasMode","blockEditorMode","isRightSidebarOpen","isInserterOpen","isListViewOpen","isDistractionFree","showIconLabels","showBlockBreadcrumbs","postTypeLabel","useSelect","select","get","preferencesStore","getEditedPostContext","getCanvasMode","editSiteStore","__unstableGetEditorMode","blockEditorStore","getActiveComplementaryArea","getEntityRecord","coreDataStore","isInserterOpened","isListViewOpened","getPostTypeLabel","getEditorMode","editorStore","_context","postId","postType","undefined","isViewMode","isEditMode","showVisualEditor","shouldShowBlockBreadcrumbs","shouldShowInserter","shouldShowListView","secondarySidebarLabel","postWithTemplate","title","_POST_TYPE_LABELS$edi","sprintf","POST_TYPE_LABELS","TEMPLATE_POST_TYPE","useTitle","loadingProgressId","useInstanceId","CanvasLoader","closeGeneralSidebar","useDispatch","settings","useSpecificEditorSettings","isReady","_react","createElement","Fragment","default","id","Notice","status","isDismissible","post","__unstableTemplate","useSubRegistry","SidebarComplementaryAreaFills","enableRegionNavigation","className","classnames","__unstableAnimatePresence","initial","__unstableMotion","div","marginTop","animate","exit","transition","duration","ease","notices","EditorSnackbars","content","GlobalStylesRenderer","EditorNotices","SidebarInspectorFill","BlockInspector","BlockToolbar","hideDragHandle","EditorKeyboardShortcutsRegister","EditorKeyboardShortcuts","secondarySidebar","Slot","scope","BlockBreadcrumb","rootLabelText","labels"],"sources":["@wordpress/edit-site/src/components/editor/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport {\n\tNotice,\n\t__unstableAnimatePresence as AnimatePresence,\n\t__unstableMotion as motion,\n} from '@wordpress/components';\nimport {\n\tuseInstanceId,\n\tuseViewportMatch,\n\tuseReducedMotion,\n} from '@wordpress/compose';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport {\n\tBlockBreadcrumb,\n\tBlockToolbar,\n\tstore as blockEditorStore,\n\tBlockInspector,\n} from '@wordpress/block-editor';\nimport {\n\tEditorKeyboardShortcutsRegister,\n\tEditorKeyboardShortcuts,\n\tEditorNotices,\n\tEditorSnackbars,\n\tprivateApis as editorPrivateApis,\n\tstore as editorStore,\n} from '@wordpress/editor';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { store as coreDataStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport {\n\tSidebarComplementaryAreaFills,\n\tSidebarInspectorFill,\n} from '../sidebar-edit-mode';\nimport CodeEditor from '../code-editor';\nimport Header from '../header-edit-mode';\nimport KeyboardShortcutsEditMode from '../keyboard-shortcuts/edit-mode';\nimport WelcomeGuide from '../welcome-guide';\nimport StartTemplateOptions from '../start-template-options';\nimport { store as editSiteStore } from '../../store';\nimport { GlobalStylesRenderer } from '../global-styles-renderer';\nimport useTitle from '../routes/use-title';\nimport CanvasLoader from '../canvas-loader';\nimport { unlock } from '../../lock-unlock';\nimport useEditedEntityRecord from '../use-edited-entity-record';\nimport PatternModal from '../pattern-modal';\nimport { POST_TYPE_LABELS, TEMPLATE_POST_TYPE } from '../../utils/constants';\nimport SiteEditorCanvas from '../block-editor/site-editor-canvas';\nimport TemplatePartConverter from '../template-part-converter';\nimport { useSpecificEditorSettings } from '../block-editor/use-site-editor-settings';\n\nconst {\n\tExperimentalEditorProvider: EditorProvider,\n\tInserterSidebar,\n\tListViewSidebar,\n\tInterfaceSkeleton,\n\tComplementaryArea,\n\tinterfaceStore,\n} = unlock( editorPrivateApis );\n\nconst interfaceLabels = {\n\t/* translators: accessibility text for the editor content landmark region. */\n\tbody: __( 'Editor content' ),\n\t/* translators: accessibility text for the editor settings landmark region. */\n\tsidebar: __( 'Editor settings' ),\n\t/* translators: accessibility text for the editor publish landmark region. */\n\tactions: __( 'Editor publish' ),\n\t/* translators: accessibility text for the editor footer landmark region. */\n\tfooter: __( 'Editor footer' ),\n\t/* translators: accessibility text for the editor header landmark region. */\n\theader: __( 'Editor top bar' ),\n};\n\nconst ANIMATION_DURATION = 0.25;\n\nexport default function Editor( { isLoading, onClick } ) {\n\tconst {\n\t\trecord: editedPost,\n\t\tgetTitle,\n\t\tisLoaded: hasLoadedPost,\n\t} = useEditedEntityRecord();\n\n\tconst { type: editedPostType } = editedPost;\n\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\tconst disableMotion = useReducedMotion();\n\n\tconst {\n\t\tcontext,\n\t\tcontextPost,\n\t\teditorMode,\n\t\tcanvasMode,\n\t\tblockEditorMode,\n\t\tisRightSidebarOpen,\n\t\tisInserterOpen,\n\t\tisListViewOpen,\n\t\tisDistractionFree,\n\t\tshowIconLabels,\n\t\tshowBlockBreadcrumbs,\n\t\tpostTypeLabel,\n\t} = useSelect( ( select ) => {\n\t\tconst { get } = select( preferencesStore );\n\t\tconst { getEditedPostContext, getCanvasMode } = unlock(\n\t\t\tselect( editSiteStore )\n\t\t);\n\t\tconst { __unstableGetEditorMode } = select( blockEditorStore );\n\t\tconst { getActiveComplementaryArea } = select( interfaceStore );\n\t\tconst { getEntityRecord } = select( coreDataStore );\n\t\tconst {\n\t\t\tisInserterOpened,\n\t\t\tisListViewOpened,\n\t\t\tgetPostTypeLabel,\n\t\t\tgetEditorMode,\n\t\t} = select( editorStore );\n\t\tconst _context = getEditedPostContext();\n\n\t\t// The currently selected entity to display.\n\t\t// Typically template or template part in the site editor.\n\t\treturn {\n\t\t\tcontext: _context,\n\t\t\tcontextPost: _context?.postId\n\t\t\t\t? getEntityRecord(\n\t\t\t\t\t\t'postType',\n\t\t\t\t\t\t_context.postType,\n\t\t\t\t\t\t_context.postId\n\t\t\t\t )\n\t\t\t\t: undefined,\n\t\t\teditorMode: getEditorMode(),\n\t\t\tcanvasMode: getCanvasMode(),\n\t\t\tblockEditorMode: __unstableGetEditorMode(),\n\t\t\tisInserterOpen: isInserterOpened(),\n\t\t\tisListViewOpen: isListViewOpened(),\n\t\t\tisRightSidebarOpen: getActiveComplementaryArea( 'core' ),\n\t\t\tisDistractionFree: get( 'core', 'distractionFree' ),\n\t\t\tshowBlockBreadcrumbs: get( 'core', 'showBlockBreadcrumbs' ),\n\t\t\tshowIconLabels: get( 'core', 'showIconLabels' ),\n\t\t\tpostTypeLabel: getPostTypeLabel(),\n\t\t};\n\t}, [] );\n\n\tconst isViewMode = canvasMode === 'view';\n\tconst isEditMode = canvasMode === 'edit';\n\tconst showVisualEditor = isViewMode || editorMode === 'visual';\n\tconst shouldShowBlockBreadcrumbs =\n\t\t! isDistractionFree &&\n\t\tshowBlockBreadcrumbs &&\n\t\tisEditMode &&\n\t\tshowVisualEditor &&\n\t\tblockEditorMode !== 'zoom-out';\n\tconst shouldShowInserter = isEditMode && showVisualEditor && isInserterOpen;\n\tconst shouldShowListView = isEditMode && showVisualEditor && isListViewOpen;\n\tconst secondarySidebarLabel = isListViewOpen\n\t\t? __( 'List View' )\n\t\t: __( 'Block Library' );\n\tconst postWithTemplate = !! context?.postId;\n\n\tlet title;\n\tif ( hasLoadedPost ) {\n\t\ttitle = sprintf(\n\t\t\t// translators: A breadcrumb trail for the Admin document title. %1$s: title of template being edited, %2$s: type of template (Template or Template Part).\n\t\t\t__( '%1$s ‹ %2$s' ),\n\t\t\tgetTitle(),\n\t\t\tPOST_TYPE_LABELS[ editedPostType ] ??\n\t\t\t\tPOST_TYPE_LABELS[ TEMPLATE_POST_TYPE ]\n\t\t);\n\t}\n\n\t// Only announce the title once the editor is ready to prevent \"Replace\"\n\t// action in <URLQueryController> from double-announcing.\n\tuseTitle( hasLoadedPost && title );\n\n\tconst loadingProgressId = useInstanceId(\n\t\tCanvasLoader,\n\t\t'edit-site-editor__loading-progress'\n\t);\n\n\tconst { closeGeneralSidebar } = useDispatch( editSiteStore );\n\n\tconst settings = useSpecificEditorSettings();\n\tconst isReady =\n\t\t! isLoading &&\n\t\t( ( postWithTemplate && !! contextPost && !! editedPost ) ||\n\t\t\t( ! postWithTemplate && !! editedPost ) );\n\n\treturn (\n\t\t<>\n\t\t\t{ ! isReady ? <CanvasLoader id={ loadingProgressId } /> : null }\n\t\t\t{ isEditMode && <WelcomeGuide /> }\n\t\t\t{ hasLoadedPost && ! editedPost && (\n\t\t\t\t<Notice status=\"warning\" isDismissible={ false }>\n\t\t\t\t\t{ __(\n\t\t\t\t\t\t\"You attempted to edit an item that doesn't exist. Perhaps it was deleted?\"\n\t\t\t\t\t) }\n\t\t\t\t</Notice>\n\t\t\t) }\n\t\t\t{ isReady && (\n\t\t\t\t<EditorProvider\n\t\t\t\t\tpost={ postWithTemplate ? contextPost : editedPost }\n\t\t\t\t\t__unstableTemplate={\n\t\t\t\t\t\tpostWithTemplate ? editedPost : undefined\n\t\t\t\t\t}\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t\tuseSubRegistry={ false }\n\t\t\t\t>\n\t\t\t\t\t<SidebarComplementaryAreaFills />\n\t\t\t\t\t{ isEditMode && <StartTemplateOptions /> }\n\t\t\t\t\t<InterfaceSkeleton\n\t\t\t\t\t\tisDistractionFree={ isDistractionFree }\n\t\t\t\t\t\tenableRegionNavigation={ false }\n\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t'edit-site-editor__interface-skeleton',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t'show-icon-labels': showIconLabels,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t) }\n\t\t\t\t\t\theader={\n\t\t\t\t\t\t\t<AnimatePresence initial={ false }>\n\t\t\t\t\t\t\t\t{ canvasMode === 'edit' && (\n\t\t\t\t\t\t\t\t\t<motion.div\n\t\t\t\t\t\t\t\t\t\tinitial={ {\n\t\t\t\t\t\t\t\t\t\t\tmarginTop: -60,\n\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\tanimate={ {\n\t\t\t\t\t\t\t\t\t\t\tmarginTop: 0,\n\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\texit={ {\n\t\t\t\t\t\t\t\t\t\t\tmarginTop: -60,\n\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\ttransition={ {\n\t\t\t\t\t\t\t\t\t\t\ttype: 'tween',\n\t\t\t\t\t\t\t\t\t\t\tduration:\n\t\t\t\t\t\t\t\t\t\t\t\t// Disable transition in mobile to emulate a full page transition.\n\t\t\t\t\t\t\t\t\t\t\t\tdisableMotion ||\n\t\t\t\t\t\t\t\t\t\t\t\t! isLargeViewport\n\t\t\t\t\t\t\t\t\t\t\t\t\t? 0\n\t\t\t\t\t\t\t\t\t\t\t\t\t: ANIMATION_DURATION,\n\t\t\t\t\t\t\t\t\t\t\tease: [ 0.6, 0, 0.4, 1 ],\n\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<Header />\n\t\t\t\t\t\t\t\t\t</motion.div>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</AnimatePresence>\n\t\t\t\t\t\t}\n\t\t\t\t\t\tnotices={ <EditorSnackbars /> }\n\t\t\t\t\t\tcontent={\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t<GlobalStylesRenderer />\n\t\t\t\t\t\t\t\t{ isEditMode && <EditorNotices /> }\n\t\t\t\t\t\t\t\t{ showVisualEditor && (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t<TemplatePartConverter />\n\t\t\t\t\t\t\t\t\t\t<SidebarInspectorFill>\n\t\t\t\t\t\t\t\t\t\t\t<BlockInspector />\n\t\t\t\t\t\t\t\t\t\t</SidebarInspectorFill>\n\t\t\t\t\t\t\t\t\t\t{ ! isLargeViewport && (\n\t\t\t\t\t\t\t\t\t\t\t<BlockToolbar hideDragHandle />\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t<SiteEditorCanvas onClick={ onClick } />\n\t\t\t\t\t\t\t\t\t\t<PatternModal />\n\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t{ editorMode === 'text' && isEditMode && (\n\t\t\t\t\t\t\t\t\t<CodeEditor />\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t{ isEditMode && (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t<KeyboardShortcutsEditMode />\n\t\t\t\t\t\t\t\t\t\t<EditorKeyboardShortcutsRegister />\n\t\t\t\t\t\t\t\t\t\t<EditorKeyboardShortcuts />\n\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsecondarySidebar={\n\t\t\t\t\t\t\tisEditMode &&\n\t\t\t\t\t\t\t( ( shouldShowInserter && (\n\t\t\t\t\t\t\t\t<InserterSidebar\n\t\t\t\t\t\t\t\t\tcloseGeneralSidebar={ closeGeneralSidebar }\n\t\t\t\t\t\t\t\t\tisRightSidebarOpen={ isRightSidebarOpen }\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( shouldShowListView && <ListViewSidebar /> ) )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsidebar={\n\t\t\t\t\t\t\tisEditMode &&\n\t\t\t\t\t\t\t! isDistractionFree && (\n\t\t\t\t\t\t\t\t<ComplementaryArea.Slot scope=\"core\" />\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfooter={\n\t\t\t\t\t\t\tshouldShowBlockBreadcrumbs && (\n\t\t\t\t\t\t\t\t<BlockBreadcrumb\n\t\t\t\t\t\t\t\t\trootLabelText={ postTypeLabel }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlabels={ {\n\t\t\t\t\t\t\t...interfaceLabels,\n\t\t\t\t\t\t\tsecondarySidebar: secondarySidebarLabel,\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t</EditorProvider>\n\t\t\t) }\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAKA,IAAAG,QAAA,GAAAH,OAAA;AAKA,IAAAI,YAAA,GAAAJ,OAAA;AACA,IAAAK,YAAA,GAAAL,OAAA;AAMA,IAAAM,OAAA,GAAAN,OAAA;AAQA,IAAAO,KAAA,GAAAP,OAAA;AACA,IAAAQ,SAAA,GAAAR,OAAA;AAKA,IAAAS,gBAAA,GAAAT,OAAA;AAIA,IAAAU,WAAA,GAAAX,sBAAA,CAAAC,OAAA;AACA,IAAAW,eAAA,GAAAZ,sBAAA,CAAAC,OAAA;AACA,IAAAY,SAAA,GAAAb,sBAAA,CAAAC,OAAA;AACA,IAAAa,aAAA,GAAAd,sBAAA,CAAAC,OAAA;AACA,IAAAc,qBAAA,GAAAf,sBAAA,CAAAC,OAAA;AACA,IA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