@wordpress/edit-site 5.34.0 → 6.0.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 (977) hide show
  1. package/CHANGELOG.md +16 -3
  2. package/build/components/add-new-page/index.js +33 -27
  3. package/build/components/add-new-page/index.js.map +1 -1
  4. package/build/components/add-new-pattern/index.js +95 -78
  5. package/build/components/add-new-pattern/index.js.map +1 -1
  6. package/build/components/add-new-template/add-custom-generic-template-modal-content.js +35 -30
  7. package/build/components/add-new-template/add-custom-generic-template-modal-content.js.map +1 -1
  8. package/build/components/add-new-template/add-custom-template-modal-content.js +119 -95
  9. package/build/components/add-new-template/add-custom-template-modal-content.js.map +1 -1
  10. package/build/components/add-new-template/index.js +89 -73
  11. package/build/components/add-new-template/index.js.map +1 -1
  12. package/build/components/add-new-template/utils.js +36 -17
  13. package/build/components/add-new-template/utils.js.map +1 -1
  14. package/build/components/app/index.js +13 -5
  15. package/build/components/app/index.js.map +1 -1
  16. package/build/components/block-editor/block-inspector-button.js +5 -4
  17. package/build/components/block-editor/block-inspector-button.js.map +1 -1
  18. package/build/components/block-editor/use-editor-iframe-props.js +88 -0
  19. package/build/components/block-editor/use-editor-iframe-props.js.map +1 -0
  20. package/build/components/canvas-loader/index.js +13 -12
  21. package/build/components/canvas-loader/index.js.map +1 -1
  22. package/build/components/dataviews-actions/index.js +49 -0
  23. package/build/components/dataviews-actions/index.js.map +1 -0
  24. package/build/components/editor/index.js +107 -140
  25. package/build/components/editor/index.js.map +1 -1
  26. package/build/components/editor-canvas-container/index.js +27 -29
  27. package/build/components/editor-canvas-container/index.js.map +1 -1
  28. package/build/components/error-boundary/index.js +2 -2
  29. package/build/components/error-boundary/index.js.map +1 -1
  30. package/build/components/error-boundary/warning.js +13 -11
  31. package/build/components/error-boundary/warning.js.map +1 -1
  32. package/build/components/global-styles/background-panel.js +19 -6
  33. package/build/components/global-styles/background-panel.js.map +1 -1
  34. package/build/components/global-styles/block-preview-panel.js +19 -17
  35. package/build/components/global-styles/block-preview-panel.js.map +1 -1
  36. package/build/components/global-styles/color-indicator-wrapper.js +4 -4
  37. package/build/components/global-styles/color-indicator-wrapper.js.map +1 -1
  38. package/build/components/global-styles/color-palette-panel.js +32 -28
  39. package/build/components/global-styles/color-palette-panel.js.map +1 -1
  40. package/build/components/global-styles/dimensions-panel.js +2 -2
  41. package/build/components/global-styles/dimensions-panel.js.map +1 -1
  42. package/build/components/global-styles/font-families.js +55 -39
  43. package/build/components/global-styles/font-families.js.map +1 -1
  44. package/build/components/global-styles/font-family-item.js +17 -13
  45. package/build/components/global-styles/font-family-item.js.map +1 -1
  46. package/build/components/global-styles/font-library-modal/collection-font-variant.js +25 -22
  47. package/build/components/global-styles/font-library-modal/collection-font-variant.js.map +1 -1
  48. package/build/components/global-styles/font-library-modal/context.js +7 -30
  49. package/build/components/global-styles/font-library-modal/context.js.map +1 -1
  50. package/build/components/global-styles/font-library-modal/font-card.js +24 -16
  51. package/build/components/global-styles/font-library-modal/font-card.js.map +1 -1
  52. package/build/components/global-styles/font-library-modal/font-collection.js +195 -152
  53. package/build/components/global-styles/font-library-modal/font-collection.js.map +1 -1
  54. package/build/components/global-styles/font-library-modal/font-demo.js +14 -12
  55. package/build/components/global-styles/font-library-modal/font-demo.js.map +1 -1
  56. package/build/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js +29 -20
  57. package/build/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js.map +1 -1
  58. package/build/components/global-styles/font-library-modal/index.js +41 -36
  59. package/build/components/global-styles/font-library-modal/index.js.map +1 -1
  60. package/build/components/global-styles/font-library-modal/installed-fonts.js +153 -109
  61. package/build/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
  62. package/build/components/global-styles/font-library-modal/library-font-details.js +16 -14
  63. package/build/components/global-styles/font-library-modal/library-font-details.js.map +1 -1
  64. package/build/components/global-styles/font-library-modal/library-font-variant.js +25 -22
  65. package/build/components/global-styles/font-library-modal/library-font-variant.js.map +1 -1
  66. package/build/components/global-styles/font-library-modal/upload-fonts.js +40 -34
  67. package/build/components/global-styles/font-library-modal/upload-fonts.js.map +1 -1
  68. package/build/components/global-styles/font-library-modal/utils/index.js +3 -3
  69. package/build/components/global-styles/font-library-modal/utils/index.js.map +1 -1
  70. package/build/components/global-styles/gradients-palette-panel.js +41 -38
  71. package/build/components/global-styles/gradients-palette-panel.js.map +1 -1
  72. package/build/components/global-styles/header.js +37 -28
  73. package/build/components/global-styles/header.js.map +1 -1
  74. package/build/components/global-styles/highlighted-colors.js +3 -4
  75. package/build/components/global-styles/highlighted-colors.js.map +1 -1
  76. package/build/components/global-styles/hooks.js +11 -20
  77. package/build/components/global-styles/hooks.js.map +1 -1
  78. package/build/components/global-styles/icon-with-current-color.js +4 -4
  79. package/build/components/global-styles/icon-with-current-color.js.map +1 -1
  80. package/build/components/global-styles/navigation-button.js +15 -11
  81. package/build/components/global-styles/navigation-button.js.map +1 -1
  82. package/build/components/global-styles/palette.js +39 -32
  83. package/build/components/global-styles/palette.js.map +1 -1
  84. package/build/components/global-styles/preset-colors.js +28 -0
  85. package/build/components/global-styles/preset-colors.js.map +1 -0
  86. package/build/components/global-styles/preview-colors.js +23 -25
  87. package/build/components/global-styles/preview-colors.js.map +1 -1
  88. package/build/components/global-styles/preview-iframe.js +34 -29
  89. package/build/components/global-styles/preview-iframe.js.map +1 -1
  90. package/build/components/global-styles/preview-styles.js +95 -90
  91. package/build/components/global-styles/preview-styles.js.map +1 -1
  92. package/build/components/global-styles/root-menu.js +28 -21
  93. package/build/components/global-styles/root-menu.js.map +1 -1
  94. package/build/components/global-styles/screen-background.js +6 -4
  95. package/build/components/global-styles/screen-background.js.map +1 -1
  96. package/build/components/global-styles/screen-block-list.js +33 -27
  97. package/build/components/global-styles/screen-block-list.js.map +1 -1
  98. package/build/components/global-styles/screen-block.js +62 -53
  99. package/build/components/global-styles/screen-block.js.map +1 -1
  100. package/build/components/global-styles/screen-color-palette.js +29 -19
  101. package/build/components/global-styles/screen-color-palette.js.map +1 -1
  102. package/build/components/global-styles/screen-colors.js +18 -17
  103. package/build/components/global-styles/screen-colors.js.map +1 -1
  104. package/build/components/global-styles/screen-css.js +20 -14
  105. package/build/components/global-styles/screen-css.js.map +1 -1
  106. package/build/components/global-styles/screen-layout.js +9 -4
  107. package/build/components/global-styles/screen-layout.js.map +1 -1
  108. package/build/components/global-styles/screen-revisions/index.js +52 -42
  109. package/build/components/global-styles/screen-revisions/index.js.map +1 -1
  110. package/build/components/global-styles/screen-revisions/revisions-buttons.js +82 -71
  111. package/build/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
  112. package/build/components/global-styles/screen-revisions/use-global-styles-revisions.js +1 -0
  113. package/build/components/global-styles/screen-revisions/use-global-styles-revisions.js.map +1 -1
  114. package/build/components/global-styles/screen-root.js +76 -42
  115. package/build/components/global-styles/screen-root.js.map +1 -1
  116. package/build/components/global-styles/screen-shadows.js +22 -0
  117. package/build/components/global-styles/screen-shadows.js.map +1 -0
  118. package/build/components/global-styles/screen-style-variations.js +14 -9
  119. package/build/components/global-styles/screen-style-variations.js.map +1 -1
  120. package/build/components/global-styles/screen-typography-element.js +50 -45
  121. package/build/components/global-styles/screen-typography-element.js.map +1 -1
  122. package/build/components/global-styles/screen-typography.js +15 -11
  123. package/build/components/global-styles/screen-typography.js.map +1 -1
  124. package/build/components/global-styles/shadow-utils.js +230 -0
  125. package/build/components/global-styles/shadow-utils.js.map +1 -0
  126. package/build/components/global-styles/shadows-edit-panel.js +458 -0
  127. package/build/components/global-styles/shadows-edit-panel.js.map +1 -0
  128. package/build/components/global-styles/shadows-panel.js +128 -0
  129. package/build/components/global-styles/shadows-panel.js.map +1 -0
  130. package/build/components/global-styles/style-variations-container.js +67 -18
  131. package/build/components/global-styles/style-variations-container.js.map +1 -1
  132. package/build/components/global-styles/subtitle.js +5 -4
  133. package/build/components/global-styles/subtitle.js.map +1 -1
  134. package/build/components/global-styles/typography-elements.js +53 -45
  135. package/build/components/global-styles/typography-elements.js.map +1 -1
  136. package/build/components/global-styles/typography-example.js +16 -10
  137. package/build/components/global-styles/typography-example.js.map +1 -1
  138. package/build/components/global-styles/typography-panel.js +2 -2
  139. package/build/components/global-styles/typography-panel.js.map +1 -1
  140. package/build/components/global-styles/typography-preview.js +5 -4
  141. package/build/components/global-styles/typography-preview.js.map +1 -1
  142. package/build/components/global-styles/ui.js +124 -89
  143. package/build/components/global-styles/ui.js.map +1 -1
  144. package/build/components/global-styles/utils.js +28 -0
  145. package/build/components/global-styles/utils.js.map +1 -1
  146. package/build/components/global-styles/variations/variation.js +36 -25
  147. package/build/components/global-styles/variations/variation.js.map +1 -1
  148. package/build/components/global-styles/variations/variations-color.js +19 -14
  149. package/build/components/global-styles/variations/variations-color.js.map +1 -1
  150. package/build/components/global-styles/variations/variations-panel.js +27 -17
  151. package/build/components/global-styles/variations/variations-panel.js.map +1 -1
  152. package/build/components/global-styles/variations/variations-typography.js +37 -31
  153. package/build/components/global-styles/variations/variations-typography.js.map +1 -1
  154. package/build/components/global-styles-renderer/index.js +5 -1
  155. package/build/components/global-styles-renderer/index.js.map +1 -1
  156. package/build/components/global-styles-sidebar/default-sidebar.js +56 -0
  157. package/build/components/global-styles-sidebar/default-sidebar.js.map +1 -0
  158. package/build/components/{sidebar-edit-mode/global-styles-sidebar.js → global-styles-sidebar/index.js} +37 -26
  159. package/build/components/global-styles-sidebar/index.js.map +1 -0
  160. package/build/components/layout/index.js +113 -99
  161. package/build/components/layout/index.js.map +1 -1
  162. package/build/components/layout/router.js +110 -75
  163. package/build/components/layout/router.js.map +1 -1
  164. package/build/components/media/index.js +2 -2
  165. package/build/components/media/index.js.map +1 -1
  166. package/build/components/{header-edit-mode/more-menu → more-menu}/index.js +7 -3
  167. package/build/components/more-menu/index.js.map +1 -0
  168. package/build/components/{header-edit-mode/more-menu → more-menu}/site-export.js +5 -4
  169. package/build/components/more-menu/site-export.js.map +1 -0
  170. package/build/components/{header-edit-mode/more-menu → more-menu}/welcome-guide-menu-item.js +5 -4
  171. package/build/components/more-menu/welcome-guide-menu-item.js.map +1 -0
  172. package/build/components/page/header.js +24 -20
  173. package/build/components/page/header.js.map +1 -1
  174. package/build/components/page/index.js +14 -12
  175. package/build/components/page/index.js.map +1 -1
  176. package/build/components/page-pages/index.js +136 -66
  177. package/build/components/page-pages/index.js.map +1 -1
  178. package/build/components/page-patterns/delete-category-menu-item.js +23 -20
  179. package/build/components/page-patterns/delete-category-menu-item.js.map +1 -1
  180. package/build/components/page-patterns/header.js +47 -32
  181. package/build/components/page-patterns/header.js.map +1 -1
  182. package/build/components/page-patterns/index.js +120 -125
  183. package/build/components/page-patterns/index.js.map +1 -1
  184. package/build/components/page-patterns/rename-category-menu-item.js +14 -11
  185. package/build/components/page-patterns/rename-category-menu-item.js.map +1 -1
  186. package/build/components/page-patterns/use-patterns.js +7 -6
  187. package/build/components/page-patterns/use-patterns.js.map +1 -1
  188. package/build/components/page-templates/index.js +83 -72
  189. package/build/components/page-templates/index.js.map +1 -1
  190. package/build/components/pagination/index.js +51 -42
  191. package/build/components/pagination/index.js.map +1 -1
  192. package/build/components/plugin-template-setting-panel/index.js +4 -2
  193. package/build/components/plugin-template-setting-panel/index.js.map +1 -1
  194. package/build/components/resizable-frame/index.js +48 -34
  195. package/build/components/resizable-frame/index.js.map +1 -1
  196. package/build/components/revisions/index.js +31 -22
  197. package/build/components/revisions/index.js.map +1 -1
  198. package/build/components/routes/link.js +5 -4
  199. package/build/components/routes/link.js.map +1 -1
  200. package/build/components/save-button/index.js +5 -4
  201. package/build/components/save-button/index.js.map +1 -1
  202. package/build/components/save-hub/index.js +12 -11
  203. package/build/components/save-hub/index.js.map +1 -1
  204. package/build/components/save-panel/index.js +36 -30
  205. package/build/components/save-panel/index.js.map +1 -1
  206. package/build/components/sidebar/index.js +68 -35
  207. package/build/components/sidebar/index.js.map +1 -1
  208. package/build/components/sidebar-button/index.js +4 -4
  209. package/build/components/sidebar-button/index.js.map +1 -1
  210. package/build/components/sidebar-dataviews/add-new-view.js +56 -48
  211. package/build/components/sidebar-dataviews/add-new-view.js.map +1 -1
  212. package/build/components/sidebar-dataviews/custom-dataviews-list.js +106 -89
  213. package/build/components/sidebar-dataviews/custom-dataviews-list.js.map +1 -1
  214. package/build/components/sidebar-dataviews/dataview-item.js +14 -12
  215. package/build/components/sidebar-dataviews/dataview-item.js.map +1 -1
  216. package/build/components/sidebar-dataviews/default-views.js +48 -0
  217. package/build/components/sidebar-dataviews/default-views.js.map +1 -1
  218. package/build/components/sidebar-dataviews/index.js +21 -22
  219. package/build/components/sidebar-dataviews/index.js.map +1 -1
  220. package/build/components/sidebar-navigation-item/index.js +32 -28
  221. package/build/components/sidebar-navigation-item/index.js.map +1 -1
  222. package/build/components/sidebar-navigation-screen/index.js +56 -70
  223. package/build/components/sidebar-navigation-screen/index.js.map +1 -1
  224. package/build/components/sidebar-navigation-screen-details-footer/index.js +24 -17
  225. package/build/components/sidebar-navigation-screen-details-footer/index.js.map +1 -1
  226. package/build/components/sidebar-navigation-screen-details-panel/index.js +9 -7
  227. package/build/components/sidebar-navigation-screen-details-panel/index.js.map +1 -1
  228. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js +5 -4
  229. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js.map +1 -1
  230. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js +7 -7
  231. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js.map +1 -1
  232. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js +5 -4
  233. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js.map +1 -1
  234. package/build/components/sidebar-navigation-screen-global-styles/index.js +57 -45
  235. package/build/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
  236. package/build/components/sidebar-navigation-screen-main/index.js +45 -22
  237. package/build/components/sidebar-navigation-screen-main/index.js.map +1 -1
  238. package/build/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js +5 -4
  239. package/build/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js.map +1 -1
  240. package/build/components/sidebar-navigation-screen-navigation-menu/index.js +20 -12
  241. package/build/components/sidebar-navigation-screen-navigation-menu/index.js.map +1 -1
  242. package/build/components/sidebar-navigation-screen-navigation-menu/more-menu.js +61 -35
  243. package/build/components/sidebar-navigation-screen-navigation-menu/more-menu.js.map +1 -1
  244. package/build/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js +10 -8
  245. package/build/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js.map +1 -1
  246. package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +42 -36
  247. package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +1 -1
  248. package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +18 -12
  249. package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js.map +1 -1
  250. package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +1 -1
  251. package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js.map +1 -1
  252. package/build/components/sidebar-navigation-screen-navigation-menus/index.js +36 -22
  253. package/build/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
  254. package/build/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +48 -40
  255. package/build/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js.map +1 -1
  256. package/build/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +12 -9
  257. package/build/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +1 -1
  258. package/build/components/sidebar-navigation-screen-patterns/category-item.js +12 -10
  259. package/build/components/sidebar-navigation-screen-patterns/category-item.js.map +1 -1
  260. package/build/components/sidebar-navigation-screen-patterns/index.js +62 -77
  261. package/build/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
  262. package/build/components/sidebar-navigation-screen-templates-browse/content.js +17 -17
  263. package/build/components/sidebar-navigation-screen-templates-browse/content.js.map +1 -1
  264. package/build/components/sidebar-navigation-screen-templates-browse/index.js +8 -5
  265. package/build/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -1
  266. package/build/components/site-hub/index.js +83 -74
  267. package/build/components/site-hub/index.js.map +1 -1
  268. package/build/components/site-icon/index.js +9 -8
  269. package/build/components/site-icon/index.js.map +1 -1
  270. package/build/components/style-book/index.js +122 -103
  271. package/build/components/style-book/index.js.map +1 -1
  272. package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js +10 -30
  273. package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
  274. package/build/components/table/index.js +23 -15
  275. package/build/components/table/index.js.map +1 -1
  276. package/build/components/template-part-converter/convert-to-regular.js +5 -4
  277. package/build/components/template-part-converter/convert-to-regular.js.map +1 -1
  278. package/build/components/template-part-converter/convert-to-template-part.js +23 -17
  279. package/build/components/template-part-converter/convert-to-template-part.js.map +1 -1
  280. package/build/components/template-part-converter/index.js +30 -11
  281. package/build/components/template-part-converter/index.js.map +1 -1
  282. package/build/components/welcome-guide/editor.js +20 -15
  283. package/build/components/welcome-guide/editor.js.map +1 -1
  284. package/build/components/welcome-guide/image.js +13 -12
  285. package/build/components/welcome-guide/image.js.map +1 -1
  286. package/build/components/welcome-guide/index.js +4 -2
  287. package/build/components/welcome-guide/index.js.map +1 -1
  288. package/build/components/welcome-guide/page.js +18 -13
  289. package/build/components/welcome-guide/page.js.map +1 -1
  290. package/build/components/welcome-guide/styles.js +45 -28
  291. package/build/components/welcome-guide/styles.js.map +1 -1
  292. package/build/components/welcome-guide/template.js +18 -13
  293. package/build/components/welcome-guide/template.js.map +1 -1
  294. package/build/deprecated.js +4 -4
  295. package/build/deprecated.js.map +1 -1
  296. package/build/hooks/commands/use-common-commands.js +12 -24
  297. package/build/hooks/commands/use-common-commands.js.map +1 -1
  298. package/build/hooks/commands/use-edit-mode-commands.js +2 -116
  299. package/build/hooks/commands/use-edit-mode-commands.js.map +1 -1
  300. package/build/hooks/index.js +0 -1
  301. package/build/hooks/index.js.map +1 -1
  302. package/build/hooks/push-changes-to-global-styles/index.js +25 -16
  303. package/build/hooks/push-changes-to-global-styles/index.js.map +1 -1
  304. package/build/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +7 -3
  305. package/build/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map +1 -1
  306. package/build/index.js +3 -3
  307. package/build/index.js.map +1 -1
  308. package/build/store/private-actions.js +7 -1
  309. package/build/store/private-actions.js.map +1 -1
  310. package/build/store/selectors.js +2 -2
  311. package/build/store/selectors.js.map +1 -1
  312. package/build/utils/template-part-create.js +0 -62
  313. package/build/utils/template-part-create.js.map +1 -1
  314. package/build/utils/use-activate-theme.js +9 -7
  315. package/build/utils/use-activate-theme.js.map +1 -1
  316. package/build-module/components/add-new-page/index.js +34 -27
  317. package/build-module/components/add-new-page/index.js.map +1 -1
  318. package/build-module/components/add-new-pattern/index.js +98 -78
  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 +36 -30
  321. package/build-module/components/add-new-template/add-custom-generic-template-modal-content.js.map +1 -1
  322. package/build-module/components/add-new-template/add-custom-template-modal-content.js +121 -95
  323. package/build-module/components/add-new-template/add-custom-template-modal-content.js.map +1 -1
  324. package/build-module/components/add-new-template/index.js +91 -73
  325. package/build-module/components/add-new-template/index.js.map +1 -1
  326. package/build-module/components/add-new-template/utils.js +36 -17
  327. package/build-module/components/add-new-template/utils.js.map +1 -1
  328. package/build-module/components/app/index.js +15 -6
  329. package/build-module/components/app/index.js.map +1 -1
  330. package/build-module/components/block-editor/block-inspector-button.js +5 -4
  331. package/build-module/components/block-editor/block-inspector-button.js.map +1 -1
  332. package/build-module/components/block-editor/use-editor-iframe-props.js +80 -0
  333. package/build-module/components/block-editor/use-editor-iframe-props.js.map +1 -0
  334. package/build-module/components/canvas-loader/index.js +14 -13
  335. package/build-module/components/canvas-loader/index.js.map +1 -1
  336. package/build-module/components/dataviews-actions/index.js +41 -0
  337. package/build-module/components/dataviews-actions/index.js.map +1 -0
  338. package/build-module/components/editor/index.js +113 -144
  339. package/build-module/components/editor/index.js.map +1 -1
  340. package/build-module/components/editor-canvas-container/index.js +29 -30
  341. package/build-module/components/editor-canvas-container/index.js.map +1 -1
  342. package/build-module/components/error-boundary/index.js +2 -2
  343. package/build-module/components/error-boundary/index.js.map +1 -1
  344. package/build-module/components/error-boundary/warning.js +13 -11
  345. package/build-module/components/error-boundary/warning.js.map +1 -1
  346. package/build-module/components/global-styles/background-panel.js +18 -6
  347. package/build-module/components/global-styles/background-panel.js.map +1 -1
  348. package/build-module/components/global-styles/block-preview-panel.js +19 -17
  349. package/build-module/components/global-styles/block-preview-panel.js.map +1 -1
  350. package/build-module/components/global-styles/color-indicator-wrapper.js +4 -4
  351. package/build-module/components/global-styles/color-indicator-wrapper.js.map +1 -1
  352. package/build-module/components/global-styles/color-palette-panel.js +32 -28
  353. package/build-module/components/global-styles/color-palette-panel.js.map +1 -1
  354. package/build-module/components/global-styles/dimensions-panel.js +2 -2
  355. package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
  356. package/build-module/components/global-styles/font-families.js +58 -40
  357. package/build-module/components/global-styles/font-families.js.map +1 -1
  358. package/build-module/components/global-styles/font-family-item.js +18 -13
  359. package/build-module/components/global-styles/font-family-item.js.map +1 -1
  360. package/build-module/components/global-styles/font-library-modal/collection-font-variant.js +26 -22
  361. package/build-module/components/global-styles/font-library-modal/collection-font-variant.js.map +1 -1
  362. package/build-module/components/global-styles/font-library-modal/context.js +7 -30
  363. package/build-module/components/global-styles/font-library-modal/context.js.map +1 -1
  364. package/build-module/components/global-styles/font-library-modal/font-card.js +25 -16
  365. package/build-module/components/global-styles/font-library-modal/font-card.js.map +1 -1
  366. package/build-module/components/global-styles/font-library-modal/font-collection.js +198 -153
  367. package/build-module/components/global-styles/font-library-modal/font-collection.js.map +1 -1
  368. package/build-module/components/global-styles/font-library-modal/font-demo.js +14 -12
  369. package/build-module/components/global-styles/font-library-modal/font-demo.js.map +1 -1
  370. package/build-module/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js +30 -20
  371. package/build-module/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js.map +1 -1
  372. package/build-module/components/global-styles/font-library-modal/index.js +42 -36
  373. package/build-module/components/global-styles/font-library-modal/index.js.map +1 -1
  374. package/build-module/components/global-styles/font-library-modal/installed-fonts.js +157 -111
  375. package/build-module/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
  376. package/build-module/components/global-styles/font-library-modal/library-font-details.js +18 -14
  377. package/build-module/components/global-styles/font-library-modal/library-font-details.js.map +1 -1
  378. package/build-module/components/global-styles/font-library-modal/library-font-variant.js +26 -22
  379. package/build-module/components/global-styles/font-library-modal/library-font-variant.js.map +1 -1
  380. package/build-module/components/global-styles/font-library-modal/upload-fonts.js +42 -35
  381. package/build-module/components/global-styles/font-library-modal/upload-fonts.js.map +1 -1
  382. package/build-module/components/global-styles/font-library-modal/utils/index.js +3 -3
  383. package/build-module/components/global-styles/font-library-modal/utils/index.js.map +1 -1
  384. package/build-module/components/global-styles/gradients-palette-panel.js +42 -38
  385. package/build-module/components/global-styles/gradients-palette-panel.js.map +1 -1
  386. package/build-module/components/global-styles/header.js +38 -28
  387. package/build-module/components/global-styles/header.js.map +1 -1
  388. package/build-module/components/global-styles/highlighted-colors.js +3 -4
  389. package/build-module/components/global-styles/highlighted-colors.js.map +1 -1
  390. package/build-module/components/global-styles/hooks.js +11 -20
  391. package/build-module/components/global-styles/hooks.js.map +1 -1
  392. package/build-module/components/global-styles/icon-with-current-color.js +4 -4
  393. package/build-module/components/global-styles/icon-with-current-color.js.map +1 -1
  394. package/build-module/components/global-styles/navigation-button.js +16 -11
  395. package/build-module/components/global-styles/navigation-button.js.map +1 -1
  396. package/build-module/components/global-styles/palette.js +42 -34
  397. package/build-module/components/global-styles/palette.js.map +1 -1
  398. package/build-module/components/global-styles/preset-colors.js +21 -0
  399. package/build-module/components/global-styles/preset-colors.js.map +1 -0
  400. package/build-module/components/global-styles/preview-colors.js +23 -25
  401. package/build-module/components/global-styles/preview-colors.js.map +1 -1
  402. package/build-module/components/global-styles/preview-iframe.js +36 -29
  403. package/build-module/components/global-styles/preview-iframe.js.map +1 -1
  404. package/build-module/components/global-styles/preview-styles.js +96 -90
  405. package/build-module/components/global-styles/preview-styles.js.map +1 -1
  406. package/build-module/components/global-styles/root-menu.js +31 -22
  407. package/build-module/components/global-styles/root-menu.js.map +1 -1
  408. package/build-module/components/global-styles/screen-background.js +8 -4
  409. package/build-module/components/global-styles/screen-background.js.map +1 -1
  410. package/build-module/components/global-styles/screen-block-list.js +35 -27
  411. package/build-module/components/global-styles/screen-block-list.js.map +1 -1
  412. package/build-module/components/global-styles/screen-block.js +64 -53
  413. package/build-module/components/global-styles/screen-block.js.map +1 -1
  414. package/build-module/components/global-styles/screen-color-palette.js +31 -19
  415. package/build-module/components/global-styles/screen-color-palette.js.map +1 -1
  416. package/build-module/components/global-styles/screen-colors.js +20 -17
  417. package/build-module/components/global-styles/screen-colors.js.map +1 -1
  418. package/build-module/components/global-styles/screen-css.js +22 -14
  419. package/build-module/components/global-styles/screen-css.js.map +1 -1
  420. package/build-module/components/global-styles/screen-layout.js +11 -4
  421. package/build-module/components/global-styles/screen-layout.js.map +1 -1
  422. package/build-module/components/global-styles/screen-revisions/index.js +54 -42
  423. package/build-module/components/global-styles/screen-revisions/index.js.map +1 -1
  424. package/build-module/components/global-styles/screen-revisions/revisions-buttons.js +83 -71
  425. package/build-module/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
  426. package/build-module/components/global-styles/screen-revisions/use-global-styles-revisions.js +1 -0
  427. package/build-module/components/global-styles/screen-revisions/use-global-styles-revisions.js.map +1 -1
  428. package/build-module/components/global-styles/screen-root.js +78 -42
  429. package/build-module/components/global-styles/screen-root.js.map +1 -1
  430. package/build-module/components/global-styles/screen-shadows.js +13 -0
  431. package/build-module/components/global-styles/screen-shadows.js.map +1 -0
  432. package/build-module/components/global-styles/screen-style-variations.js +16 -9
  433. package/build-module/components/global-styles/screen-style-variations.js.map +1 -1
  434. package/build-module/components/global-styles/screen-typography-element.js +52 -45
  435. package/build-module/components/global-styles/screen-typography-element.js.map +1 -1
  436. package/build-module/components/global-styles/screen-typography.js +17 -11
  437. package/build-module/components/global-styles/screen-typography.js.map +1 -1
  438. package/build-module/components/global-styles/shadow-utils.js +221 -0
  439. package/build-module/components/global-styles/shadow-utils.js.map +1 -0
  440. package/build-module/components/global-styles/shadows-edit-panel.js +452 -0
  441. package/build-module/components/global-styles/shadows-edit-panel.js.map +1 -0
  442. package/build-module/components/global-styles/shadows-panel.js +121 -0
  443. package/build-module/components/global-styles/shadows-panel.js.map +1 -0
  444. package/build-module/components/global-styles/style-variations-container.js +68 -19
  445. package/build-module/components/global-styles/style-variations-container.js.map +1 -1
  446. package/build-module/components/global-styles/subtitle.js +5 -4
  447. package/build-module/components/global-styles/subtitle.js.map +1 -1
  448. package/build-module/components/global-styles/typography-elements.js +54 -45
  449. package/build-module/components/global-styles/typography-elements.js.map +1 -1
  450. package/build-module/components/global-styles/typography-example.js +16 -9
  451. package/build-module/components/global-styles/typography-example.js.map +1 -1
  452. package/build-module/components/global-styles/typography-panel.js +2 -2
  453. package/build-module/components/global-styles/typography-panel.js.map +1 -1
  454. package/build-module/components/global-styles/typography-preview.js +5 -4
  455. package/build-module/components/global-styles/typography-preview.js.map +1 -1
  456. package/build-module/components/global-styles/ui.js +126 -89
  457. package/build-module/components/global-styles/ui.js.map +1 -1
  458. package/build-module/components/global-styles/utils.js +27 -0
  459. package/build-module/components/global-styles/utils.js.map +1 -1
  460. package/build-module/components/global-styles/variations/variation.js +35 -24
  461. package/build-module/components/global-styles/variations/variation.js.map +1 -1
  462. package/build-module/components/global-styles/variations/variations-color.js +21 -15
  463. package/build-module/components/global-styles/variations/variations-color.js.map +1 -1
  464. package/build-module/components/global-styles/variations/variations-panel.js +28 -18
  465. package/build-module/components/global-styles/variations/variations-panel.js.map +1 -1
  466. package/build-module/components/global-styles/variations/variations-typography.js +38 -31
  467. package/build-module/components/global-styles/variations/variations-typography.js.map +1 -1
  468. package/build-module/components/global-styles-renderer/index.js +5 -1
  469. package/build-module/components/global-styles-renderer/index.js.map +1 -1
  470. package/build-module/components/global-styles-sidebar/default-sidebar.js +51 -0
  471. package/build-module/components/global-styles-sidebar/default-sidebar.js.map +1 -0
  472. package/build-module/components/{sidebar-edit-mode/global-styles-sidebar.js → global-styles-sidebar/index.js} +38 -26
  473. package/build-module/components/global-styles-sidebar/index.js.map +1 -0
  474. package/build-module/components/layout/index.js +116 -100
  475. package/build-module/components/layout/index.js.map +1 -1
  476. package/build-module/components/layout/router.js +110 -76
  477. package/build-module/components/layout/router.js.map +1 -1
  478. package/build-module/components/media/index.js +2 -2
  479. package/build-module/components/media/index.js.map +1 -1
  480. package/build-module/components/{header-edit-mode/more-menu → more-menu}/index.js +9 -3
  481. package/build-module/components/more-menu/index.js.map +1 -0
  482. package/build-module/components/{header-edit-mode/more-menu → more-menu}/site-export.js +5 -4
  483. package/build-module/components/more-menu/site-export.js.map +1 -0
  484. package/build-module/components/{header-edit-mode/more-menu → more-menu}/welcome-guide-menu-item.js +5 -4
  485. package/build-module/components/more-menu/welcome-guide-menu-item.js.map +1 -0
  486. package/build-module/components/page/header.js +25 -19
  487. package/build-module/components/page/header.js.map +1 -1
  488. package/build-module/components/page/index.js +16 -13
  489. package/build-module/components/page/index.js.map +1 -1
  490. package/build-module/components/page-pages/index.js +141 -69
  491. package/build-module/components/page-pages/index.js.map +1 -1
  492. package/build-module/components/page-patterns/delete-category-menu-item.js +25 -20
  493. package/build-module/components/page-patterns/delete-category-menu-item.js.map +1 -1
  494. package/build-module/components/page-patterns/header.js +48 -32
  495. package/build-module/components/page-patterns/header.js.map +1 -1
  496. package/build-module/components/page-patterns/index.js +121 -125
  497. package/build-module/components/page-patterns/index.js.map +1 -1
  498. package/build-module/components/page-patterns/rename-category-menu-item.js +16 -11
  499. package/build-module/components/page-patterns/rename-category-menu-item.js.map +1 -1
  500. package/build-module/components/page-patterns/use-patterns.js +7 -6
  501. package/build-module/components/page-patterns/use-patterns.js.map +1 -1
  502. package/build-module/components/page-templates/index.js +85 -72
  503. package/build-module/components/page-templates/index.js.map +1 -1
  504. package/build-module/components/pagination/index.js +52 -42
  505. package/build-module/components/pagination/index.js.map +1 -1
  506. package/build-module/components/plugin-template-setting-panel/index.js +4 -2
  507. package/build-module/components/plugin-template-setting-panel/index.js.map +1 -1
  508. package/build-module/components/resizable-frame/index.js +51 -35
  509. package/build-module/components/resizable-frame/index.js.map +1 -1
  510. package/build-module/components/revisions/index.js +31 -21
  511. package/build-module/components/revisions/index.js.map +1 -1
  512. package/build-module/components/routes/link.js +5 -4
  513. package/build-module/components/routes/link.js.map +1 -1
  514. package/build-module/components/save-button/index.js +5 -4
  515. package/build-module/components/save-button/index.js.map +1 -1
  516. package/build-module/components/save-hub/index.js +12 -11
  517. package/build-module/components/save-hub/index.js.map +1 -1
  518. package/build-module/components/save-panel/index.js +37 -30
  519. package/build-module/components/save-panel/index.js.map +1 -1
  520. package/build-module/components/sidebar/index.js +69 -36
  521. package/build-module/components/sidebar/index.js.map +1 -1
  522. package/build-module/components/sidebar-button/index.js +4 -4
  523. package/build-module/components/sidebar-button/index.js.map +1 -1
  524. package/build-module/components/sidebar-dataviews/add-new-view.js +58 -48
  525. package/build-module/components/sidebar-dataviews/add-new-view.js.map +1 -1
  526. package/build-module/components/sidebar-dataviews/custom-dataviews-list.js +108 -89
  527. package/build-module/components/sidebar-dataviews/custom-dataviews-list.js.map +1 -1
  528. package/build-module/components/sidebar-dataviews/dataview-item.js +15 -12
  529. package/build-module/components/sidebar-dataviews/dataview-item.js.map +1 -1
  530. package/build-module/components/sidebar-dataviews/default-views.js +49 -1
  531. package/build-module/components/sidebar-dataviews/default-views.js.map +1 -1
  532. package/build-module/components/sidebar-dataviews/index.js +23 -22
  533. package/build-module/components/sidebar-dataviews/index.js.map +1 -1
  534. package/build-module/components/sidebar-navigation-item/index.js +33 -28
  535. package/build-module/components/sidebar-navigation-item/index.js.map +1 -1
  536. package/build-module/components/sidebar-navigation-screen/index.js +58 -70
  537. package/build-module/components/sidebar-navigation-screen/index.js.map +1 -1
  538. package/build-module/components/sidebar-navigation-screen-details-footer/index.js +25 -17
  539. package/build-module/components/sidebar-navigation-screen-details-footer/index.js.map +1 -1
  540. package/build-module/components/sidebar-navigation-screen-details-panel/index.js +10 -7
  541. package/build-module/components/sidebar-navigation-screen-details-panel/index.js.map +1 -1
  542. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js +5 -4
  543. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js.map +1 -1
  544. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js +7 -7
  545. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js.map +1 -1
  546. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js +5 -4
  547. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js.map +1 -1
  548. package/build-module/components/sidebar-navigation-screen-global-styles/index.js +59 -45
  549. package/build-module/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
  550. package/build-module/components/sidebar-navigation-screen-main/index.js +47 -22
  551. package/build-module/components/sidebar-navigation-screen-main/index.js.map +1 -1
  552. package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js +5 -4
  553. package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js.map +1 -1
  554. package/build-module/components/sidebar-navigation-screen-navigation-menu/index.js +20 -12
  555. package/build-module/components/sidebar-navigation-screen-navigation-menu/index.js.map +1 -1
  556. package/build-module/components/sidebar-navigation-screen-navigation-menu/more-menu.js +63 -35
  557. package/build-module/components/sidebar-navigation-screen-navigation-menu/more-menu.js.map +1 -1
  558. package/build-module/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js +10 -8
  559. package/build-module/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js.map +1 -1
  560. package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +43 -36
  561. package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +1 -1
  562. package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +19 -12
  563. package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js.map +1 -1
  564. package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +1 -1
  565. package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js.map +1 -1
  566. package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js +36 -22
  567. package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
  568. package/build-module/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +50 -40
  569. package/build-module/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js.map +1 -1
  570. package/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +14 -9
  571. package/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +1 -1
  572. package/build-module/components/sidebar-navigation-screen-patterns/category-item.js +12 -10
  573. package/build-module/components/sidebar-navigation-screen-patterns/category-item.js.map +1 -1
  574. package/build-module/components/sidebar-navigation-screen-patterns/index.js +64 -77
  575. package/build-module/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
  576. package/build-module/components/sidebar-navigation-screen-templates-browse/content.js +18 -17
  577. package/build-module/components/sidebar-navigation-screen-templates-browse/content.js.map +1 -1
  578. package/build-module/components/sidebar-navigation-screen-templates-browse/index.js +8 -5
  579. package/build-module/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -1
  580. package/build-module/components/site-hub/index.js +85 -75
  581. package/build-module/components/site-hub/index.js.map +1 -1
  582. package/build-module/components/site-icon/index.js +9 -8
  583. package/build-module/components/site-icon/index.js.map +1 -1
  584. package/build-module/components/style-book/index.js +122 -102
  585. package/build-module/components/style-book/index.js.map +1 -1
  586. package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js +10 -30
  587. package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
  588. package/build-module/components/table/index.js +24 -15
  589. package/build-module/components/table/index.js.map +1 -1
  590. package/build-module/components/template-part-converter/convert-to-regular.js +5 -4
  591. package/build-module/components/template-part-converter/convert-to-regular.js.map +1 -1
  592. package/build-module/components/template-part-converter/convert-to-template-part.js +25 -16
  593. package/build-module/components/template-part-converter/convert-to-template-part.js.map +1 -1
  594. package/build-module/components/template-part-converter/index.js +30 -11
  595. package/build-module/components/template-part-converter/index.js.map +1 -1
  596. package/build-module/components/welcome-guide/editor.js +22 -15
  597. package/build-module/components/welcome-guide/editor.js.map +1 -1
  598. package/build-module/components/welcome-guide/image.js +14 -12
  599. package/build-module/components/welcome-guide/image.js.map +1 -1
  600. package/build-module/components/welcome-guide/index.js +6 -2
  601. package/build-module/components/welcome-guide/index.js.map +1 -1
  602. package/build-module/components/welcome-guide/page.js +20 -13
  603. package/build-module/components/welcome-guide/page.js.map +1 -1
  604. package/build-module/components/welcome-guide/styles.js +47 -28
  605. package/build-module/components/welcome-guide/styles.js.map +1 -1
  606. package/build-module/components/welcome-guide/template.js +20 -13
  607. package/build-module/components/welcome-guide/template.js.map +1 -1
  608. package/build-module/deprecated.js +4 -4
  609. package/build-module/deprecated.js.map +1 -1
  610. package/build-module/hooks/commands/use-common-commands.js +12 -23
  611. package/build-module/hooks/commands/use-common-commands.js.map +1 -1
  612. package/build-module/hooks/commands/use-edit-mode-commands.js +4 -118
  613. package/build-module/hooks/commands/use-edit-mode-commands.js.map +1 -1
  614. package/build-module/hooks/index.js +0 -1
  615. package/build-module/hooks/index.js.map +1 -1
  616. package/build-module/hooks/push-changes-to-global-styles/index.js +27 -16
  617. package/build-module/hooks/push-changes-to-global-styles/index.js.map +1 -1
  618. package/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +6 -2
  619. package/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map +1 -1
  620. package/build-module/index.js +3 -3
  621. package/build-module/index.js.map +1 -1
  622. package/build-module/store/private-actions.js +7 -1
  623. package/build-module/store/private-actions.js.map +1 -1
  624. package/build-module/store/selectors.js +2 -2
  625. package/build-module/store/selectors.js.map +1 -1
  626. package/build-module/utils/template-part-create.js +0 -52
  627. package/build-module/utils/template-part-create.js.map +1 -1
  628. package/build-module/utils/use-activate-theme.js +9 -7
  629. package/build-module/utils/use-activate-theme.js.map +1 -1
  630. package/build-style/style-rtl.css +486 -981
  631. package/build-style/style.css +486 -981
  632. package/package.json +44 -47
  633. package/src/components/add-new-pattern/index.js +46 -37
  634. package/src/components/add-new-template/index.js +4 -2
  635. package/src/components/add-new-template/utils.js +77 -39
  636. package/src/components/app/index.js +5 -2
  637. package/src/components/block-editor/style.scss +4 -139
  638. package/src/components/block-editor/use-editor-iframe-props.js +79 -0
  639. package/src/components/canvas-loader/index.js +5 -2
  640. package/src/components/dataviews-actions/index.js +43 -0
  641. package/src/components/editor/index.js +129 -215
  642. package/src/components/editor/style.scss +2 -17
  643. package/src/components/editor-canvas-container/index.js +30 -35
  644. package/src/components/editor-canvas-container/style.scss +16 -0
  645. package/src/components/global-styles/background-panel.js +20 -4
  646. package/src/components/global-styles/color-indicator-wrapper.js +2 -2
  647. package/src/components/global-styles/color-palette-panel.js +3 -4
  648. package/src/components/global-styles/font-families.js +25 -18
  649. package/src/components/global-styles/font-family-item.js +2 -2
  650. package/src/components/global-styles/font-library-modal/collection-font-variant.js +2 -1
  651. package/src/components/global-styles/font-library-modal/context.js +6 -44
  652. package/src/components/global-styles/font-library-modal/font-collection.js +3 -5
  653. package/src/components/global-styles/font-library-modal/installed-fonts.js +42 -12
  654. package/src/components/global-styles/font-library-modal/library-font-variant.js +2 -1
  655. package/src/components/global-styles/font-library-modal/upload-fonts.js +1 -4
  656. package/src/components/global-styles/font-library-modal/utils/index.js +1 -1
  657. package/src/components/global-styles/gradients-palette-panel.js +1 -4
  658. package/src/components/global-styles/hooks.js +10 -36
  659. package/src/components/global-styles/icon-with-current-color.js +2 -2
  660. package/src/components/global-styles/palette.js +9 -18
  661. package/src/components/global-styles/preset-colors.js +18 -0
  662. package/src/components/global-styles/preview-colors.js +4 -7
  663. package/src/components/global-styles/root-menu.js +16 -12
  664. package/src/components/global-styles/screen-block.js +1 -1
  665. package/src/components/global-styles/screen-color-palette.js +4 -4
  666. package/src/components/global-styles/screen-colors.js +0 -2
  667. package/src/components/global-styles/screen-layout.js +9 -2
  668. package/src/components/global-styles/screen-revisions/index.js +6 -0
  669. package/src/components/global-styles/screen-revisions/revisions-buttons.js +2 -2
  670. package/src/components/global-styles/screen-revisions/use-global-styles-revisions.js +1 -0
  671. package/src/components/global-styles/screen-shadows.js +13 -0
  672. package/src/components/global-styles/screen-typography.js +1 -1
  673. package/src/components/global-styles/shadow-utils.js +158 -0
  674. package/src/components/global-styles/shadows-edit-panel.js +555 -0
  675. package/src/components/global-styles/shadows-panel.js +147 -0
  676. package/src/components/global-styles/stories/index.story.js +2 -1
  677. package/src/components/global-styles/style-variations-container.js +73 -10
  678. package/src/components/global-styles/style.scss +54 -5
  679. package/src/components/global-styles/test/shadow-utils.spec.js +251 -0
  680. package/src/components/global-styles/test/utils.spec.js +59 -0
  681. package/src/components/global-styles/typography-example.js +2 -1
  682. package/src/components/global-styles/ui.js +15 -7
  683. package/src/components/global-styles/utils.js +27 -0
  684. package/src/components/global-styles/variations/style.scss +17 -30
  685. package/src/components/global-styles/variations/variation.js +15 -10
  686. package/src/components/global-styles/variations/variations-color.js +7 -9
  687. package/src/components/global-styles/variations/variations-panel.js +16 -5
  688. package/src/components/global-styles/variations/variations-typography.js +2 -1
  689. package/src/components/global-styles-renderer/index.js +7 -1
  690. package/src/components/{sidebar-edit-mode/global-styles-sidebar.js → global-styles-sidebar/index.js} +7 -2
  691. package/src/components/{sidebar-edit-mode → global-styles-sidebar}/style.scss +0 -11
  692. package/src/components/layout/index.js +10 -10
  693. package/src/components/layout/router.js +96 -61
  694. package/src/components/layout/style.scss +10 -6
  695. package/src/components/{header-edit-mode/more-menu → more-menu}/index.js +1 -1
  696. package/src/components/page/header.js +17 -13
  697. package/src/components/page/index.js +3 -7
  698. package/src/components/page/style.scss +21 -7
  699. package/src/components/page-pages/index.js +162 -68
  700. package/src/components/page-pages/style.scss +14 -10
  701. package/src/components/page-patterns/delete-category-menu-item.js +1 -2
  702. package/src/components/page-patterns/header.js +45 -33
  703. package/src/components/page-patterns/index.js +25 -81
  704. package/src/components/page-patterns/style.scss +21 -14
  705. package/src/components/page-patterns/use-patterns.js +13 -6
  706. package/src/components/page-templates/index.js +10 -29
  707. package/src/components/pagination/index.js +2 -2
  708. package/src/components/resizable-frame/index.js +17 -5
  709. package/src/components/revisions/index.js +2 -1
  710. package/src/components/save-panel/index.js +5 -7
  711. package/src/components/sidebar/index.js +61 -37
  712. package/src/components/sidebar-button/index.js +2 -5
  713. package/src/components/sidebar-dataviews/add-new-view.js +5 -5
  714. package/src/components/sidebar-dataviews/custom-dataviews-list.js +5 -7
  715. package/src/components/sidebar-dataviews/dataview-item.js +6 -9
  716. package/src/components/sidebar-dataviews/default-views.js +61 -1
  717. package/src/components/sidebar-dataviews/index.js +4 -9
  718. package/src/components/sidebar-navigation-item/index.js +10 -10
  719. package/src/components/sidebar-navigation-screen/index.js +7 -31
  720. package/src/components/sidebar-navigation-screen/style.scss +11 -9
  721. package/src/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js +2 -2
  722. package/src/components/sidebar-navigation-screen-global-styles/index.js +10 -3
  723. package/src/components/sidebar-navigation-screen-main/index.js +14 -4
  724. package/src/components/sidebar-navigation-screen-navigation-menu/index.js +6 -1
  725. package/src/components/sidebar-navigation-screen-navigation-menu/more-menu.js +18 -1
  726. package/src/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +3 -0
  727. package/src/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +1 -1
  728. package/src/components/sidebar-navigation-screen-navigation-menus/index.js +8 -4
  729. package/src/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +6 -13
  730. package/src/components/sidebar-navigation-screen-navigation-menus/style.scss +0 -61
  731. package/src/components/sidebar-navigation-screen-patterns/category-item.js +5 -3
  732. package/src/components/sidebar-navigation-screen-patterns/index.js +8 -29
  733. package/src/components/sidebar-navigation-screen-templates-browse/content.js +1 -1
  734. package/src/components/sidebar-navigation-screen-templates-browse/index.js +3 -2
  735. package/src/components/site-hub/index.js +14 -15
  736. package/src/components/site-hub/style.scss +46 -9
  737. package/src/components/site-icon/index.js +2 -2
  738. package/src/components/style-book/index.js +8 -7
  739. package/src/components/sync-state-with-url/use-init-edited-entity-from-url.js +18 -23
  740. package/src/components/template-part-converter/convert-to-template-part.js +4 -1
  741. package/src/components/template-part-converter/index.js +16 -3
  742. package/src/hooks/commands/use-common-commands.js +12 -23
  743. package/src/hooks/commands/use-edit-mode-commands.js +4 -118
  744. package/src/hooks/index.js +0 -1
  745. package/src/hooks/push-changes-to-global-styles/index.js +2 -1
  746. package/src/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +7 -2
  747. package/src/index.js +1 -1
  748. package/src/store/private-actions.js +9 -1
  749. package/src/store/selectors.js +2 -2
  750. package/src/style.scss +1 -17
  751. package/src/utils/template-part-create.js +0 -67
  752. package/src/utils/use-activate-theme.js +5 -5
  753. package/build/components/block-editor/editor-canvas.js +0 -153
  754. package/build/components/block-editor/editor-canvas.js.map +0 -1
  755. package/build/components/block-editor/resizable-editor.js +0 -86
  756. package/build/components/block-editor/resizable-editor.js.map +0 -1
  757. package/build/components/block-editor/resize-handle.js +0 -57
  758. package/build/components/block-editor/resize-handle.js.map +0 -1
  759. package/build/components/block-editor/site-editor-canvas.js +0 -95
  760. package/build/components/block-editor/site-editor-canvas.js.map +0 -1
  761. package/build/components/code-editor/index.js +0 -111
  762. package/build/components/code-editor/index.js.map +0 -1
  763. package/build/components/create-template-part-modal/index.js +0 -151
  764. package/build/components/create-template-part-modal/index.js.map +0 -1
  765. package/build/components/global-styles/global-styles-provider.js +0 -129
  766. package/build/components/global-styles/global-styles-provider.js.map +0 -1
  767. package/build/components/header-edit-mode/document-tools/index.js +0 -68
  768. package/build/components/header-edit-mode/document-tools/index.js.map +0 -1
  769. package/build/components/header-edit-mode/index.js +0 -150
  770. package/build/components/header-edit-mode/index.js.map +0 -1
  771. package/build/components/header-edit-mode/more-menu/index.js.map +0 -1
  772. package/build/components/header-edit-mode/more-menu/site-export.js.map +0 -1
  773. package/build/components/header-edit-mode/more-menu/welcome-guide-menu-item.js.map +0 -1
  774. package/build/components/page-patterns/dataviews-pattern-actions.js +0 -387
  775. package/build/components/page-patterns/dataviews-pattern-actions.js.map +0 -1
  776. package/build/components/pattern-modal/duplicate.js +0 -70
  777. package/build/components/pattern-modal/duplicate.js.map +0 -1
  778. package/build/components/pattern-modal/index.js +0 -23
  779. package/build/components/pattern-modal/index.js.map +0 -1
  780. package/build/components/pattern-modal/rename.js +0 -45
  781. package/build/components/pattern-modal/rename.js.map +0 -1
  782. package/build/components/rename-post-menu-item/index.js +0 -109
  783. package/build/components/rename-post-menu-item/index.js.map +0 -1
  784. package/build/components/sidebar-edit-mode/default-sidebar.js +0 -52
  785. package/build/components/sidebar-edit-mode/default-sidebar.js.map +0 -1
  786. package/build/components/sidebar-edit-mode/global-styles-sidebar.js.map +0 -1
  787. package/build/components/sidebar-edit-mode/index.js +0 -147
  788. package/build/components/sidebar-edit-mode/index.js.map +0 -1
  789. package/build/components/sidebar-edit-mode/page-panels/index.js +0 -129
  790. package/build/components/sidebar-edit-mode/page-panels/index.js.map +0 -1
  791. package/build/components/sidebar-edit-mode/page-panels/page-content.js +0 -34
  792. package/build/components/sidebar-edit-mode/page-panels/page-content.js.map +0 -1
  793. package/build/components/sidebar-edit-mode/page-panels/page-summary.js +0 -46
  794. package/build/components/sidebar-edit-mode/page-panels/page-summary.js.map +0 -1
  795. package/build/components/sidebar-edit-mode/settings-header/index.js +0 -42
  796. package/build/components/sidebar-edit-mode/settings-header/index.js.map +0 -1
  797. package/build/components/sidebar-edit-mode/template-panel/hooks.js +0 -86
  798. package/build/components/sidebar-edit-mode/template-panel/hooks.js.map +0 -1
  799. package/build/components/sidebar-edit-mode/template-panel/index.js +0 -127
  800. package/build/components/sidebar-edit-mode/template-panel/index.js.map +0 -1
  801. package/build/components/sidebar-navigation-screen-page/index.js +0 -163
  802. package/build/components/sidebar-navigation-screen-page/index.js.map +0 -1
  803. package/build/components/sidebar-navigation-screen-page/page-details.js +0 -127
  804. package/build/components/sidebar-navigation-screen-page/page-details.js.map +0 -1
  805. package/build/components/sidebar-navigation-screen-page/status-label.js +0 -65
  806. package/build/components/sidebar-navigation-screen-page/status-label.js.map +0 -1
  807. package/build/components/sidebar-navigation-screen-pattern/index.js +0 -72
  808. package/build/components/sidebar-navigation-screen-pattern/index.js.map +0 -1
  809. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js +0 -38
  810. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js.map +0 -1
  811. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js +0 -29
  812. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js.map +0 -1
  813. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js +0 -37
  814. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js.map +0 -1
  815. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js +0 -45
  816. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js.map +0 -1
  817. package/build/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js +0 -88
  818. package/build/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js.map +0 -1
  819. package/build/components/sidebar-navigation-screen-pattern/use-navigation-menu-title.js +0 -29
  820. package/build/components/sidebar-navigation-screen-pattern/use-navigation-menu-title.js.map +0 -1
  821. package/build/components/sidebar-navigation-screen-pattern/use-pattern-details.js +0 -138
  822. package/build/components/sidebar-navigation-screen-pattern/use-pattern-details.js.map +0 -1
  823. package/build/components/sidebar-navigation-screen-template/home-template-details.js +0 -110
  824. package/build/components/sidebar-navigation-screen-template/home-template-details.js.map +0 -1
  825. package/build/components/sidebar-navigation-screen-template/index.js +0 -118
  826. package/build/components/sidebar-navigation-screen-template/index.js.map +0 -1
  827. package/build/components/sidebar-navigation-screen-template/template-areas.js +0 -117
  828. package/build/components/sidebar-navigation-screen-template/template-areas.js.map +0 -1
  829. package/build/components/start-template-options/index.js +0 -191
  830. package/build/components/start-template-options/index.js.map +0 -1
  831. package/build/components/template-actions/index.js +0 -131
  832. package/build/components/template-actions/index.js.map +0 -1
  833. package/build/hooks/components.js +0 -10
  834. package/build/hooks/components.js.map +0 -1
  835. package/build/utils/get-is-list-page.js +0 -28
  836. package/build/utils/get-is-list-page.js.map +0 -1
  837. package/build/utils/math.js +0 -98
  838. package/build/utils/math.js.map +0 -1
  839. package/build-module/components/block-editor/editor-canvas.js +0 -145
  840. package/build-module/components/block-editor/editor-canvas.js.map +0 -1
  841. package/build-module/components/block-editor/resizable-editor.js +0 -79
  842. package/build-module/components/block-editor/resizable-editor.js.map +0 -1
  843. package/build-module/components/block-editor/resize-handle.js +0 -50
  844. package/build-module/components/block-editor/resize-handle.js.map +0 -1
  845. package/build-module/components/block-editor/site-editor-canvas.js +0 -86
  846. package/build-module/components/block-editor/site-editor-canvas.js.map +0 -1
  847. package/build-module/components/code-editor/index.js +0 -103
  848. package/build-module/components/code-editor/index.js.map +0 -1
  849. package/build-module/components/create-template-part-modal/index.js +0 -143
  850. package/build-module/components/create-template-part-modal/index.js.map +0 -1
  851. package/build-module/components/global-styles/global-styles-provider.js +0 -120
  852. package/build-module/components/global-styles/global-styles-provider.js.map +0 -1
  853. package/build-module/components/header-edit-mode/document-tools/index.js +0 -61
  854. package/build-module/components/header-edit-mode/document-tools/index.js.map +0 -1
  855. package/build-module/components/header-edit-mode/index.js +0 -142
  856. package/build-module/components/header-edit-mode/index.js.map +0 -1
  857. package/build-module/components/header-edit-mode/more-menu/index.js.map +0 -1
  858. package/build-module/components/header-edit-mode/more-menu/site-export.js.map +0 -1
  859. package/build-module/components/header-edit-mode/more-menu/welcome-guide-menu-item.js.map +0 -1
  860. package/build-module/components/page-patterns/dataviews-pattern-actions.js +0 -380
  861. package/build-module/components/page-patterns/dataviews-pattern-actions.js.map +0 -1
  862. package/build-module/components/pattern-modal/duplicate.js +0 -62
  863. package/build-module/components/pattern-modal/duplicate.js.map +0 -1
  864. package/build-module/components/pattern-modal/index.js +0 -14
  865. package/build-module/components/pattern-modal/index.js.map +0 -1
  866. package/build-module/components/pattern-modal/rename.js +0 -37
  867. package/build-module/components/pattern-modal/rename.js.map +0 -1
  868. package/build-module/components/rename-post-menu-item/index.js +0 -102
  869. package/build-module/components/rename-post-menu-item/index.js.map +0 -1
  870. package/build-module/components/sidebar-edit-mode/default-sidebar.js +0 -45
  871. package/build-module/components/sidebar-edit-mode/default-sidebar.js.map +0 -1
  872. package/build-module/components/sidebar-edit-mode/global-styles-sidebar.js.map +0 -1
  873. package/build-module/components/sidebar-edit-mode/index.js +0 -138
  874. package/build-module/components/sidebar-edit-mode/index.js.map +0 -1
  875. package/build-module/components/sidebar-edit-mode/page-panels/index.js +0 -121
  876. package/build-module/components/sidebar-edit-mode/page-panels/index.js.map +0 -1
  877. package/build-module/components/sidebar-edit-mode/page-panels/page-content.js +0 -27
  878. package/build-module/components/sidebar-edit-mode/page-panels/page-content.js.map +0 -1
  879. package/build-module/components/sidebar-edit-mode/page-panels/page-summary.js +0 -39
  880. package/build-module/components/sidebar-edit-mode/page-panels/page-summary.js.map +0 -1
  881. package/build-module/components/sidebar-edit-mode/settings-header/index.js +0 -35
  882. package/build-module/components/sidebar-edit-mode/settings-header/index.js.map +0 -1
  883. package/build-module/components/sidebar-edit-mode/template-panel/hooks.js +0 -79
  884. package/build-module/components/sidebar-edit-mode/template-panel/hooks.js.map +0 -1
  885. package/build-module/components/sidebar-edit-mode/template-panel/index.js +0 -119
  886. package/build-module/components/sidebar-edit-mode/template-panel/index.js.map +0 -1
  887. package/build-module/components/sidebar-navigation-screen-page/index.js +0 -155
  888. package/build-module/components/sidebar-navigation-screen-page/index.js.map +0 -1
  889. package/build-module/components/sidebar-navigation-screen-page/page-details.js +0 -120
  890. package/build-module/components/sidebar-navigation-screen-page/page-details.js.map +0 -1
  891. package/build-module/components/sidebar-navigation-screen-page/status-label.js +0 -57
  892. package/build-module/components/sidebar-navigation-screen-page/status-label.js.map +0 -1
  893. package/build-module/components/sidebar-navigation-screen-pattern/index.js +0 -64
  894. package/build-module/components/sidebar-navigation-screen-pattern/index.js.map +0 -1
  895. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js +0 -30
  896. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js.map +0 -1
  897. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js +0 -20
  898. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js.map +0 -1
  899. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js +0 -29
  900. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js.map +0 -1
  901. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js +0 -36
  902. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js.map +0 -1
  903. package/build-module/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js +0 -80
  904. package/build-module/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js.map +0 -1
  905. package/build-module/components/sidebar-navigation-screen-pattern/use-navigation-menu-title.js +0 -22
  906. package/build-module/components/sidebar-navigation-screen-pattern/use-navigation-menu-title.js.map +0 -1
  907. package/build-module/components/sidebar-navigation-screen-pattern/use-pattern-details.js +0 -130
  908. package/build-module/components/sidebar-navigation-screen-pattern/use-pattern-details.js.map +0 -1
  909. package/build-module/components/sidebar-navigation-screen-template/home-template-details.js +0 -103
  910. package/build-module/components/sidebar-navigation-screen-template/home-template-details.js.map +0 -1
  911. package/build-module/components/sidebar-navigation-screen-template/index.js +0 -110
  912. package/build-module/components/sidebar-navigation-screen-template/index.js.map +0 -1
  913. package/build-module/components/sidebar-navigation-screen-template/template-areas.js +0 -109
  914. package/build-module/components/sidebar-navigation-screen-template/template-areas.js.map +0 -1
  915. package/build-module/components/start-template-options/index.js +0 -184
  916. package/build-module/components/start-template-options/index.js.map +0 -1
  917. package/build-module/components/template-actions/index.js +0 -123
  918. package/build-module/components/template-actions/index.js.map +0 -1
  919. package/build-module/hooks/components.js +0 -7
  920. package/build-module/hooks/components.js.map +0 -1
  921. package/build-module/utils/get-is-list-page.js +0 -22
  922. package/build-module/utils/get-is-list-page.js.map +0 -1
  923. package/build-module/utils/math.js +0 -92
  924. package/build-module/utils/math.js.map +0 -1
  925. package/src/components/block-editor/editor-canvas.js +0 -178
  926. package/src/components/block-editor/resizable-editor.js +0 -82
  927. package/src/components/block-editor/resize-handle.js +0 -66
  928. package/src/components/block-editor/site-editor-canvas.js +0 -107
  929. package/src/components/code-editor/index.js +0 -94
  930. package/src/components/code-editor/style.scss +0 -95
  931. package/src/components/create-template-part-modal/index.js +0 -199
  932. package/src/components/create-template-part-modal/style.scss +0 -69
  933. package/src/components/global-styles/global-styles-provider.js +0 -162
  934. package/src/components/header-edit-mode/document-tools/index.js +0 -68
  935. package/src/components/header-edit-mode/index.js +0 -190
  936. package/src/components/header-edit-mode/style.scss +0 -201
  937. package/src/components/page-patterns/dataviews-pattern-actions.js +0 -439
  938. package/src/components/pattern-modal/duplicate.js +0 -55
  939. package/src/components/pattern-modal/index.js +0 -19
  940. package/src/components/pattern-modal/rename.js +0 -30
  941. package/src/components/rename-post-menu-item/index.js +0 -138
  942. package/src/components/sidebar-edit-mode/index.js +0 -173
  943. package/src/components/sidebar-edit-mode/page-panels/index.js +0 -133
  944. package/src/components/sidebar-edit-mode/page-panels/page-content.js +0 -29
  945. package/src/components/sidebar-edit-mode/page-panels/page-summary.js +0 -61
  946. package/src/components/sidebar-edit-mode/settings-header/index.js +0 -43
  947. package/src/components/sidebar-edit-mode/settings-header/style.scss +0 -14
  948. package/src/components/sidebar-edit-mode/template-panel/hooks.js +0 -114
  949. package/src/components/sidebar-edit-mode/template-panel/index.js +0 -134
  950. package/src/components/sidebar-edit-mode/template-panel/style.scss +0 -16
  951. package/src/components/sidebar-navigation-screen-page/index.js +0 -204
  952. package/src/components/sidebar-navigation-screen-page/page-details.js +0 -161
  953. package/src/components/sidebar-navigation-screen-page/status-label.js +0 -71
  954. package/src/components/sidebar-navigation-screen-page/style.scss +0 -69
  955. package/src/components/sidebar-navigation-screen-pattern/index.js +0 -63
  956. package/src/components/sidebar-navigation-screen-pattern/style.scss +0 -26
  957. package/src/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js +0 -31
  958. package/src/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js +0 -21
  959. package/src/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js +0 -33
  960. package/src/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js +0 -36
  961. package/src/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js +0 -98
  962. package/src/components/sidebar-navigation-screen-pattern/use-navigation-menu-title.js +0 -32
  963. package/src/components/sidebar-navigation-screen-pattern/use-pattern-details.js +0 -205
  964. package/src/components/sidebar-navigation-screen-template/home-template-details.js +0 -144
  965. package/src/components/sidebar-navigation-screen-template/index.js +0 -133
  966. package/src/components/sidebar-navigation-screen-template/style.scss +0 -53
  967. package/src/components/sidebar-navigation-screen-template/template-areas.js +0 -135
  968. package/src/components/start-template-options/index.js +0 -231
  969. package/src/components/start-template-options/style.scss +0 -55
  970. package/src/components/template-actions/index.js +0 -165
  971. package/src/hooks/components.js +0 -11
  972. package/src/utils/get-is-list-page.js +0 -25
  973. package/src/utils/math.js +0 -93
  974. package/src/utils/test/template-part-create.js +0 -63
  975. /package/src/components/{sidebar-edit-mode → global-styles-sidebar}/default-sidebar.js +0 -0
  976. /package/src/components/{header-edit-mode/more-menu → more-menu}/site-export.js +0 -0
  977. /package/src/components/{header-edit-mode/more-menu → more-menu}/welcome-guide-menu-item.js +0 -0
@@ -1,50 +0,0 @@
1
- import { createElement, Fragment } from "react";
2
- /**
3
- * WordPress dependencies
4
- */
5
- import { __ } from '@wordpress/i18n';
6
- import { LEFT, RIGHT } from '@wordpress/keycodes';
7
- import { VisuallyHidden, Tooltip, __unstableMotion as motion } from '@wordpress/components';
8
- const DELTA_DISTANCE = 20; // The distance to resize per keydown in pixels.
9
-
10
- export default function ResizeHandle({
11
- variation = 'default',
12
- direction,
13
- resizeWidthBy
14
- }) {
15
- function handleKeyDown(event) {
16
- const {
17
- keyCode
18
- } = event;
19
- if (direction === 'left' && keyCode === LEFT || direction === 'right' && keyCode === RIGHT) {
20
- resizeWidthBy(DELTA_DISTANCE);
21
- } else if (direction === 'left' && keyCode === RIGHT || direction === 'right' && keyCode === LEFT) {
22
- resizeWidthBy(-DELTA_DISTANCE);
23
- }
24
- }
25
- const resizeHandleVariants = {
26
- active: {
27
- opacity: 1,
28
- scaleY: 1.3
29
- }
30
- };
31
- const resizableHandleHelpId = `resizable-editor__resize-help-${direction}`;
32
- return createElement(Fragment, null, createElement(Tooltip, {
33
- text: __('Drag to resize')
34
- }, createElement(motion.button, {
35
- className: `resizable-editor__drag-handle is-${direction} is-variation-${variation}`,
36
- "aria-label": __('Drag to resize'),
37
- "aria-describedby": resizableHandleHelpId,
38
- onKeyDown: handleKeyDown,
39
- variants: resizeHandleVariants,
40
- whileFocus: "active",
41
- whileHover: "active",
42
- whileTap: "active",
43
- key: "handle",
44
- role: "separator",
45
- "aria-orientation": "vertical"
46
- })), createElement(VisuallyHidden, {
47
- id: resizableHandleHelpId
48
- }, __('Use left and right arrow keys to resize the canvas.')));
49
- }
50
- //# sourceMappingURL=resize-handle.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["__","LEFT","RIGHT","VisuallyHidden","Tooltip","__unstableMotion","motion","DELTA_DISTANCE","ResizeHandle","variation","direction","resizeWidthBy","handleKeyDown","event","keyCode","resizeHandleVariants","active","opacity","scaleY","resizableHandleHelpId","createElement","Fragment","text","button","className","onKeyDown","variants","whileFocus","whileHover","whileTap","key","role","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 {\n\tVisuallyHidden,\n\tTooltip,\n\t__unstableMotion as motion,\n} 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\tconst resizeHandleVariants = {\n\t\tactive: {\n\t\t\topacity: 1,\n\t\t\tscaleY: 1.3,\n\t\t},\n\t};\n\n\tconst resizableHandleHelpId = `resizable-editor__resize-help-${ direction }`;\n\n\treturn (\n\t\t<>\n\t\t\t<Tooltip text={ __( 'Drag to resize' ) }>\n\t\t\t\t<motion.button\n\t\t\t\t\tclassName={ `resizable-editor__drag-handle is-${ direction } is-variation-${ variation }` }\n\t\t\t\t\taria-label={ __( 'Drag to resize' ) }\n\t\t\t\t\taria-describedby={ resizableHandleHelpId }\n\t\t\t\t\tonKeyDown={ handleKeyDown }\n\t\t\t\t\tvariants={ resizeHandleVariants }\n\t\t\t\t\twhileFocus=\"active\"\n\t\t\t\t\twhileHover=\"active\"\n\t\t\t\t\twhileTap=\"active\"\n\t\t\t\t\tkey=\"handle\"\n\t\t\t\t\trole=\"separator\"\n\t\t\t\t\taria-orientation=\"vertical\"\n\t\t\t\t/>\n\t\t\t</Tooltip>\n\t\t\t<VisuallyHidden id={ resizableHandleHelpId }>\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":";AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,IAAI,EAAEC,KAAK,QAAQ,qBAAqB;AACjD,SACCC,cAAc,EACdC,OAAO,EACPC,gBAAgB,IAAIC,MAAM,QACpB,uBAAuB;AAE9B,MAAMC,cAAc,GAAG,EAAE,CAAC,CAAC;;AAE3B,eAAe,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,KAAKb,IAAI,IACxCS,SAAS,KAAK,OAAO,IAAII,OAAO,KAAKZ,KAAO,EAC7C;MACDS,aAAa,CAAEJ,cAAe,CAAC;IAChC,CAAC,MAAM,IACJG,SAAS,KAAK,MAAM,IAAII,OAAO,KAAKZ,KAAK,IACzCQ,SAAS,KAAK,OAAO,IAAII,OAAO,KAAKb,IAAM,EAC5C;MACDU,aAAa,CAAE,CAACJ,cAAe,CAAC;IACjC;EACD;EAEA,MAAMQ,oBAAoB,GAAG;IAC5BC,MAAM,EAAE;MACPC,OAAO,EAAE,CAAC;MACVC,MAAM,EAAE;IACT;EACD,CAAC;EAED,MAAMC,qBAAqB,GAAI,iCAAiCT,SAAW,EAAC;EAE5E,OACCU,aAAA,CAAAC,QAAA,QACCD,aAAA,CAAChB,OAAO;IAACkB,IAAI,EAAGtB,EAAE,CAAE,gBAAiB;EAAG,GACvCoB,aAAA,CAACd,MAAM,CAACiB,MAAM;IACbC,SAAS,EAAI,oCAAoCd,SAAW,iBAAiBD,SAAW,EAAG;IAC3F,cAAaT,EAAE,CAAE,gBAAiB,CAAG;IACrC,oBAAmBmB,qBAAuB;IAC1CM,SAAS,EAAGb,aAAe;IAC3Bc,QAAQ,EAAGX,oBAAsB;IACjCY,UAAU,EAAC,QAAQ;IACnBC,UAAU,EAAC,QAAQ;IACnBC,QAAQ,EAAC,QAAQ;IACjBC,GAAG,EAAC,QAAQ;IACZC,IAAI,EAAC,WAAW;IAChB,oBAAiB;EAAU,CAC3B,CACO,CAAC,EACVX,aAAA,CAACjB,cAAc;IAAC6B,EAAE,EAAGb;EAAuB,GACzCnB,EAAE,CAAE,qDAAsD,CAC7C,CACf,CAAC;AAEL","ignoreList":[]}
@@ -1,86 +0,0 @@
1
- import { createElement } from "react";
2
- /**
3
- * External dependencies
4
- */
5
- import classnames from 'classnames';
6
- /**
7
- * WordPress dependencies
8
- */
9
- import { useSelect } from '@wordpress/data';
10
- import { useViewportMatch, useResizeObserver } from '@wordpress/compose';
11
- import { store as blockEditorStore } from '@wordpress/block-editor';
12
-
13
- /**
14
- * Internal dependencies
15
- */
16
- import ResizableEditor from './resizable-editor';
17
- import EditorCanvas from './editor-canvas';
18
- import EditorCanvasContainer from '../editor-canvas-container';
19
- import useSiteEditorSettings from './use-site-editor-settings';
20
- import { store as editSiteStore } from '../../store';
21
- import { FOCUSABLE_ENTITIES, NAVIGATION_POST_TYPE, TEMPLATE_POST_TYPE } from '../../utils/constants';
22
- import { unlock } from '../../lock-unlock';
23
- import { privateApis as routerPrivateApis } from '@wordpress/router';
24
- const {
25
- useLocation
26
- } = unlock(routerPrivateApis);
27
- export default function SiteEditorCanvas({
28
- onClick
29
- }) {
30
- const location = useLocation();
31
- const {
32
- templateType,
33
- isFocusableEntity,
34
- isViewMode,
35
- isZoomOutMode
36
- } = useSelect(select => {
37
- const {
38
- getEditedPostType,
39
- getCanvasMode
40
- } = unlock(select(editSiteStore));
41
- const {
42
- __unstableGetEditorMode
43
- } = select(blockEditorStore);
44
- const _templateType = getEditedPostType();
45
- return {
46
- templateType: _templateType,
47
- isFocusableEntity: FOCUSABLE_ENTITIES.includes(_templateType),
48
- isViewMode: getCanvasMode() === 'view',
49
- isZoomOutMode: __unstableGetEditorMode() === 'zoom-out'
50
- };
51
- }, []);
52
- const isFocusMode = location.params.focusMode || isFocusableEntity;
53
- const [resizeObserver, sizes] = useResizeObserver();
54
- const settings = useSiteEditorSettings();
55
- const isMobileViewport = useViewportMatch('small', '<');
56
- const enableResizing = isFocusMode && !isViewMode &&
57
- // Disable resizing in mobile viewport.
58
- !isMobileViewport &&
59
- // Dsiable resizing in zoomed-out mode.
60
- !isZoomOutMode &&
61
- // Disable resizing when editing a template in focus mode.
62
- templateType !== TEMPLATE_POST_TYPE;
63
- const isTemplateTypeNavigation = templateType === NAVIGATION_POST_TYPE;
64
- const isNavigationFocusMode = isTemplateTypeNavigation && isFocusMode;
65
- const forceFullHeight = isNavigationFocusMode;
66
- return createElement(EditorCanvasContainer.Slot, null, ([editorCanvasView]) => editorCanvasView ? createElement("div", {
67
- className: "edit-site-visual-editor is-focus-mode"
68
- }, editorCanvasView) : createElement("div", {
69
- className: classnames('edit-site-visual-editor', {
70
- 'is-focus-mode': isFocusMode || !!editorCanvasView,
71
- 'is-view-mode': isViewMode
72
- })
73
- }, createElement(ResizableEditor, {
74
- enableResizing: enableResizing,
75
- height: sizes.height && !forceFullHeight ? sizes.height : '100%'
76
- }, createElement(EditorCanvas, {
77
- enableResizing: enableResizing,
78
- settings: settings,
79
- onClick: onClick
80
- },
81
- // Avoid resize listeners when not needed,
82
- // these will trigger unnecessary re-renders
83
- // when animating the iframe width.
84
- enableResizing && resizeObserver))));
85
- }
86
- //# sourceMappingURL=site-editor-canvas.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["classnames","useSelect","useViewportMatch","useResizeObserver","store","blockEditorStore","ResizableEditor","EditorCanvas","EditorCanvasContainer","useSiteEditorSettings","editSiteStore","FOCUSABLE_ENTITIES","NAVIGATION_POST_TYPE","TEMPLATE_POST_TYPE","unlock","privateApis","routerPrivateApis","useLocation","SiteEditorCanvas","onClick","location","templateType","isFocusableEntity","isViewMode","isZoomOutMode","select","getEditedPostType","getCanvasMode","__unstableGetEditorMode","_templateType","includes","isFocusMode","params","focusMode","resizeObserver","sizes","settings","isMobileViewport","enableResizing","isTemplateTypeNavigation","isNavigationFocusMode","forceFullHeight","createElement","Slot","editorCanvasView","className","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":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;AACnC;AACA;AACA;AACA,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,gBAAgB,EAAEC,iBAAiB,QAAQ,oBAAoB;AACxE,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,yBAAyB;;AAEnE;AACA;AACA;AACA,OAAOC,eAAe,MAAM,oBAAoB;AAChD,OAAOC,YAAY,MAAM,iBAAiB;AAC1C,OAAOC,qBAAqB,MAAM,4BAA4B;AAC9D,OAAOC,qBAAqB,MAAM,4BAA4B;AAC9D,SAASL,KAAK,IAAIM,aAAa,QAAQ,aAAa;AACpD,SACCC,kBAAkB,EAClBC,oBAAoB,EACpBC,kBAAkB,QACZ,uBAAuB;AAC9B,SAASC,MAAM,QAAQ,m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lB,YAAY,KAAKT,oBAAoB;EACtE,MAAM4B,qBAAqB,GAAGD,wBAAwB,IAAIR,WAAW;EACrE,MAAMU,eAAe,GAAGD,qBAAqB;EAE7C,OACCE,aAAA,CAAClC,qBAAqB,CAACmC,IAAI,QACxB,CAAE,CAAEC,gBAAgB,CAAE,KACvBA,gBAAgB,GACfF,aAAA;IAAKG,SAAS,EAAC;EAAuC,GACnDD,gBACE,CAAC,GAENF,aAAA;IACCG,SAAS,EAAG7C,UAAU,CAAE,yBAAyB,EAAE;MAClD,eAAe,EAAE+B,WAAW,IAAI,CAAC,CAAEa,gBAAgB;MACnD,cAAc,EAAErB;IACjB,CAAE;EAAG,GAELmB,aAAA,CAACpC,eAAe;IACfgC,cAAc,EAAGA,cAAgB;IACjCQ,MAAM,EACLX,KAAK,CAACW,MAAM,IAAI,CAAEL,eAAe,GAC9BN,KAAK,CAACW,MAAM,GACZ;EACH,GAEDJ,aAAA,CAACnC,YAAY;IACZ+B,cAAc,EAAGA,cAAgB;IACjCF,QAAQ,EAAGA,QAAU;IACrBjB,OAAO,EAAGA;EAAS;EAGlB;EACA;EACA;EACAmB,cAAc,IAAIJ,cAEN,CACE,CACb,CAGoB,CAAC;AAE/B","ignoreList":[]}
@@ -1,103 +0,0 @@
1
- import { createElement } from "react";
2
- /**
3
- * External dependencies
4
- */
5
- import Textarea from 'react-autosize-textarea';
6
-
7
- /**
8
- * WordPress dependencies
9
- */
10
- import { __unstableSerializeAndClean } from '@wordpress/blocks';
11
- import { store as coreStore } from '@wordpress/core-data';
12
- import { useSelect, useDispatch } from '@wordpress/data';
13
- import { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';
14
- import { __ } from '@wordpress/i18n';
15
- import { Button, VisuallyHidden } from '@wordpress/components';
16
- import { useMemo } from '@wordpress/element';
17
- import { useInstanceId } from '@wordpress/compose';
18
- import { store as editorStore } from '@wordpress/editor';
19
-
20
- /**
21
- * Internal dependencies
22
- */
23
- import { store as editSiteStore } from '../../store';
24
- export default function CodeEditor() {
25
- const instanceId = useInstanceId(CodeEditor);
26
- const {
27
- shortcut,
28
- content,
29
- blocks,
30
- type,
31
- id
32
- } = useSelect(select => {
33
- const {
34
- getEditedEntityRecord
35
- } = select(coreStore);
36
- const {
37
- getEditedPostType,
38
- getEditedPostId
39
- } = select(editSiteStore);
40
- const {
41
- getShortcutRepresentation
42
- } = select(keyboardShortcutsStore);
43
- const _type = getEditedPostType();
44
- const _id = getEditedPostId();
45
- const editedRecord = getEditedEntityRecord('postType', _type, _id);
46
- return {
47
- shortcut: getShortcutRepresentation('core/editor/toggle-mode'),
48
- content: editedRecord?.content,
49
- blocks: editedRecord?.blocks,
50
- type: _type,
51
- id: _id
52
- };
53
- }, []);
54
- const {
55
- editEntityRecord
56
- } = useDispatch(coreStore);
57
- // Replicates the logic found in getEditedPostContent().
58
- const realContent = useMemo(() => {
59
- if (content instanceof Function) {
60
- return content({
61
- blocks
62
- });
63
- } else if (blocks) {
64
- // If we have parsed blocks already, they should be our source of truth.
65
- // Parsing applies block deprecations and legacy block conversions that
66
- // unparsed content will not have.
67
- return __unstableSerializeAndClean(blocks);
68
- }
69
- return content;
70
- }, [content, blocks]);
71
- const {
72
- switchEditorMode
73
- } = useDispatch(editorStore);
74
- return createElement("div", {
75
- className: "edit-site-code-editor"
76
- }, createElement("div", {
77
- className: "edit-site-code-editor__toolbar"
78
- }, createElement("h2", null, __('Editing code')), createElement(Button, {
79
- variant: "tertiary",
80
- onClick: () => switchEditorMode('visual'),
81
- shortcut: shortcut
82
- }, __('Exit code editor'))), createElement("div", {
83
- className: "edit-site-code-editor__body"
84
- }, createElement(VisuallyHidden, {
85
- as: "label",
86
- htmlFor: `code-editor-text-area-${instanceId}`
87
- }, __('Type text or HTML')), createElement(Textarea, {
88
- autoComplete: "off",
89
- dir: "auto",
90
- value: realContent,
91
- onChange: event => {
92
- editEntityRecord('postType', type, id, {
93
- content: event.target.value,
94
- blocks: undefined,
95
- selection: undefined
96
- });
97
- },
98
- className: "edit-site-code-editor-text-area",
99
- id: `code-editor-text-area-${instanceId}`,
100
- placeholder: __('Start writing with text or HTML')
101
- })));
102
- }
103
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["Textarea","__unstableSerializeAndClean","store","coreStore","useSelect","useDispatch","keyboardShortcutsStore","__","Button","VisuallyHidden","useMemo","useInstanceId","editorStore","editSiteStore","CodeEditor","instanceId","shortcut","content","blocks","type","id","select","getEditedEntityRecord","getEditedPostType","getEditedPostId","getShortcutRepresentation","_type","_id","editedRecord","editEntityRecord","realContent","Function","switchEditorMode","createElement","className","variant","onClick","as","htmlFor","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":";AAAA;AACA;AACA;AACA,OAAOA,QAAQ,MAAM,yBAAyB;;AAE9C;AACA;AACA;AACA,SAASC,2BAA2B,QAAQ,mBAAmB;AAC/D,SAASC,KAAK,IAAIC,SAAS,QAAQ,sBAAsB;AACzD,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SAASH,KAAK,IAAII,sBAAsB,QAAQ,+BAA+B;AAC/E,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,MAAM,EAAEC,cAAc,QAAQ,uBAAuB;AAC9D,SAASC,OAAO,QAAQ,oBAAoB;AAC5C,SAASC,aAAa,QAAQ,oBAAoB;AAClD,SAAST,KAAK,IAAIU,WAAW,QAAQ,mBAAmB;;AAExD;AACA;AACA;AACA,SAASV,KAAK,IAAIW,aAAa,QAAQ,aAAa;AAEpD,eAAe,SAASC,UAAUA,CAAA,EAAG;EACpC,MAAMC,UAAU,GAAGJ,aAAa,CAAEG,UAAW,CAAC;EAC9C,MAAM;IAAEE,QAAQ;IAAEC,OAAO;IAAEC,MAAM;IAAEC,IAAI;IAAEC;EAAG,CAAC,GAAGhB,SAAS,CAAIiB,MAAM,IAAM;IACxE,MAAM;MAAEC;IAAsB,CAAC,GAAGD,MAAM,CAAElB,SAAU,CAAC;IACrD,MAAM;MAAEoB,iBAAiB;MAAEC;IAAgB,CAAC,GAAGH,MAAM,CAAER,aAAc,CAAC;IACtE,MAAM;MAAEY;IAA0B,CAAC,GAAGJ,MAAM,CAAEf,sBAAuB,CAAC;IACtE,MAAMoB,KAAK,GAAGH,iBAAiB,CAAC,CAAC;IACjC,MAAMI,GAAG,GAAGH,eAAe,CAAC,CAAC;IAC7B,MAAMI,YA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,CACX,CAAC,EACjB0B,aAAA,CAACjC,QAAQ;IACRuC,YAAY,EAAC,KAAK;IAClBC,GAAG,EAAC,MAAM;IACVC,KAAK,EAAGX,WAAa;IACrBY,QAAQ,EAAKC,KAAK,IAAM;MACvBd,gBAAgB,CAAE,UAAU,EAAEV,IAAI,EAAEC,EAAE,EAAE;QACvCH,OAAO,EAAE0B,KAAK,CAACC,MAAM,CAACH,KAAK;QAC3BvB,MAAM,EAAE2B,SAAS;QACjBC,SAAS,EAAED;MACZ,CAAE,CAAC;IACJ,CAAG;IACHX,SAAS,EAAC,iCAAiC;IAC3Cd,EAAE,EAAI,yBAAyBL,UAAY,EAAG;IAC9CgC,WAAW,EAAGxC,EAAE,CAAE,iCAAkC;EAAG,CACvD,CACG,CACD,CAAC;AAER","ignoreList":[]}
@@ -1,143 +0,0 @@
1
- import { createElement } from "react";
2
- /**
3
- * WordPress dependencies
4
- */
5
- import { useSelect, useDispatch } from '@wordpress/data';
6
- import { Icon, BaseControl, TextControl, Flex, FlexItem, FlexBlock, Button, Modal, __experimentalRadioGroup as RadioGroup, __experimentalRadio as Radio, __experimentalHStack as HStack, __experimentalVStack as VStack } from '@wordpress/components';
7
- import { __ } from '@wordpress/i18n';
8
- import { useState } from '@wordpress/element';
9
- import { useInstanceId } from '@wordpress/compose';
10
- import { store as editorStore } from '@wordpress/editor';
11
- import { store as noticesStore } from '@wordpress/notices';
12
- import { store as coreStore } from '@wordpress/core-data';
13
- import { check } from '@wordpress/icons';
14
- import { serialize } from '@wordpress/blocks';
15
-
16
- /**
17
- * Internal dependencies
18
- */
19
- import { TEMPLATE_PART_POST_TYPE, TEMPLATE_PART_AREA_DEFAULT_CATEGORY } from '../../utils/constants';
20
- import { useExistingTemplateParts, getUniqueTemplatePartTitle, getCleanTemplatePartSlug } from '../../utils/template-part-create';
21
- export default function CreateTemplatePartModal({
22
- modalTitle = __('Create template part'),
23
- ...restProps
24
- }) {
25
- return createElement(Modal, {
26
- title: modalTitle,
27
- onRequestClose: restProps.closeModal,
28
- overlayClassName: "edit-site-create-template-part-modal"
29
- }, createElement(CreateTemplatePartModalContents, {
30
- ...restProps
31
- }));
32
- }
33
- export function CreateTemplatePartModalContents({
34
- defaultArea = TEMPLATE_PART_AREA_DEFAULT_CATEGORY,
35
- blocks = [],
36
- confirmLabel = __('Create'),
37
- closeModal,
38
- onCreate,
39
- onError,
40
- defaultTitle = ''
41
- }) {
42
- const {
43
- createErrorNotice
44
- } = useDispatch(noticesStore);
45
- const {
46
- saveEntityRecord
47
- } = useDispatch(coreStore);
48
- const existingTemplateParts = useExistingTemplateParts();
49
- const [title, setTitle] = useState(defaultTitle);
50
- const [area, setArea] = useState(defaultArea);
51
- const [isSubmitting, setIsSubmitting] = useState(false);
52
- const instanceId = useInstanceId(CreateTemplatePartModal);
53
- const templatePartAreas = useSelect(select => select(editorStore).__experimentalGetDefaultTemplatePartAreas(), []);
54
- async function createTemplatePart() {
55
- if (!title || isSubmitting) {
56
- return;
57
- }
58
- try {
59
- setIsSubmitting(true);
60
- const uniqueTitle = getUniqueTemplatePartTitle(title, existingTemplateParts);
61
- const cleanSlug = getCleanTemplatePartSlug(uniqueTitle);
62
- const templatePart = await saveEntityRecord('postType', TEMPLATE_PART_POST_TYPE, {
63
- slug: cleanSlug,
64
- title: uniqueTitle,
65
- content: serialize(blocks),
66
- area
67
- }, {
68
- throwOnError: true
69
- });
70
- await onCreate(templatePart);
71
-
72
- // TODO: Add a success notice?
73
- } catch (error) {
74
- const errorMessage = error.message && error.code !== 'unknown_error' ? error.message : __('An error occurred while creating the template part.');
75
- createErrorNotice(errorMessage, {
76
- type: 'snackbar'
77
- });
78
- onError?.();
79
- } finally {
80
- setIsSubmitting(false);
81
- }
82
- }
83
- return createElement("form", {
84
- onSubmit: async event => {
85
- event.preventDefault();
86
- await createTemplatePart();
87
- }
88
- }, createElement(VStack, {
89
- spacing: "4"
90
- }, createElement(TextControl, {
91
- __next40pxDefaultSize: true,
92
- __nextHasNoMarginBottom: true,
93
- label: __('Name'),
94
- value: title,
95
- onChange: setTitle,
96
- required: true
97
- }), createElement(BaseControl, {
98
- label: __('Area'),
99
- id: `edit-site-create-template-part-modal__area-selection-${instanceId}`,
100
- className: "edit-site-create-template-part-modal__area-base-control"
101
- }, createElement(RadioGroup, {
102
- label: __('Area'),
103
- className: "edit-site-create-template-part-modal__area-radio-group",
104
- id: `edit-site-create-template-part-modal__area-selection-${instanceId}`,
105
- onChange: setArea,
106
- checked: area
107
- }, templatePartAreas.map(({
108
- icon,
109
- label,
110
- area: value,
111
- description
112
- }) => createElement(Radio, {
113
- key: label,
114
- value: value,
115
- className: "edit-site-create-template-part-modal__area-radio"
116
- }, createElement(Flex, {
117
- align: "start",
118
- justify: "start"
119
- }, createElement(FlexItem, null, createElement(Icon, {
120
- icon: icon
121
- })), createElement(FlexBlock, {
122
- className: "edit-site-create-template-part-modal__option-label"
123
- }, label, createElement("div", null, description)), createElement(FlexItem, {
124
- className: "edit-site-create-template-part-modal__checkbox"
125
- }, area === value && createElement(Icon, {
126
- icon: check
127
- }))))))), createElement(HStack, {
128
- justify: "right"
129
- }, createElement(Button, {
130
- __next40pxDefaultSize: true,
131
- variant: "tertiary",
132
- onClick: () => {
133
- closeModal();
134
- }
135
- }, __('Cancel')), createElement(Button, {
136
- __next40pxDefaultSize: true,
137
- variant: "primary",
138
- type: "submit",
139
- "aria-disabled": !title || isSubmitting,
140
- isBusy: isSubmitting
141
- }, confirmLabel))));
142
- }
143
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["useSelect","useDispatch","Icon","BaseControl","TextControl","Flex","FlexItem","FlexBlock","Button","Modal","__experimentalRadioGroup","RadioGroup","__experimentalRadio","Radio","__experimentalHStack","HStack","__experimentalVStack","VStack","__","useState","useInstanceId","store","editorStore","noticesStore","coreStore","check","serialize","TEMPLATE_PART_POST_TYPE","TEMPLATE_PART_AREA_DEFAULT_CATEGORY","useExistingTemplateParts","getUniqueTemplatePartTitle","getCleanTemplatePartSlug","CreateTemplatePartModal","modalTitle","restProps","createElement","title","onRequestClose","closeModal","overlayClassName","CreateTemplatePartModalContents","defaultArea","blocks","confirmLabel","onCreate","onError","defaultTitle","createErrorNotice","saveEntityRecord","existingTemplateParts","setTitle","area","setArea","isSubmitting","setIsSubmitting","instanceId","templatePartAreas","select","__experimentalGetDefaultTemplatePartAreas","createTemplatePart","uniqueTitle","cleanSlug","templatePart","slug","content","throwOnError","error","errorMessage","message","code","type","onSubmit","event","preventDefault","spacing","__next40pxDefaultSize","__nextHasNoMarginBottom","label","value","onChange","required","id","className","checked","map","icon","description","key","align","justify","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__next40pxDefaultSize\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\t__next40pxDefaultSize\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\t__next40pxDefaultSize\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":";AAAA;AACA;AACA;AACA,SAASA,SAAS,EAAEC,WAAW,QAAQ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CAAC9B,IAAI;IAACmF,KAAK,EAAC,OAAO;IAACC,OAAO,EAAC;EAAO,GAClCtD,aAAA,CAAC7B,QAAQ,QACR6B,aAAA,CAACjC,IAAI;IAACmF,IAAI,EAAGA;EAAM,CAAE,CACZ,CAAC,EACXlD,aAAA,CAAC5B,SAAS;IAAC2E,SAAS,EAAC;EAAoD,GACtEL,KAAK,EACP1C,aAAA,cAAOmD,WAAkB,CACf,CAAC,EAEZnD,aAAA,CAAC7B,QAAQ;IAAC4E,SAAS,EAAC;EAAgD,GACjE/B,IAAI,KAAK2B,KAAK,IACf3C,aAAA,CAACjC,IAAI;IAACmF,IAAI,EAAG5D;EAAO,CAAE,CAEd,CACL,CACA,CAET,CACW,CACA,CAAC,EACdU,aAAA,CAACpB,MAAM;IAAC0E,OAAO,EAAC;EAAO,GACtBtD,aAAA,CAAC3B,MAAM;IACNmE,qBAAqB;IACrBe,OAAO,EAAC,UAAU;IAClBC,OAAO,EAAGA,CAAA,KAAM;MACfrD,UAAU,CAAC,CAAC;IACb;EAAG,GAEDpB,EAAE,CAAE,QAAS,CACR,CAAC,EACTiB,aAAA,CAAC3B,MAAM;IACNmE,qBAAqB;IACrBe,OAAO,EAAC,SAAS;IACjBpB,IAAI,EAAC,QAAQ;IACb,iBAAgB,CAAElC,KAAK,IAAIiB,YAAc;IACzCuC,MAAM,EAAGvC;EAAc,GAErBV,YACK,CACD,CACD,CACH,CAAC;AAET","ignoreList":[]}
@@ -1,120 +0,0 @@
1
- import { createElement } from "react";
2
- /**
3
- * External dependencies
4
- */
5
- import deepmerge from 'deepmerge';
6
- import { isPlainObject } from 'is-plain-object';
7
-
8
- /**
9
- * WordPress dependencies
10
- */
11
- import { useMemo, useCallback } from '@wordpress/element';
12
- import { useSelect, useDispatch } from '@wordpress/data';
13
- import { store as coreStore } from '@wordpress/core-data';
14
- import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
15
-
16
- /**
17
- * Internal dependencies
18
- */
19
- import { unlock } from '../../lock-unlock';
20
- const {
21
- GlobalStylesContext,
22
- cleanEmptyObject
23
- } = unlock(blockEditorPrivateApis);
24
- export function mergeBaseAndUserConfigs(base, user) {
25
- return deepmerge(base, user, {
26
- // We only pass as arrays the presets,
27
- // in which case we want the new array of values
28
- // to override the old array (no merging).
29
- isMergeableObject: isPlainObject
30
- });
31
- }
32
- function useGlobalStylesUserConfig() {
33
- const {
34
- globalStylesId,
35
- isReady,
36
- settings,
37
- styles
38
- } = useSelect(select => {
39
- const {
40
- getEditedEntityRecord,
41
- hasFinishedResolution
42
- } = select(coreStore);
43
- const _globalStylesId = select(coreStore).__experimentalGetCurrentGlobalStylesId();
44
- const record = _globalStylesId ? getEditedEntityRecord('root', 'globalStyles', _globalStylesId) : undefined;
45
- let hasResolved = false;
46
- if (hasFinishedResolution('__experimentalGetCurrentGlobalStylesId')) {
47
- hasResolved = _globalStylesId ? hasFinishedResolution('getEditedEntityRecord', ['root', 'globalStyles', _globalStylesId]) : true;
48
- }
49
- return {
50
- globalStylesId: _globalStylesId,
51
- isReady: hasResolved,
52
- settings: record?.settings,
53
- styles: record?.styles
54
- };
55
- }, []);
56
- const {
57
- getEditedEntityRecord
58
- } = useSelect(coreStore);
59
- const {
60
- editEntityRecord
61
- } = useDispatch(coreStore);
62
- const config = useMemo(() => {
63
- return {
64
- settings: settings !== null && settings !== void 0 ? settings : {},
65
- styles: styles !== null && styles !== void 0 ? styles : {}
66
- };
67
- }, [settings, styles]);
68
- const setConfig = useCallback((callback, options = {}) => {
69
- var _record$styles, _record$settings;
70
- const record = getEditedEntityRecord('root', 'globalStyles', globalStylesId);
71
- const currentConfig = {
72
- styles: (_record$styles = record?.styles) !== null && _record$styles !== void 0 ? _record$styles : {},
73
- settings: (_record$settings = record?.settings) !== null && _record$settings !== void 0 ? _record$settings : {}
74
- };
75
- const updatedConfig = callback(currentConfig);
76
- editEntityRecord('root', 'globalStyles', globalStylesId, {
77
- styles: cleanEmptyObject(updatedConfig.styles) || {},
78
- settings: cleanEmptyObject(updatedConfig.settings) || {}
79
- }, options);
80
- }, [globalStylesId]);
81
- return [isReady, config, setConfig];
82
- }
83
- function useGlobalStylesBaseConfig() {
84
- const baseConfig = useSelect(select => {
85
- return select(coreStore).__experimentalGetCurrentThemeBaseGlobalStyles();
86
- }, []);
87
- return [!!baseConfig, baseConfig];
88
- }
89
- function useGlobalStylesContext() {
90
- const [isUserConfigReady, userConfig, setUserConfig] = useGlobalStylesUserConfig();
91
- const [isBaseConfigReady, baseConfig] = useGlobalStylesBaseConfig();
92
- const mergedConfig = useMemo(() => {
93
- if (!baseConfig || !userConfig) {
94
- return {};
95
- }
96
- return mergeBaseAndUserConfigs(baseConfig, userConfig);
97
- }, [userConfig, baseConfig]);
98
- const context = useMemo(() => {
99
- return {
100
- isReady: isUserConfigReady && isBaseConfigReady,
101
- user: userConfig,
102
- base: baseConfig,
103
- merged: mergedConfig,
104
- setUserConfig
105
- };
106
- }, [mergedConfig, userConfig, baseConfig, setUserConfig, isUserConfigReady, isBaseConfigReady]);
107
- return context;
108
- }
109
- export function GlobalStylesProvider({
110
- children
111
- }) {
112
- const context = useGlobalStylesContext();
113
- if (!context.isReady) {
114
- return null;
115
- }
116
- return createElement(GlobalStylesContext.Provider, {
117
- value: context
118
- }, children);
119
- }
120
- //# sourceMappingURL=global-styles-provider.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["deepmerge","isPlainObject","useMemo","useCallback","useSelect","useDispatch","store","coreStore","privateApis","blockEditorPrivateApis","unlock","GlobalStylesContext","cleanEmptyObject","mergeBaseAndUserConfigs","base","user","isMergeableObject","useGlobalStylesUserConfig","globalStylesId","isReady","settings","styles","select","getEditedEntityRecord","hasFinishedResolution","_globalStylesId","__experimentalGetCurrentGlobalStylesId","record","undefined","hasResolved","editEntityRecord","config","setConfig","callback","options","_record$styles","_record$settings","currentConfig","updatedConfig","useGlobalStylesBaseConfig","baseConfig","__experimentalGetCurrentThemeBaseGlobalStyles","useGlobalStylesContext","isUserConfigReady","userConfig","setUserConfig","isBaseConfigReady","mergedConfig","context","merged","GlobalStylesProvider","children","createElement","Provider","value"],"sources":["@wordpress/edit-site/src/components/global-styles/global-styles-provider.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport deepmerge from 'deepmerge';\nimport { isPlainObject } from 'is-plain-object';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo, useCallback } from '@wordpress/element';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\nconst { GlobalStylesContext, cleanEmptyObject } = unlock(\n\tblockEditorPrivateApis\n);\n\nexport function mergeBaseAndUserConfigs( base, user ) {\n\treturn deepmerge( base, user, {\n\t\t// We only pass as arrays the presets,\n\t\t// in which case we want the new array of values\n\t\t// to override the old array (no merging).\n\t\tisMergeableObject: isPlainObject,\n\t} );\n}\n\nfunction useGlobalStylesUserConfig() {\n\tconst { globalStylesId, isReady, settings, styles } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEditedEntityRecord, hasFinishedResolution } =\n\t\t\t\tselect( coreStore );\n\t\t\tconst _globalStylesId =\n\t\t\t\tselect( coreStore ).__experimentalGetCurrentGlobalStylesId();\n\t\t\tconst record = _globalStylesId\n\t\t\t\t? getEditedEntityRecord(\n\t\t\t\t\t\t'root',\n\t\t\t\t\t\t'globalStyles',\n\t\t\t\t\t\t_globalStylesId\n\t\t\t\t )\n\t\t\t\t: undefined;\n\n\t\t\tlet hasResolved = false;\n\t\t\tif (\n\t\t\t\thasFinishedResolution(\n\t\t\t\t\t'__experimentalGetCurrentGlobalStylesId'\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\thasResolved = _globalStylesId\n\t\t\t\t\t? hasFinishedResolution( 'getEditedEntityRecord', [\n\t\t\t\t\t\t\t'root',\n\t\t\t\t\t\t\t'globalStyles',\n\t\t\t\t\t\t\t_globalStylesId,\n\t\t\t\t\t ] )\n\t\t\t\t\t: true;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tglobalStylesId: _globalStylesId,\n\t\t\t\tisReady: hasResolved,\n\t\t\t\tsettings: record?.settings,\n\t\t\t\tstyles: record?.styles,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\tconst { getEditedEntityRecord } = useSelect( coreStore );\n\tconst { editEntityRecord } = useDispatch( coreStore );\n\tconst config = useMemo( () => {\n\t\treturn {\n\t\t\tsettings: settings ?? {},\n\t\t\tstyles: styles ?? {},\n\t\t};\n\t}, [ settings, styles ] );\n\n\tconst setConfig = useCallback(\n\t\t( callback, options = {} ) => {\n\t\t\tconst record = getEditedEntityRecord(\n\t\t\t\t'root',\n\t\t\t\t'globalStyles',\n\t\t\t\tglobalStylesId\n\t\t\t);\n\t\t\tconst currentConfig = {\n\t\t\t\tstyles: record?.styles ?? {},\n\t\t\t\tsettings: record?.settings ?? {},\n\t\t\t};\n\t\t\tconst updatedConfig = callback( currentConfig );\n\t\t\teditEntityRecord(\n\t\t\t\t'root',\n\t\t\t\t'globalStyles',\n\t\t\t\tglobalStylesId,\n\t\t\t\t{\n\t\t\t\t\tstyles: cleanEmptyObject( updatedConfig.styles ) || {},\n\t\t\t\t\tsettings: cleanEmptyObject( updatedConfig.settings ) || {},\n\t\t\t\t},\n\t\t\t\toptions\n\t\t\t);\n\t\t},\n\t\t[ globalStylesId ]\n\t);\n\n\treturn [ isReady, config, setConfig ];\n}\n\nfunction useGlobalStylesBaseConfig() {\n\tconst baseConfig = useSelect( ( select ) => {\n\t\treturn select(\n\t\t\tcoreStore\n\t\t).__experimentalGetCurrentThemeBaseGlobalStyles();\n\t}, [] );\n\n\treturn [ !! baseConfig, baseConfig ];\n}\n\nfunction useGlobalStylesContext() {\n\tconst [ isUserConfigReady, userConfig, setUserConfig ] =\n\t\tuseGlobalStylesUserConfig();\n\tconst [ isBaseConfigReady, baseConfig ] = useGlobalStylesBaseConfig();\n\tconst mergedConfig = useMemo( () => {\n\t\tif ( ! baseConfig || ! userConfig ) {\n\t\t\treturn {};\n\t\t}\n\t\treturn mergeBaseAndUserConfigs( baseConfig, userConfig );\n\t}, [ userConfig, baseConfig ] );\n\tconst context = useMemo( () => {\n\t\treturn {\n\t\t\tisReady: isUserConfigReady && isBaseConfigReady,\n\t\t\tuser: userConfig,\n\t\t\tbase: baseConfig,\n\t\t\tmerged: mergedConfig,\n\t\t\tsetUserConfig,\n\t\t};\n\t}, [\n\t\tmergedConfig,\n\t\tuserConfig,\n\t\tbaseConfig,\n\t\tsetUserConfig,\n\t\tisUserConfigReady,\n\t\tisBaseConfigReady,\n\t] );\n\n\treturn context;\n}\n\nexport function GlobalStylesProvider( { children } ) {\n\tconst context = useGlobalStylesContext();\n\tif ( ! context.isReady ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<GlobalStylesContext.Provider value={ context }>\n\t\t\t{ children }\n\t\t</GlobalStylesContext.Provider>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,SAAS,MAAM,WAAW;AACjC,SAASC,aAAa,QAAQ,iBAAiB;;AAE/C;AACA;AACA;AACA,SAASC,OAAO,EAAEC,WAAW,QAAQ,oBAAoB;AACzD,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SAASC,KAAK,IAAIC,SAAS,QAAQ,sBAAsB;AACzD,SAASC,WAAW,IAAIC,sBAAsB,QAAQ,yBAAyB;;AAE/E;AACA;AACA;AACA,SAASC,MAAM,QAAQ,mBAAmB;AAE1C,MAAM;EAAEC,mBAAmB;EAAEC;AAAiB,CAAC,GAAGF,MAAM,CACvDD,sBACD,CAAC;AAED,OAAO,SAASI,uBAAuBA,CAAEC,IAAI,EAAEC,IAAI,EAAG;EACrD,OAAOf,SAAS,CAAEc,IAAI,EAAEC,IAAI,EAAE;IAC7B;IACA;IACA;IACAC,iBAAiB,EAAEf;EACpB,CAAE,CAAC;AACJ;AAEA,SAASgB,yB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