@wordpress/edit-site 6.13.1-next.cd6172eb0.0 → 6.15.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 (480) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/LICENSE.md +1 -1
  3. package/build/components/add-new-pattern/index.js +7 -10
  4. package/build/components/add-new-pattern/index.js.map +1 -1
  5. package/build/components/add-new-post/index.js +1 -1
  6. package/build/components/add-new-post/index.js.map +1 -1
  7. package/build/components/add-new-template/add-custom-template-modal-content.js +1 -0
  8. package/build/components/add-new-template/add-custom-template-modal-content.js.map +1 -1
  9. package/build/components/add-new-template/index.js +1 -0
  10. package/build/components/add-new-template/index.js.map +1 -1
  11. package/build/components/add-new-template/utils.js +1 -0
  12. package/build/components/add-new-template/utils.js.map +1 -1
  13. package/build/components/editor/index.js +1 -9
  14. package/build/components/editor/index.js.map +1 -1
  15. package/build/components/editor-canvas-container/index.js +1 -0
  16. package/build/components/editor-canvas-container/index.js.map +1 -1
  17. package/build/components/global-styles/confirm-reset-shadow-dialog.js +39 -0
  18. package/build/components/global-styles/confirm-reset-shadow-dialog.js.map +1 -0
  19. package/build/components/global-styles/font-families.js +1 -0
  20. package/build/components/global-styles/font-families.js.map +1 -1
  21. package/build/components/global-styles/font-library-modal/context.js +1 -0
  22. package/build/components/global-styles/font-library-modal/context.js.map +1 -1
  23. package/build/components/global-styles/font-library-modal/font-collection.js +1 -0
  24. package/build/components/global-styles/font-library-modal/font-collection.js.map +1 -1
  25. package/build/components/global-styles/font-library-modal/font-demo.js +1 -0
  26. package/build/components/global-styles/font-library-modal/font-demo.js.map +1 -1
  27. package/build/components/global-styles/font-library-modal/index.js +2 -1
  28. package/build/components/global-styles/font-library-modal/index.js.map +1 -1
  29. package/build/components/global-styles/font-library-modal/installed-fonts.js +1 -0
  30. package/build/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
  31. package/build/components/global-styles/font-library-modal/library-font-details.js +1 -0
  32. package/build/components/global-styles/font-library-modal/library-font-details.js.map +1 -1
  33. package/build/components/global-styles/font-library-modal/upload-fonts.js +1 -0
  34. package/build/components/global-styles/font-library-modal/upload-fonts.js.map +1 -1
  35. package/build/components/global-styles/font-library-modal/utils/filter-fonts.js +1 -0
  36. package/build/components/global-styles/font-library-modal/utils/filter-fonts.js.map +1 -1
  37. package/build/components/global-styles/font-library-modal/utils/fonts-outline.js +1 -0
  38. package/build/components/global-styles/font-library-modal/utils/fonts-outline.js.map +1 -1
  39. package/build/components/global-styles/font-library-modal/utils/index.js +1 -0
  40. package/build/components/global-styles/font-library-modal/utils/index.js.map +1 -1
  41. package/build/components/global-styles/font-library-modal/utils/make-families-from-faces.js +1 -0
  42. package/build/components/global-styles/font-library-modal/utils/make-families-from-faces.js.map +1 -1
  43. package/build/components/global-styles/font-library-modal/utils/preview-styles.js +1 -0
  44. package/build/components/global-styles/font-library-modal/utils/preview-styles.js.map +1 -1
  45. package/build/components/global-styles/font-library-modal/utils/toggleFont.js +1 -0
  46. package/build/components/global-styles/font-library-modal/utils/toggleFont.js.map +1 -1
  47. package/build/components/global-styles/font-sizes/font-size.js +18 -14
  48. package/build/components/global-styles/font-sizes/font-size.js.map +1 -1
  49. package/build/components/global-styles/font-sizes/font-sizes.js +18 -20
  50. package/build/components/global-styles/font-sizes/font-sizes.js.map +1 -1
  51. package/build/components/global-styles/highlighted-colors.js +1 -0
  52. package/build/components/global-styles/highlighted-colors.js.map +1 -1
  53. package/build/components/global-styles/hooks.js +1 -0
  54. package/build/components/global-styles/hooks.js.map +1 -1
  55. package/build/components/global-styles/palette.js +1 -0
  56. package/build/components/global-styles/palette.js.map +1 -1
  57. package/build/components/global-styles/preset-colors.js +1 -0
  58. package/build/components/global-styles/preset-colors.js.map +1 -1
  59. package/build/components/global-styles/preview-colors.js +2 -2
  60. package/build/components/global-styles/preview-colors.js.map +1 -1
  61. package/build/components/global-styles/preview-styles.js +3 -2
  62. package/build/components/global-styles/preview-styles.js.map +1 -1
  63. package/build/components/global-styles/preview-typography.js +2 -2
  64. package/build/components/global-styles/preview-typography.js.map +1 -1
  65. package/build/components/global-styles/{preview-iframe.js → preview-wrapper.js} +11 -29
  66. package/build/components/global-styles/preview-wrapper.js.map +1 -0
  67. package/build/components/global-styles/screen-block-list.js +1 -0
  68. package/build/components/global-styles/screen-block-list.js.map +1 -1
  69. package/build/components/global-styles/screen-block.js +1 -1
  70. package/build/components/global-styles/screen-block.js.map +1 -1
  71. package/build/components/global-styles/screen-revisions/revisions-buttons.js +1 -0
  72. package/build/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
  73. package/build/components/global-styles/screen-revisions/use-global-styles-revisions.js +1 -0
  74. package/build/components/global-styles/screen-revisions/use-global-styles-revisions.js.map +1 -1
  75. package/build/components/global-styles/shadow-utils.js +1 -0
  76. package/build/components/global-styles/shadow-utils.js.map +1 -1
  77. package/build/components/global-styles/shadows-edit-panel.js +36 -34
  78. package/build/components/global-styles/shadows-edit-panel.js.map +1 -1
  79. package/build/components/global-styles/shadows-panel.js +44 -5
  80. package/build/components/global-styles/shadows-panel.js.map +1 -1
  81. package/build/components/global-styles/style-variations-container.js +1 -0
  82. package/build/components/global-styles/style-variations-container.js.map +1 -1
  83. package/build/components/global-styles/typeset.js +1 -0
  84. package/build/components/global-styles/typeset.js.map +1 -1
  85. package/build/components/global-styles/typography-example.js +8 -1
  86. package/build/components/global-styles/typography-example.js.map +1 -1
  87. package/build/components/global-styles/ui.js +1 -0
  88. package/build/components/global-styles/ui.js.map +1 -1
  89. package/build/components/global-styles/utils.js +1 -0
  90. package/build/components/global-styles/utils.js.map +1 -1
  91. package/build/components/global-styles/variations/variations-color.js +1 -0
  92. package/build/components/global-styles/variations/variations-color.js.map +1 -1
  93. package/build/components/global-styles/variations/variations-panel.js +1 -0
  94. package/build/components/global-styles/variations/variations-panel.js.map +1 -1
  95. package/build/components/global-styles/variations/variations-typography.js +1 -0
  96. package/build/components/global-styles/variations/variations-typography.js.map +1 -1
  97. package/build/components/global-styles-renderer/index.js +1 -0
  98. package/build/components/global-styles-renderer/index.js.map +1 -1
  99. package/build/components/layout/index.js +24 -8
  100. package/build/components/layout/index.js.map +1 -1
  101. package/build/components/maybe-editor/index.js +65 -0
  102. package/build/components/maybe-editor/index.js.map +1 -0
  103. package/build/components/media/index.js +1 -0
  104. package/build/components/media/index.js.map +1 -1
  105. package/build/components/page-patterns/fields.js +8 -82
  106. package/build/components/page-patterns/fields.js.map +1 -1
  107. package/build/components/page-patterns/header.js +1 -0
  108. package/build/components/page-patterns/header.js.map +1 -1
  109. package/build/components/page-patterns/index.js +18 -14
  110. package/build/components/page-patterns/index.js.map +1 -1
  111. package/build/components/page-patterns/search-items.js +1 -0
  112. package/build/components/page-patterns/search-items.js.map +1 -1
  113. package/build/components/page-patterns/use-pattern-settings.js +1 -0
  114. package/build/components/page-patterns/use-pattern-settings.js.map +1 -1
  115. package/build/components/page-patterns/use-patterns.js +1 -0
  116. package/build/components/page-patterns/use-patterns.js.map +1 -1
  117. package/build/components/page-templates/fields.js +7 -39
  118. package/build/components/page-templates/fields.js.map +1 -1
  119. package/build/components/page-templates/index.js +38 -41
  120. package/build/components/page-templates/index.js.map +1 -1
  121. package/build/components/post-edit/index.js +16 -8
  122. package/build/components/post-edit/index.js.map +1 -1
  123. package/build/components/post-list/index.js +40 -21
  124. package/build/components/post-list/index.js.map +1 -1
  125. package/build/components/posts-app-routes/index.js +1 -0
  126. package/build/components/posts-app-routes/index.js.map +1 -1
  127. package/build/components/resizable-frame/index.js +9 -1
  128. package/build/components/resizable-frame/index.js.map +1 -1
  129. package/build/components/save-button/index.js +1 -0
  130. package/build/components/save-button/index.js.map +1 -1
  131. package/build/components/save-hub/index.js +1 -0
  132. package/build/components/save-hub/index.js.map +1 -1
  133. package/build/components/save-keyboard-shortcut/index.js +1 -0
  134. package/build/components/save-keyboard-shortcut/index.js.map +1 -1
  135. package/build/components/save-panel/index.js +1 -0
  136. package/build/components/save-panel/index.js.map +1 -1
  137. package/build/components/sidebar/index.js +1 -0
  138. package/build/components/sidebar/index.js.map +1 -1
  139. package/build/components/sidebar-dataviews/custom-dataviews-list.js +6 -7
  140. package/build/components/sidebar-dataviews/custom-dataviews-list.js.map +1 -1
  141. package/build/components/sidebar-dataviews/dataview-item.js +1 -0
  142. package/build/components/sidebar-dataviews/dataview-item.js.map +1 -1
  143. package/build/components/sidebar-dataviews/default-views.js +10 -26
  144. package/build/components/sidebar-dataviews/default-views.js.map +1 -1
  145. package/build/components/sidebar-dataviews/index.js +2 -0
  146. package/build/components/sidebar-dataviews/index.js.map +1 -1
  147. package/build/components/sidebar-global-styles-wrapper/index.js +40 -71
  148. package/build/components/sidebar-global-styles-wrapper/index.js.map +1 -1
  149. package/build/components/sidebar-navigation-screen-global-styles/content.js +12 -38
  150. package/build/components/sidebar-navigation-screen-global-styles/content.js.map +1 -1
  151. package/build/components/sidebar-navigation-screen-main/index.js +38 -23
  152. package/build/components/sidebar-navigation-screen-main/index.js.map +1 -1
  153. package/build/components/sidebar-navigation-screen-navigation-menus/index.js +1 -0
  154. package/build/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
  155. package/build/components/sidebar-navigation-screen-patterns/index.js +1 -4
  156. package/build/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
  157. package/build/components/sidebar-navigation-screen-patterns/use-pattern-categories.js +1 -0
  158. package/build/components/sidebar-navigation-screen-patterns/use-pattern-categories.js.map +1 -1
  159. package/build/components/sidebar-navigation-screen-patterns/use-template-part-areas.js +1 -0
  160. package/build/components/sidebar-navigation-screen-patterns/use-template-part-areas.js.map +1 -1
  161. package/build/components/sidebar-navigation-screen-patterns/use-theme-patterns.js +1 -0
  162. package/build/components/sidebar-navigation-screen-patterns/use-theme-patterns.js.map +1 -1
  163. package/build/components/sidebar-navigation-screen-templates-browse/content.js +2 -0
  164. package/build/components/sidebar-navigation-screen-templates-browse/content.js.map +1 -1
  165. package/build/components/site-editor-routes/home.js +4 -2
  166. package/build/components/site-editor-routes/home.js.map +1 -1
  167. package/build/components/site-editor-routes/index.js +3 -1
  168. package/build/components/site-editor-routes/index.js.map +1 -1
  169. package/build/components/site-editor-routes/stylebook.js +37 -0
  170. package/build/components/site-editor-routes/stylebook.js.map +1 -0
  171. package/build/components/site-editor-routes/styles.js +7 -1
  172. package/build/components/site-editor-routes/styles.js.map +1 -1
  173. package/build/components/site-editor-routes/template-item.js +3 -3
  174. package/build/components/site-editor-routes/template-item.js.map +1 -1
  175. package/build/components/site-editor-routes/template-part-item.js +3 -3
  176. package/build/components/site-editor-routes/template-part-item.js.map +1 -1
  177. package/build/components/style-book/categories.js +1 -0
  178. package/build/components/style-book/categories.js.map +1 -1
  179. package/build/components/style-book/color-examples.js +9 -3
  180. package/build/components/style-book/color-examples.js.map +1 -1
  181. package/build/components/style-book/constants.js +36 -3
  182. package/build/components/style-book/constants.js.map +1 -1
  183. package/build/components/style-book/duotone-examples.js +1 -0
  184. package/build/components/style-book/duotone-examples.js.map +1 -1
  185. package/build/components/style-book/examples.js +48 -30
  186. package/build/components/style-book/examples.js.map +1 -1
  187. package/build/components/style-book/index.js +185 -61
  188. package/build/components/style-book/index.js.map +1 -1
  189. package/build/components/style-book/types.js.map +1 -1
  190. package/build/index.js +1 -0
  191. package/build/index.js.map +1 -1
  192. package/build/posts.js +1 -0
  193. package/build/posts.js.map +1 -1
  194. package/build/store/reducer.js +1 -0
  195. package/build/store/reducer.js.map +1 -1
  196. package/build/utils/get-filtered-template-parts.js +1 -0
  197. package/build/utils/get-filtered-template-parts.js.map +1 -1
  198. package/build/utils/set-nested-value.js +1 -0
  199. package/build/utils/set-nested-value.js.map +1 -1
  200. package/build-module/components/add-new-pattern/index.js +7 -10
  201. package/build-module/components/add-new-pattern/index.js.map +1 -1
  202. package/build-module/components/add-new-post/index.js +1 -1
  203. package/build-module/components/add-new-post/index.js.map +1 -1
  204. package/build-module/components/add-new-template/add-custom-template-modal-content.js +1 -0
  205. package/build-module/components/add-new-template/add-custom-template-modal-content.js.map +1 -1
  206. package/build-module/components/add-new-template/index.js +1 -0
  207. package/build-module/components/add-new-template/index.js.map +1 -1
  208. package/build-module/components/add-new-template/utils.js +1 -0
  209. package/build-module/components/add-new-template/utils.js.map +1 -1
  210. package/build-module/components/editor/index.js +1 -9
  211. package/build-module/components/editor/index.js.map +1 -1
  212. package/build-module/components/editor-canvas-container/index.js +1 -0
  213. package/build-module/components/editor-canvas-container/index.js.map +1 -1
  214. package/build-module/components/global-styles/confirm-reset-shadow-dialog.js +32 -0
  215. package/build-module/components/global-styles/confirm-reset-shadow-dialog.js.map +1 -0
  216. package/build-module/components/global-styles/font-families.js +1 -0
  217. package/build-module/components/global-styles/font-families.js.map +1 -1
  218. package/build-module/components/global-styles/font-library-modal/context.js +1 -0
  219. package/build-module/components/global-styles/font-library-modal/context.js.map +1 -1
  220. package/build-module/components/global-styles/font-library-modal/font-collection.js +1 -0
  221. package/build-module/components/global-styles/font-library-modal/font-collection.js.map +1 -1
  222. package/build-module/components/global-styles/font-library-modal/font-demo.js +1 -0
  223. package/build-module/components/global-styles/font-library-modal/font-demo.js.map +1 -1
  224. package/build-module/components/global-styles/font-library-modal/index.js +2 -1
  225. package/build-module/components/global-styles/font-library-modal/index.js.map +1 -1
  226. package/build-module/components/global-styles/font-library-modal/installed-fonts.js +1 -0
  227. package/build-module/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
  228. package/build-module/components/global-styles/font-library-modal/library-font-details.js +1 -0
  229. package/build-module/components/global-styles/font-library-modal/library-font-details.js.map +1 -1
  230. package/build-module/components/global-styles/font-library-modal/upload-fonts.js +1 -0
  231. package/build-module/components/global-styles/font-library-modal/upload-fonts.js.map +1 -1
  232. package/build-module/components/global-styles/font-library-modal/utils/filter-fonts.js +1 -0
  233. package/build-module/components/global-styles/font-library-modal/utils/filter-fonts.js.map +1 -1
  234. package/build-module/components/global-styles/font-library-modal/utils/fonts-outline.js +1 -0
  235. package/build-module/components/global-styles/font-library-modal/utils/fonts-outline.js.map +1 -1
  236. package/build-module/components/global-styles/font-library-modal/utils/index.js +1 -0
  237. package/build-module/components/global-styles/font-library-modal/utils/index.js.map +1 -1
  238. package/build-module/components/global-styles/font-library-modal/utils/make-families-from-faces.js +1 -0
  239. package/build-module/components/global-styles/font-library-modal/utils/make-families-from-faces.js.map +1 -1
  240. package/build-module/components/global-styles/font-library-modal/utils/preview-styles.js +1 -0
  241. package/build-module/components/global-styles/font-library-modal/utils/preview-styles.js.map +1 -1
  242. package/build-module/components/global-styles/font-library-modal/utils/toggleFont.js +1 -0
  243. package/build-module/components/global-styles/font-library-modal/utils/toggleFont.js.map +1 -1
  244. package/build-module/components/global-styles/font-sizes/font-size.js +18 -14
  245. package/build-module/components/global-styles/font-sizes/font-size.js.map +1 -1
  246. package/build-module/components/global-styles/font-sizes/font-sizes.js +25 -27
  247. package/build-module/components/global-styles/font-sizes/font-sizes.js.map +1 -1
  248. package/build-module/components/global-styles/highlighted-colors.js +1 -0
  249. package/build-module/components/global-styles/highlighted-colors.js.map +1 -1
  250. package/build-module/components/global-styles/hooks.js +1 -0
  251. package/build-module/components/global-styles/hooks.js.map +1 -1
  252. package/build-module/components/global-styles/palette.js +1 -0
  253. package/build-module/components/global-styles/palette.js.map +1 -1
  254. package/build-module/components/global-styles/preset-colors.js +1 -0
  255. package/build-module/components/global-styles/preset-colors.js.map +1 -1
  256. package/build-module/components/global-styles/preview-colors.js +2 -2
  257. package/build-module/components/global-styles/preview-colors.js.map +1 -1
  258. package/build-module/components/global-styles/preview-styles.js +3 -2
  259. package/build-module/components/global-styles/preview-styles.js.map +1 -1
  260. package/build-module/components/global-styles/preview-typography.js +2 -2
  261. package/build-module/components/global-styles/preview-typography.js.map +1 -1
  262. package/build-module/components/global-styles/{preview-iframe.js → preview-wrapper.js} +13 -31
  263. package/build-module/components/global-styles/preview-wrapper.js.map +1 -0
  264. package/build-module/components/global-styles/screen-block-list.js +1 -0
  265. package/build-module/components/global-styles/screen-block-list.js.map +1 -1
  266. package/build-module/components/global-styles/screen-block.js +1 -1
  267. package/build-module/components/global-styles/screen-block.js.map +1 -1
  268. package/build-module/components/global-styles/screen-revisions/revisions-buttons.js +1 -0
  269. package/build-module/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
  270. package/build-module/components/global-styles/screen-revisions/use-global-styles-revisions.js +1 -0
  271. package/build-module/components/global-styles/screen-revisions/use-global-styles-revisions.js.map +1 -1
  272. package/build-module/components/global-styles/shadow-utils.js +1 -0
  273. package/build-module/components/global-styles/shadow-utils.js.map +1 -1
  274. package/build-module/components/global-styles/shadows-edit-panel.js +37 -35
  275. package/build-module/components/global-styles/shadows-edit-panel.js.map +1 -1
  276. package/build-module/components/global-styles/shadows-panel.js +47 -8
  277. package/build-module/components/global-styles/shadows-panel.js.map +1 -1
  278. package/build-module/components/global-styles/style-variations-container.js +1 -0
  279. package/build-module/components/global-styles/style-variations-container.js.map +1 -1
  280. package/build-module/components/global-styles/typeset.js +1 -0
  281. package/build-module/components/global-styles/typeset.js.map +1 -1
  282. package/build-module/components/global-styles/typography-example.js +8 -1
  283. package/build-module/components/global-styles/typography-example.js.map +1 -1
  284. package/build-module/components/global-styles/ui.js +1 -0
  285. package/build-module/components/global-styles/ui.js.map +1 -1
  286. package/build-module/components/global-styles/utils.js +1 -0
  287. package/build-module/components/global-styles/utils.js.map +1 -1
  288. package/build-module/components/global-styles/variations/variations-color.js +1 -0
  289. package/build-module/components/global-styles/variations/variations-color.js.map +1 -1
  290. package/build-module/components/global-styles/variations/variations-panel.js +1 -0
  291. package/build-module/components/global-styles/variations/variations-panel.js.map +1 -1
  292. package/build-module/components/global-styles/variations/variations-typography.js +1 -0
  293. package/build-module/components/global-styles/variations/variations-typography.js.map +1 -1
  294. package/build-module/components/global-styles-renderer/index.js +1 -0
  295. package/build-module/components/global-styles-renderer/index.js.map +1 -1
  296. package/build-module/components/layout/index.js +25 -9
  297. package/build-module/components/layout/index.js.map +1 -1
  298. package/build-module/components/maybe-editor/index.js +59 -0
  299. package/build-module/components/maybe-editor/index.js.map +1 -0
  300. package/build-module/components/media/index.js +1 -0
  301. package/build-module/components/media/index.js.map +1 -1
  302. package/build-module/components/page-patterns/fields.js +10 -84
  303. package/build-module/components/page-patterns/fields.js.map +1 -1
  304. package/build-module/components/page-patterns/header.js +1 -0
  305. package/build-module/components/page-patterns/header.js.map +1 -1
  306. package/build-module/components/page-patterns/index.js +16 -12
  307. package/build-module/components/page-patterns/index.js.map +1 -1
  308. package/build-module/components/page-patterns/search-items.js +1 -0
  309. package/build-module/components/page-patterns/search-items.js.map +1 -1
  310. package/build-module/components/page-patterns/use-pattern-settings.js +1 -0
  311. package/build-module/components/page-patterns/use-pattern-settings.js.map +1 -1
  312. package/build-module/components/page-patterns/use-patterns.js +1 -0
  313. package/build-module/components/page-patterns/use-patterns.js.map +1 -1
  314. package/build-module/components/page-templates/fields.js +6 -38
  315. package/build-module/components/page-templates/fields.js.map +1 -1
  316. package/build-module/components/page-templates/index.js +37 -40
  317. package/build-module/components/page-templates/index.js.map +1 -1
  318. package/build-module/components/post-edit/index.js +16 -8
  319. package/build-module/components/post-edit/index.js.map +1 -1
  320. package/build-module/components/post-list/index.js +41 -22
  321. package/build-module/components/post-list/index.js.map +1 -1
  322. package/build-module/components/posts-app-routes/index.js +1 -0
  323. package/build-module/components/posts-app-routes/index.js.map +1 -1
  324. package/build-module/components/resizable-frame/index.js +9 -1
  325. package/build-module/components/resizable-frame/index.js.map +1 -1
  326. package/build-module/components/save-button/index.js +1 -0
  327. package/build-module/components/save-button/index.js.map +1 -1
  328. package/build-module/components/save-hub/index.js +1 -0
  329. package/build-module/components/save-hub/index.js.map +1 -1
  330. package/build-module/components/save-keyboard-shortcut/index.js +1 -0
  331. package/build-module/components/save-keyboard-shortcut/index.js.map +1 -1
  332. package/build-module/components/save-panel/index.js +1 -0
  333. package/build-module/components/save-panel/index.js.map +1 -1
  334. package/build-module/components/sidebar/index.js +1 -0
  335. package/build-module/components/sidebar/index.js.map +1 -1
  336. package/build-module/components/sidebar-dataviews/custom-dataviews-list.js +6 -7
  337. package/build-module/components/sidebar-dataviews/custom-dataviews-list.js.map +1 -1
  338. package/build-module/components/sidebar-dataviews/dataview-item.js +1 -0
  339. package/build-module/components/sidebar-dataviews/dataview-item.js.map +1 -1
  340. package/build-module/components/sidebar-dataviews/default-views.js +10 -26
  341. package/build-module/components/sidebar-dataviews/default-views.js.map +1 -1
  342. package/build-module/components/sidebar-dataviews/index.js +2 -0
  343. package/build-module/components/sidebar-dataviews/index.js.map +1 -1
  344. package/build-module/components/sidebar-global-styles-wrapper/index.js +41 -74
  345. package/build-module/components/sidebar-global-styles-wrapper/index.js.map +1 -1
  346. package/build-module/components/sidebar-navigation-screen-global-styles/content.js +12 -38
  347. package/build-module/components/sidebar-navigation-screen-global-styles/content.js.map +1 -1
  348. package/build-module/components/sidebar-navigation-screen-main/index.js +40 -25
  349. package/build-module/components/sidebar-navigation-screen-main/index.js.map +1 -1
  350. package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js +1 -0
  351. package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
  352. package/build-module/components/sidebar-navigation-screen-patterns/index.js +1 -4
  353. package/build-module/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
  354. package/build-module/components/sidebar-navigation-screen-patterns/use-pattern-categories.js +1 -0
  355. package/build-module/components/sidebar-navigation-screen-patterns/use-pattern-categories.js.map +1 -1
  356. package/build-module/components/sidebar-navigation-screen-patterns/use-template-part-areas.js +1 -0
  357. package/build-module/components/sidebar-navigation-screen-patterns/use-template-part-areas.js.map +1 -1
  358. package/build-module/components/sidebar-navigation-screen-patterns/use-theme-patterns.js +1 -0
  359. package/build-module/components/sidebar-navigation-screen-patterns/use-theme-patterns.js.map +1 -1
  360. package/build-module/components/sidebar-navigation-screen-templates-browse/content.js +2 -0
  361. package/build-module/components/sidebar-navigation-screen-templates-browse/content.js.map +1 -1
  362. package/build-module/components/site-editor-routes/home.js +4 -2
  363. package/build-module/components/site-editor-routes/home.js.map +1 -1
  364. package/build-module/components/site-editor-routes/index.js +3 -1
  365. package/build-module/components/site-editor-routes/index.js.map +1 -1
  366. package/build-module/components/site-editor-routes/stylebook.js +29 -0
  367. package/build-module/components/site-editor-routes/stylebook.js.map +1 -0
  368. package/build-module/components/site-editor-routes/styles.js +7 -1
  369. package/build-module/components/site-editor-routes/styles.js.map +1 -1
  370. package/build-module/components/site-editor-routes/template-item.js +3 -3
  371. package/build-module/components/site-editor-routes/template-item.js.map +1 -1
  372. package/build-module/components/site-editor-routes/template-part-item.js +3 -3
  373. package/build-module/components/site-editor-routes/template-part-item.js.map +1 -1
  374. package/build-module/components/style-book/categories.js +1 -0
  375. package/build-module/components/style-book/categories.js.map +1 -1
  376. package/build-module/components/style-book/color-examples.js +9 -3
  377. package/build-module/components/style-book/color-examples.js.map +1 -1
  378. package/build-module/components/style-book/constants.js +35 -2
  379. package/build-module/components/style-book/constants.js.map +1 -1
  380. package/build-module/components/style-book/duotone-examples.js +1 -0
  381. package/build-module/components/style-book/duotone-examples.js.map +1 -1
  382. package/build-module/components/style-book/examples.js +48 -30
  383. package/build-module/components/style-book/examples.js.map +1 -1
  384. package/build-module/components/style-book/index.js +185 -64
  385. package/build-module/components/style-book/index.js.map +1 -1
  386. package/build-module/components/style-book/types.js.map +1 -1
  387. package/build-module/index.js +1 -0
  388. package/build-module/index.js.map +1 -1
  389. package/build-module/posts.js +1 -0
  390. package/build-module/posts.js.map +1 -1
  391. package/build-module/store/reducer.js +1 -0
  392. package/build-module/store/reducer.js.map +1 -1
  393. package/build-module/utils/get-filtered-template-parts.js +1 -0
  394. package/build-module/utils/get-filtered-template-parts.js.map +1 -1
  395. package/build-module/utils/set-nested-value.js +1 -0
  396. package/build-module/utils/set-nested-value.js.map +1 -1
  397. package/build-style/posts-rtl.css +151 -182
  398. package/build-style/posts.css +151 -182
  399. package/build-style/style-rtl.css +343 -354
  400. package/build-style/style.css +343 -354
  401. package/package.json +42 -41
  402. package/src/components/add-new-pattern/index.js +10 -7
  403. package/src/components/add-new-post/index.js +1 -1
  404. package/src/components/canvas-loader/style.scss +4 -3
  405. package/src/components/editor/index.js +1 -7
  406. package/src/components/editor/style.scss +4 -2
  407. package/src/components/editor-canvas-container/style.scss +7 -1
  408. package/src/components/global-styles/confirm-reset-shadow-dialog.js +37 -0
  409. package/src/components/global-styles/font-library-modal/index.js +1 -1
  410. package/src/components/global-styles/font-library-modal/style.scss +4 -2
  411. package/src/components/global-styles/font-sizes/font-size.js +28 -19
  412. package/src/components/global-styles/font-sizes/font-sizes.js +37 -35
  413. package/src/components/global-styles/preview-colors.js +3 -3
  414. package/src/components/global-styles/preview-styles.js +3 -3
  415. package/src/components/global-styles/preview-typography.js +3 -3
  416. package/src/components/global-styles/{preview-iframe.js → preview-wrapper.js} +9 -35
  417. package/src/components/global-styles/screen-block.js +3 -2
  418. package/src/components/global-styles/shadows-edit-panel.js +58 -49
  419. package/src/components/global-styles/shadows-panel.js +64 -5
  420. package/src/components/global-styles/style.scss +40 -18
  421. package/src/components/global-styles/typography-example.js +12 -1
  422. package/src/components/global-styles/variations/style.scss +4 -3
  423. package/src/components/layout/index.js +20 -7
  424. package/src/components/layout/style.scss +8 -3
  425. package/src/components/maybe-editor/index.js +58 -0
  426. package/src/components/page/style.scss +8 -5
  427. package/src/components/page-patterns/fields.js +13 -100
  428. package/src/components/page-patterns/index.js +23 -11
  429. package/src/components/page-patterns/style.scss +4 -53
  430. package/src/components/page-templates/fields.js +6 -33
  431. package/src/components/page-templates/index.js +38 -55
  432. package/src/components/page-templates/style.scss +4 -20
  433. package/src/components/post-edit/index.js +22 -18
  434. package/src/components/post-list/index.js +59 -44
  435. package/src/components/post-list/style.scss +0 -36
  436. package/src/components/resizable-frame/index.js +10 -1
  437. package/src/components/sidebar-dataviews/custom-dataviews-list.js +7 -6
  438. package/src/components/sidebar-dataviews/default-views.js +10 -26
  439. package/src/components/sidebar-dataviews/index.js +1 -1
  440. package/src/components/sidebar-dataviews/style.scss +9 -1
  441. package/src/components/sidebar-global-styles-wrapper/index.js +37 -83
  442. package/src/components/sidebar-global-styles-wrapper/style.scss +22 -0
  443. package/src/components/sidebar-navigation-item/style.scss +6 -0
  444. package/src/components/sidebar-navigation-screen/style.scss +0 -5
  445. package/src/components/sidebar-navigation-screen-global-styles/content.js +7 -35
  446. package/src/components/sidebar-navigation-screen-main/index.js +67 -38
  447. package/src/components/sidebar-navigation-screen-main/style.scss +4 -0
  448. package/src/components/sidebar-navigation-screen-navigation-menus/index.js +1 -1
  449. package/src/components/sidebar-navigation-screen-navigation-menus/style.scss +5 -0
  450. package/src/components/sidebar-navigation-screen-patterns/index.js +0 -7
  451. package/src/components/sidebar-navigation-screen-patterns/style.scss +2 -0
  452. package/src/components/sidebar-navigation-screen-templates-browse/content.js +1 -1
  453. package/src/components/sidebar-navigation-screen-templates-browse/style.scss +4 -0
  454. package/src/components/site-editor-routes/home.js +2 -2
  455. package/src/components/site-editor-routes/index.js +2 -0
  456. package/src/components/site-editor-routes/stylebook.js +28 -0
  457. package/src/components/site-editor-routes/styles.js +5 -1
  458. package/src/components/site-editor-routes/template-item.js +3 -3
  459. package/src/components/site-editor-routes/template-part-item.js +3 -3
  460. package/src/components/site-hub/style.scss +4 -2
  461. package/src/components/style-book/color-examples.tsx +21 -3
  462. package/src/components/style-book/constants.ts +49 -2
  463. package/src/components/style-book/examples.tsx +55 -31
  464. package/src/components/style-book/index.js +268 -87
  465. package/src/components/style-book/style.scss +4 -0
  466. package/src/components/style-book/types.ts +1 -1
  467. package/src/style.scss +4 -1
  468. package/build/components/error-boundary/index.js +0 -47
  469. package/build/components/error-boundary/index.js.map +0 -1
  470. package/build/components/error-boundary/warning.js +0 -42
  471. package/build/components/error-boundary/warning.js.map +0 -1
  472. package/build/components/global-styles/preview-iframe.js.map +0 -1
  473. package/build-module/components/error-boundary/index.js +0 -38
  474. package/build-module/components/error-boundary/index.js.map +0 -1
  475. package/build-module/components/error-boundary/warning.js +0 -35
  476. package/build-module/components/error-boundary/warning.js.map +0 -1
  477. package/build-module/components/global-styles/preview-iframe.js.map +0 -1
  478. package/src/components/error-boundary/index.js +0 -44
  479. package/src/components/error-boundary/test/error-boundary.js +0 -40
  480. package/src/components/error-boundary/warning.js +0 -30
@@ -17,12 +17,13 @@ import {
17
17
  privateApis as blockEditorPrivateApis,
18
18
  store as blockEditorStore,
19
19
  useSettings,
20
+ BlockEditorProvider,
20
21
  __unstableEditorStyles as EditorStyles,
21
22
  __unstableIframe as Iframe,
22
23
  __experimentalUseMultipleOriginColorsAndGradients as useMultipleOriginColorsAndGradients,
23
24
  } from '@wordpress/block-editor';
24
25
  import { privateApis as editorPrivateApis } from '@wordpress/editor';
25
- import { useSelect } from '@wordpress/data';
26
+ import { useSelect, dispatch } from '@wordpress/data';
26
27
  import { useResizeObserver } from '@wordpress/compose';
27
28
  import {
28
29
  useMemo,
@@ -31,8 +32,11 @@ import {
31
32
  useContext,
32
33
  useRef,
33
34
  useLayoutEffect,
35
+ useEffect,
34
36
  } from '@wordpress/element';
35
37
  import { ENTER, SPACE } from '@wordpress/keycodes';
38
+ import { uploadMedia } from '@wordpress/media-utils';
39
+ import { store as coreStore } from '@wordpress/core-data';
36
40
 
37
41
  /**
38
42
  * Internal dependencies
@@ -45,6 +49,13 @@ import {
45
49
  getTopLevelStyleBookCategories,
46
50
  } from './categories';
47
51
  import { getExamples } from './examples';
52
+ import { store as siteEditorStore } from '../../store';
53
+ import { useSection } from '../sidebar-global-styles-wrapper';
54
+ import { GlobalStylesRenderer } from '../global-styles-renderer';
55
+ import {
56
+ STYLE_BOOK_COLOR_GROUPS,
57
+ STYLE_BOOK_PREVIEW_CATEGORIES,
58
+ } from '../style-book/constants';
48
59
 
49
60
  const {
50
61
  ExperimentalBlockEditorProvider,
@@ -67,11 +78,14 @@ function isObjectEmpty( object ) {
67
78
  * @param {HTMLIFrameElement} iframe The target iframe.
68
79
  */
69
80
  const scrollToSection = ( anchorId, iframe ) => {
70
- if ( ! iframe || ! iframe?.contentDocument ) {
81
+ if ( ! anchorId || ! iframe || ! iframe?.contentDocument ) {
71
82
  return;
72
83
  }
73
84
 
74
- const element = iframe.contentDocument.getElementById( anchorId );
85
+ const element =
86
+ anchorId === 'top'
87
+ ? iframe.contentDocument.body
88
+ : iframe.contentDocument.getElementById( anchorId );
75
89
  if ( element ) {
76
90
  element.scrollIntoView( {
77
91
  behavior: 'smooth',
@@ -80,29 +94,24 @@ const scrollToSection = ( anchorId, iframe ) => {
80
94
  };
81
95
 
82
96
  /**
83
- * Parses a Block Editor navigation path to extract the block name and
84
- * build a style book navigation path. The object can be extended to include a category,
85
- * representing a style book tab/section.
97
+ * Parses a Block Editor navigation path to build a style book navigation path.
98
+ * The object can be extended to include a category, representing a style book tab/section.
86
99
  *
87
100
  * @param {string} path An internal Block Editor navigation path.
88
101
  * @return {null|{block: string}} An object containing the example to navigate to.
89
102
  */
90
103
  const getStyleBookNavigationFromPath = ( path ) => {
91
104
  if ( path && typeof path === 'string' ) {
92
- if ( path.startsWith( '/typography' ) ) {
105
+ if (
106
+ path === '/' ||
107
+ path.startsWith( '/typography' ) ||
108
+ path.startsWith( '/colors' ) ||
109
+ path.startsWith( '/blocks' )
110
+ ) {
93
111
  return {
94
- block: 'typography',
112
+ top: true,
95
113
  };
96
114
  }
97
- let block = path.includes( '/blocks/' )
98
- ? decodeURIComponent( path.split( '/blocks/' )[ 1 ] )
99
- : null;
100
- // Default to theme-colors if the path ends with /colors.
101
- block = path.endsWith( '/colors' ) ? 'theme-colors' : block;
102
-
103
- return {
104
- block,
105
- };
106
115
  }
107
116
  return null;
108
117
  };
@@ -182,6 +191,31 @@ function useMultiOriginPalettes() {
182
191
  return palettes;
183
192
  }
184
193
 
194
+ /**
195
+ * Get deduped examples for single page stylebook.
196
+ * @param {Array} examples Array of examples.
197
+ * @return {Array} Deduped examples.
198
+ */
199
+ export function getExamplesForSinglePageUse( examples ) {
200
+ const examplesForSinglePageUse = [];
201
+ const overviewCategoryExamples = getExamplesByCategory(
202
+ { slug: 'overview' },
203
+ examples
204
+ );
205
+ examplesForSinglePageUse.push( ...overviewCategoryExamples.examples );
206
+ const otherExamples = examples.filter( ( example ) => {
207
+ return (
208
+ example.category !== 'overview' &&
209
+ ! overviewCategoryExamples.examples.find(
210
+ ( overviewExample ) => overviewExample.name === example.name
211
+ )
212
+ );
213
+ } );
214
+ examplesForSinglePageUse.push( ...otherExamples );
215
+
216
+ return examplesForSinglePageUse;
217
+ }
218
+
185
219
  function StyleBook( {
186
220
  enableResizing = true,
187
221
  isSelected,
@@ -208,21 +242,7 @@ function StyleBook( {
208
242
  [ examples ]
209
243
  );
210
244
 
211
- const examplesForSinglePageUse = [];
212
- const overviewCategoryExamples = getExamplesByCategory(
213
- { slug: 'overview' },
214
- examples
215
- );
216
- examplesForSinglePageUse.push( ...overviewCategoryExamples.examples );
217
- const otherExamples = examples.filter( ( example ) => {
218
- return (
219
- example.category !== 'overview' &&
220
- ! overviewCategoryExamples.examples.find(
221
- ( overviewExample ) => overviewExample.name === example.name
222
- )
223
- );
224
- } );
225
- examplesForSinglePageUse.push( ...otherExamples );
245
+ const examplesForSinglePageUse = getExamplesForSinglePageUse( examples );
226
246
 
227
247
  const { base: baseConfig } = useContext( GlobalStylesContext );
228
248
  const goTo = getStyleBookNavigationFromPath( path );
@@ -285,29 +305,43 @@ function StyleBook( {
285
305
  ) ) }
286
306
  </Tabs.TabList>
287
307
  </div>
288
- { tabs.map( ( tab ) => (
289
- <Tabs.TabPanel
290
- key={ tab.slug }
291
- tabId={ tab.slug }
292
- focusable={ false }
293
- className="edit-site-style-book__tabpanel"
294
- >
295
- <StyleBookBody
296
- category={ tab.slug }
297
- examples={ examples }
298
- isSelected={ isSelected }
299
- onSelect={ onSelect }
300
- settings={ settings }
301
- sizes={ sizes }
302
- title={ tab.title }
303
- goTo={ goTo }
304
- />
305
- </Tabs.TabPanel>
306
- ) ) }
308
+ { tabs.map( ( tab ) => {
309
+ const categoryDefinition = tab.slug
310
+ ? getTopLevelStyleBookCategories().find(
311
+ ( _category ) =>
312
+ _category.slug === tab.slug
313
+ )
314
+ : null;
315
+ const filteredExamples = categoryDefinition
316
+ ? getExamplesByCategory(
317
+ categoryDefinition,
318
+ examples
319
+ )
320
+ : { examples };
321
+ return (
322
+ <Tabs.TabPanel
323
+ key={ tab.slug }
324
+ tabId={ tab.slug }
325
+ focusable={ false }
326
+ className="edit-site-style-book__tabpanel"
327
+ >
328
+ <StyleBookBody
329
+ category={ tab.slug }
330
+ examples={ filteredExamples }
331
+ isSelected={ isSelected }
332
+ onSelect={ onSelect }
333
+ settings={ settings }
334
+ sizes={ sizes }
335
+ title={ tab.title }
336
+ goTo={ goTo }
337
+ />
338
+ </Tabs.TabPanel>
339
+ );
340
+ } ) }
307
341
  </Tabs>
308
342
  ) : (
309
343
  <StyleBookBody
310
- examples={ examplesForSinglePageUse }
344
+ examples={ { examples: examplesForSinglePageUse } }
311
345
  isSelected={ isSelected }
312
346
  onClick={ onClick }
313
347
  onSelect={ onSelect }
@@ -321,8 +355,157 @@ function StyleBook( {
321
355
  );
322
356
  }
323
357
 
324
- const StyleBookBody = ( {
325
- category,
358
+ /**
359
+ * Style Book Preview component renders the stylebook without the Editor dependency.
360
+ *
361
+ * @param {Object} props Component props.
362
+ * @param {Object} props.userConfig User configuration.
363
+ * @param {boolean} props.isStatic Whether the stylebook is static or clickable.
364
+ * @return {Object} Style Book Preview component.
365
+ */
366
+ export const StyleBookPreview = ( { userConfig = {}, isStatic = false } ) => {
367
+ const siteEditorSettings = useSelect(
368
+ ( select ) => select( siteEditorStore ).getSettings(),
369
+ []
370
+ );
371
+
372
+ const canUserUploadMedia = useSelect(
373
+ ( select ) =>
374
+ select( coreStore ).canUser( 'create', {
375
+ kind: 'root',
376
+ name: 'media',
377
+ } ),
378
+ []
379
+ );
380
+
381
+ // Update block editor settings because useMultipleOriginColorsAndGradients fetch colours from there.
382
+ useEffect( () => {
383
+ dispatch( blockEditorStore ).updateSettings( {
384
+ ...siteEditorSettings,
385
+ mediaUpload: canUserUploadMedia ? uploadMedia : undefined,
386
+ } );
387
+ }, [ siteEditorSettings, canUserUploadMedia ] );
388
+
389
+ const [ section, onChangeSection ] = useSection();
390
+
391
+ const isSelected = ( blockName ) => {
392
+ // Match '/blocks/core%2Fbutton' and
393
+ // '/blocks/core%2Fbutton/typography', but not
394
+ // '/blocks/core%2Fbuttons'.
395
+ return (
396
+ section === `/blocks/${ encodeURIComponent( blockName ) }` ||
397
+ section.startsWith(
398
+ `/blocks/${ encodeURIComponent( blockName ) }/`
399
+ )
400
+ );
401
+ };
402
+
403
+ const onSelect = ( blockName ) => {
404
+ if (
405
+ STYLE_BOOK_COLOR_GROUPS.find(
406
+ ( group ) => group.slug === blockName
407
+ )
408
+ ) {
409
+ // Go to color palettes Global Styles.
410
+ onChangeSection( '/colors/palette' );
411
+ return;
412
+ }
413
+ if ( blockName === 'typography' ) {
414
+ // Go to typography Global Styles.
415
+ onChangeSection( '/typography' );
416
+ return;
417
+ }
418
+
419
+ // Now go to the selected block.
420
+ onChangeSection( `/blocks/${ encodeURIComponent( blockName ) }` );
421
+ };
422
+
423
+ const [ resizeObserver, sizes ] = useResizeObserver();
424
+ const colors = useMultiOriginPalettes();
425
+ const examples = getExamples( colors );
426
+ const examplesForSinglePageUse = getExamplesForSinglePageUse( examples );
427
+
428
+ let previewCategory = null;
429
+ if ( section.includes( '/colors' ) ) {
430
+ previewCategory = 'colors';
431
+ } else if ( section.includes( '/typography' ) ) {
432
+ previewCategory = 'text';
433
+ } else if ( section.includes( '/blocks' ) ) {
434
+ previewCategory = 'blocks';
435
+ const blockName =
436
+ decodeURIComponent( section ).split( '/blocks/' )[ 1 ];
437
+ if (
438
+ blockName &&
439
+ examples.find( ( example ) => example.name === blockName )
440
+ ) {
441
+ previewCategory = blockName;
442
+ }
443
+ } else if ( ! isStatic ) {
444
+ previewCategory = 'overview';
445
+ }
446
+ const categoryDefinition = STYLE_BOOK_PREVIEW_CATEGORIES.find(
447
+ ( category ) => category.slug === previewCategory
448
+ );
449
+
450
+ // If there's no category definition there may be a single block.
451
+ const filteredExamples = categoryDefinition
452
+ ? getExamplesByCategory( categoryDefinition, examples )
453
+ : {
454
+ examples: [
455
+ examples.find(
456
+ ( example ) => example.name === previewCategory
457
+ ),
458
+ ],
459
+ };
460
+
461
+ // If there's no preview category, show all examples.
462
+ const displayedExamples = previewCategory
463
+ ? filteredExamples
464
+ : { examples: examplesForSinglePageUse };
465
+
466
+ const { base: baseConfig } = useContext( GlobalStylesContext );
467
+ const goTo = getStyleBookNavigationFromPath( section );
468
+
469
+ const mergedConfig = useMemo( () => {
470
+ if ( ! isObjectEmpty( userConfig ) && ! isObjectEmpty( baseConfig ) ) {
471
+ return mergeBaseAndUserConfigs( baseConfig, userConfig );
472
+ }
473
+ return {};
474
+ }, [ baseConfig, userConfig ] );
475
+
476
+ const [ globalStyles ] = useGlobalStylesOutputWithConfig( mergedConfig );
477
+
478
+ const settings = useMemo(
479
+ () => ( {
480
+ ...siteEditorSettings,
481
+ styles:
482
+ ! isObjectEmpty( globalStyles ) && ! isObjectEmpty( userConfig )
483
+ ? globalStyles
484
+ : siteEditorSettings.styles,
485
+ isPreviewMode: true,
486
+ } ),
487
+ [ globalStyles, siteEditorSettings, userConfig ]
488
+ );
489
+
490
+ return (
491
+ <div className="edit-site-style-book">
492
+ { resizeObserver }
493
+ <BlockEditorProvider settings={ settings }>
494
+ <GlobalStylesRenderer disableRootPadding />
495
+ <StyleBookBody
496
+ examples={ displayedExamples }
497
+ settings={ settings }
498
+ goTo={ goTo }
499
+ sizes={ sizes }
500
+ isSelected={ ! isStatic ? isSelected : null }
501
+ onSelect={ ! isStatic ? onSelect : null }
502
+ />
503
+ </BlockEditorProvider>
504
+ </div>
505
+ );
506
+ };
507
+
508
+ export const StyleBookBody = ( {
326
509
  examples,
327
510
  isSelected,
328
511
  onClick,
@@ -365,10 +548,12 @@ const StyleBookBody = ( {
365
548
 
366
549
  const handleLoad = () => setHasIframeLoaded( true );
367
550
  useLayoutEffect( () => {
368
- if ( goTo?.block && hasIframeLoaded && iframeRef?.current ) {
369
- scrollToSection( `example-${ goTo?.block }`, iframeRef?.current );
551
+ if ( hasIframeLoaded && iframeRef?.current ) {
552
+ if ( goTo?.top ) {
553
+ scrollToSection( 'top', iframeRef?.current );
554
+ }
370
555
  }
371
- }, [ iframeRef?.current, goTo?.block, scrollToSection, hasIframeLoaded ] );
556
+ }, [ iframeRef?.current, goTo, scrollToSection, hasIframeLoaded ] );
372
557
 
373
558
  return (
374
559
  <Iframe
@@ -392,8 +577,7 @@ const StyleBookBody = ( {
392
577
  className={ clsx( 'edit-site-style-book__examples', {
393
578
  'is-wide': sizes.width > 600,
394
579
  } ) }
395
- examples={ examples }
396
- category={ category }
580
+ filteredExamples={ examples }
397
581
  label={
398
582
  title
399
583
  ? sprintf(
@@ -405,24 +589,14 @@ const StyleBookBody = ( {
405
589
  }
406
590
  isSelected={ isSelected }
407
591
  onSelect={ onSelect }
408
- key={ category }
592
+ key={ title }
409
593
  />
410
594
  </Iframe>
411
595
  );
412
596
  };
413
597
 
414
598
  const Examples = memo(
415
- ( { className, examples, category, label, isSelected, onSelect } ) => {
416
- const categoryDefinition = category
417
- ? getTopLevelStyleBookCategories().find(
418
- ( _category ) => _category.slug === category
419
- )
420
- : null;
421
-
422
- const filteredExamples = categoryDefinition
423
- ? getExamplesByCategory( categoryDefinition, examples )
424
- : { examples };
425
-
599
+ ( { className, filteredExamples, label, isSelected, onSelect } ) => {
426
600
  return (
427
601
  <Composite
428
602
  orientation="vertical"
@@ -439,7 +613,11 @@ const Examples = memo(
439
613
  content={ example.content }
440
614
  blocks={ example.blocks }
441
615
  isSelected={ isSelected?.( example.name ) }
442
- onClick={ () => onSelect?.( example.name ) }
616
+ onClick={
617
+ !! onSelect
618
+ ? () => onSelect( example.name )
619
+ : null
620
+ }
443
621
  />
444
622
  ) ) }
445
623
  { !! filteredExamples?.subcategories?.length &&
@@ -476,9 +654,7 @@ const Subcategory = ( { examples, isSelected, onSelect } ) => {
476
654
  content={ example.content }
477
655
  blocks={ example.blocks }
478
656
  isSelected={ isSelected?.( example.name ) }
479
- onClick={ () => {
480
- onSelect?.( example.name );
481
- } }
657
+ onClick={ !! onSelect ? () => onSelect( example.name ) : null }
482
658
  />
483
659
  ) )
484
660
  );
@@ -506,12 +682,13 @@ const Example = ( { id, title, blocks, isSelected, onClick, content } ) => {
506
682
  [ blocks ]
507
683
  );
508
684
 
509
- const disabledProps = disabledExamples.includes( id )
510
- ? {
511
- disabled: true,
512
- accessibleWhenDisabled: true,
513
- }
514
- : {};
685
+ const disabledProps =
686
+ disabledExamples.includes( id ) || ! onClick
687
+ ? {
688
+ disabled: true,
689
+ accessibleWhenDisabled: !! onClick,
690
+ }
691
+ : {};
515
692
 
516
693
  return (
517
694
  <div role="row">
@@ -522,13 +699,17 @@ const Example = ( { id, title, blocks, isSelected, onClick, content } ) => {
522
699
  'is-disabled-example': !! disabledProps?.disabled,
523
700
  } ) }
524
701
  id={ id }
525
- aria-label={ sprintf(
526
- // translators: %s: Title of a block, e.g. Heading.
527
- __( 'Open %s styles in Styles panel' ),
528
- title
529
- ) }
702
+ aria-label={
703
+ !! onClick
704
+ ? sprintf(
705
+ // translators: %s: Title of a block, e.g. Heading.
706
+ __( 'Open %s styles in Styles panel' ),
707
+ title
708
+ )
709
+ : undefined
710
+ }
530
711
  render={ <div /> }
531
- role="button"
712
+ role={ !! onClick ? 'button' : null }
532
713
  onClick={ onClick }
533
714
  { ...disabledProps }
534
715
  >
@@ -12,6 +12,10 @@
12
12
  }
13
13
 
14
14
  .edit-site-style-book__iframe {
15
+ display: block;
16
+ height: 100%;
17
+ width: 100%;
18
+
15
19
  &.is-button {
16
20
  border-radius: $radius-large;
17
21
  }
@@ -1,4 +1,4 @@
1
- type Block = {
1
+ export type Block = {
2
2
  name: string;
3
3
  attributes: Record< string, unknown >;
4
4
  innerBlocks?: Block[];
package/src/style.scss CHANGED
@@ -21,9 +21,11 @@
21
21
  @import "./components/sidebar-navigation-screen-details-footer/style.scss";
22
22
  @import "./components/sidebar-navigation-screen-navigation-menu/style.scss";
23
23
  @import "./components/sidebar-navigation-screen-patterns/style.scss";
24
+ @import "./components/sidebar-navigation-screen-navigation-menus/style.scss";
25
+ @import "./components/sidebar-navigation-screen-main/style.scss";
26
+ @import "./components/sidebar-navigation-screen-templates-browse/style.scss";
24
27
  @import "./components/sidebar-dataviews/style.scss";
25
28
  @import "./components/site-hub/style.scss";
26
- @import "./components/sidebar-navigation-screen-navigation-menus/style.scss";
27
29
  @import "./components/site-icon/style.scss";
28
30
  @import "./components/style-book/style.scss";
29
31
  @import "./components/editor-canvas-container/style.scss";
@@ -47,6 +49,7 @@
47
49
  mix-blend-mode: normal;
48
50
  display: block;
49
51
  }
52
+
50
53
  /* stylelint-enable */
51
54
 
52
55
  body.js #wpadminbar {
@@ -1,47 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.default = void 0;
8
- var _element = require("@wordpress/element");
9
- var _i18n = require("@wordpress/i18n");
10
- var _hooks = require("@wordpress/hooks");
11
- var _warning = _interopRequireDefault(require("./warning"));
12
- var _jsxRuntime = require("react/jsx-runtime");
13
- /**
14
- * WordPress dependencies
15
- */
16
-
17
- /**
18
- * Internal dependencies
19
- */
20
-
21
- class ErrorBoundary extends _element.Component {
22
- constructor() {
23
- super(...arguments);
24
- this.state = {
25
- error: null
26
- };
27
- }
28
- componentDidCatch(error) {
29
- (0, _hooks.doAction)('editor.ErrorBoundary.errorLogged', error);
30
- }
31
- static getDerivedStateFromError(error) {
32
- return {
33
- error
34
- };
35
- }
36
- render() {
37
- if (!this.state.error) {
38
- return this.props.children;
39
- }
40
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_warning.default, {
41
- message: (0, _i18n.__)('The editor has encountered an unexpected error.'),
42
- error: this.state.error
43
- });
44
- }
45
- }
46
- exports.default = ErrorBoundary;
47
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_element","require","_i18n","_hooks","_warning","_interopRequireDefault","_jsxRuntime","ErrorBoundary","Component","constructor","arguments","state","error","componentDidCatch","doAction","getDerivedStateFromError","render","props","children","jsx","default","message","__","exports"],"sources":["@wordpress/edit-site/src/components/error-boundary/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { doAction } from '@wordpress/hooks';\n\n/**\n * Internal dependencies\n */\nimport ErrorBoundaryWarning from './warning';\n\nexport default class ErrorBoundary extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\n\t\tthis.state = {\n\t\t\terror: null,\n\t\t};\n\t}\n\n\tcomponentDidCatch( error ) {\n\t\tdoAction( 'editor.ErrorBoundary.errorLogged', error );\n\t}\n\n\tstatic getDerivedStateFromError( error ) {\n\t\treturn { error };\n\t}\n\n\trender() {\n\t\tif ( ! this.state.error ) {\n\t\t\treturn this.props.children;\n\t\t}\n\n\t\treturn (\n\t\t\t<ErrorBoundaryWarning\n\t\t\t\tmessage={ __(\n\t\t\t\t\t'The editor has encountered an unexpected error.'\n\t\t\t\t) }\n\t\t\t\terror={ this.state.error }\n\t\t\t/>\n\t\t);\n\t}\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAKA,IAAAG,QAAA,GAAAC,sBAAA,CAAAJ,OAAA;AAA6C,IAAAK,WAAA,GAAAL,OAAA;AAV7C;AACA;AACA;;AAKA;AACA;AACA;;AAGe,MAAMM,aAAa,SAASC,kBAAS,CAAC;EACpDC,WAAWA,CAAA,EAAG;IACb,KAAK,CAAE,GAAGC,SAAU,CAAC;IAErB,IAAI,CAACC,KAAK,GAAG;MACZC,KAAK,EAAE;IACR,CAAC;EACF;EAEAC,iBAAiBA,CAAED,KAAK,EAAG;IAC1B,IAAAE,eAAQ,EAAE,kCAAkC,EAAEF,KAAM,CAAC;EACtD;EAEA,OAAOG,wBAAwBA,CAAEH,KAAK,EAAG;IACxC,OAAO;MAAEA;IAAM,CAAC;EACjB;EAEAI,MAAMA,CAAA,EAAG;IACR,IAAK,CAAE,IAAI,CAACL,KAAK,CAACC,KAAK,EAAG;MACzB,OAAO,IAAI,CAACK,KAAK,CAACC,QAAQ;IAC3B;IAEA,oBACC,IAAAZ,WAAA,CAAAa,GAAA,EAACf,QAAA,CAAAgB,OAAoB;MACpBC,OAAO,EAAG,IAAAC,QAAE,EACX,iDACD,CAAG;MACHV,KAAK,EAAG,IAAI,CAACD,KAAK,CAACC;IAAO,CAC1B,CAAC;EAEJ;AACD;AAACW,OAAA,CAAAH,OAAA,GAAAb,aAAA","ignoreList":[]}
@@ -1,42 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = ErrorBoundaryWarning;
7
- var _i18n = require("@wordpress/i18n");
8
- var _components = require("@wordpress/components");
9
- var _blockEditor = require("@wordpress/block-editor");
10
- var _compose = require("@wordpress/compose");
11
- var _jsxRuntime = require("react/jsx-runtime");
12
- /**
13
- * WordPress dependencies
14
- */
15
-
16
- function CopyButton({
17
- text,
18
- children
19
- }) {
20
- const ref = (0, _compose.useCopyToClipboard)(text);
21
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
22
- __next40pxDefaultSize: true,
23
- variant: "secondary",
24
- ref: ref,
25
- children: children
26
- });
27
- }
28
- function ErrorBoundaryWarning({
29
- message,
30
- error
31
- }) {
32
- const actions = [/*#__PURE__*/(0, _jsxRuntime.jsx)(CopyButton, {
33
- text: error.stack,
34
- children: (0, _i18n.__)('Copy Error')
35
- }, "copy-error")];
36
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_blockEditor.Warning, {
37
- className: "editor-error-boundary",
38
- actions: actions,
39
- children: message
40
- });
41
- }
42
- //# sourceMappingURL=warning.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_i18n","require","_components","_blockEditor","_compose","_jsxRuntime","CopyButton","text","children","ref","useCopyToClipboard","jsx","Button","__next40pxDefaultSize","variant","ErrorBoundaryWarning","message","error","actions","stack","__","Warning","className"],"sources":["@wordpress/edit-site/src/components/error-boundary/warning.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { Warning } from '@wordpress/block-editor';\nimport { useCopyToClipboard } from '@wordpress/compose';\n\nfunction CopyButton( { text, children } ) {\n\tconst ref = useCopyToClipboard( text );\n\treturn (\n\t\t<Button __next40pxDefaultSize variant=\"secondary\" ref={ ref }>\n\t\t\t{ children }\n\t\t</Button>\n\t);\n}\n\nexport default function ErrorBoundaryWarning( { message, error } ) {\n\tconst actions = [\n\t\t<CopyButton key=\"copy-error\" text={ error.stack }>\n\t\t\t{ __( 'Copy Error' ) }\n\t\t</CopyButton>,\n\t];\n\n\treturn (\n\t\t<Warning className=\"editor-error-boundary\" actions={ actions }>\n\t\t\t{ message }\n\t\t</Warning>\n\t);\n}\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AAAwD,IAAAI,WAAA,GAAAJ,OAAA;AANxD;AACA;AACA;;AAMA,SAASK,UAAUA,CAAE;EAAEC,IAAI;EAAEC;AAAS,CAAC,EAAG;EACzC,MAAMC,GAAG,GAAG,IAAAC,2BAAkB,EAAEH,IAAK,CAAC;EACtC,oBACC,IAAAF,WAAA,CAAAM,GAAA,EAACT,WAAA,CAAAU,MAAM;IAACC,qBAAqB;IAACC,OAAO,EAAC,WAAW;IAACL,GAAG,EAAGA,GAAK;IAAAD,QAAA,EAC1DA;EAAQ,CACH,CAAC;AAEX;AAEe,SAASO,oBAAoBA,CAAE;EAAEC,OAAO;EAAEC;AAAM,CAAC,EAAG;EAClE,MAAMC,OAAO,GAAG,cACf,IAAAb,WAAA,CAAAM,GAAA,EAACL,UAAU;IAAkBC,IAAI,EAAGU,KAAK,CAACE,KAAO;IAAAX,QAAA,EAC9C,IAAAY,QAAE,EAAE,YAAa;EAAC,GADL,YAEJ,CAAC,CACb;EAED,oBACC,IAAAf,WAAA,CAAAM,GAAA,EAACR,YAAA,CAAAkB,OAAO;IAACC,SAAS,EAAC,uBAAuB;IAACJ,OAAO,EAAGA,OAAS;IAAAV,QAAA,EAC3DQ;EAAO,CACD,CAAC;AAEZ","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"names":["_blockEditor","require","_components","_compose","_element","_lockUnlock","_jsxRuntime","useGlobalStyle","useGlobalStylesOutput","unlock","blockEditorPrivateApis","normalizedWidth","normalizedHeight","THROTTLE_OPTIONS","leading","trailing","PreviewIframe","children","label","isFocused","withHoverView","backgroundColor","gradientValue","styles","disableMotion","useReducedMotion","isHovered","setIsHovered","useState","containerResizeListener","width","useResizeObserver","throttledWidth","setThrottledWidthState","ratioState","setRatioState","setThrottledWidth","useThrottle","useLayoutEffect","newRatio","ratioDiff","isRatioDiffBigEnough","Math","abs","fallbackRatio","ratio","editorStyles","useMemo","css","isGlobalStyles","isReady","jsxs","Fragment","jsx","style","position","__unstableIframe","className","height","onMouseEnter","onMouseLeave","tabIndex","__unstableEditorStyles","__unstableMotion","div","background","cursor","undefined","initial","animate","concat","map","child","key"],"sources":["@wordpress/edit-site/src/components/global-styles/preview-iframe.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__unstableIframe as Iframe,\n\t__unstableEditorStyles as EditorStyles,\n\tprivateApis as blockEditorPrivateApis,\n} from '@wordpress/block-editor';\nimport { __unstableMotion as motion } from '@wordpress/components';\nimport {\n\tuseThrottle,\n\tuseReducedMotion,\n\tuseResizeObserver,\n} from '@wordpress/compose';\nimport { useLayoutEffect, useState, useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\nconst { useGlobalStyle, useGlobalStylesOutput } = unlock(\n\tblockEditorPrivateApis\n);\n\nconst normalizedWidth = 248;\nconst normalizedHeight = 152;\n\n// Throttle options for useThrottle. Must be defined outside of the component,\n// so that the object reference is the same on each render.\nconst THROTTLE_OPTIONS = {\n\tleading: true,\n\ttrailing: true,\n};\n\nexport default function PreviewIframe( {\n\tchildren,\n\tlabel,\n\tisFocused,\n\twithHoverView,\n} ) {\n\tconst [ backgroundColor = 'white' ] = useGlobalStyle( 'color.background' );\n\tconst [ gradientValue ] = useGlobalStyle( 'color.gradient' );\n\tconst [ styles ] = useGlobalStylesOutput();\n\tconst disableMotion = useReducedMotion();\n\tconst [ isHovered, setIsHovered ] = useState( false );\n\tconst [ containerResizeListener, { width } ] = useResizeObserver();\n\tconst [ throttledWidth, setThrottledWidthState ] = useState( width );\n\tconst [ ratioState, setRatioState ] = useState();\n\n\tconst setThrottledWidth = useThrottle(\n\t\tsetThrottledWidthState,\n\t\t250,\n\t\tTHROTTLE_OPTIONS\n\t);\n\n\t// Must use useLayoutEffect to avoid a flash of the iframe at the wrong\n\t// size before the width is set.\n\tuseLayoutEffect( () => {\n\t\tif ( width ) {\n\t\t\tsetThrottledWidth( width );\n\t\t}\n\t}, [ width, setThrottledWidth ] );\n\n\t// Must use useLayoutEffect to avoid a flash of the iframe at the wrong\n\t// size before the width is set.\n\tuseLayoutEffect( () => {\n\t\tconst newRatio = throttledWidth ? throttledWidth / normalizedWidth : 1;\n\t\tconst ratioDiff = newRatio - ( ratioState || 0 );\n\n\t\t// Only update the ratio state if the difference is big enough\n\t\t// or if the ratio state is not yet set. This is to avoid an\n\t\t// endless loop of updates at particular viewport heights when the\n\t\t// presence of a scrollbar causes the width to change slightly.\n\t\tconst isRatioDiffBigEnough = Math.abs( ratioDiff ) > 0.1;\n\n\t\tif ( isRatioDiffBigEnough || ! ratioState ) {\n\t\t\tsetRatioState( newRatio );\n\t\t}\n\t}, [ throttledWidth, ratioState ] );\n\n\t// Set a fallbackRatio to use before the throttled ratio has been set.\n\tconst fallbackRatio = width ? width / normalizedWidth : 1;\n\t/*\n\t * Use the throttled ratio if it has been calculated, otherwise\n\t * use the fallback ratio. The throttled ratio is used to avoid\n\t * an endless loop of updates at particular viewport heights.\n\t * See: https://github.com/WordPress/gutenberg/issues/55112\n\t */\n\tconst ratio = ratioState ? ratioState : fallbackRatio;\n\n\t/*\n\t * Reset leaked styles from WP common.css and remove main content layout padding and border.\n\t * Add pointer cursor to the body to indicate the iframe is interactive,\n\t * similar to Typography variation previews.\n\t */\n\tconst editorStyles = useMemo( () => {\n\t\tif ( styles ) {\n\t\t\treturn [\n\t\t\t\t...styles,\n\t\t\t\t{\n\t\t\t\t\tcss: 'html{overflow:hidden}body{min-width: 0;padding: 0;border: none;cursor: pointer;}',\n\t\t\t\t\tisGlobalStyles: true,\n\t\t\t\t},\n\t\t\t];\n\t\t}\n\n\t\treturn styles;\n\t}, [ styles ] );\n\tconst isReady = !! width;\n\n\treturn (\n\t\t<>\n\t\t\t<div style={ { position: 'relative' } }>\n\t\t\t\t{ containerResizeListener }\n\t\t\t</div>\n\t\t\t{ isReady && (\n\t\t\t\t<Iframe\n\t\t\t\t\tclassName=\"edit-site-global-styles-preview__iframe\"\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\theight: normalizedHeight * ratio,\n\t\t\t\t\t} }\n\t\t\t\t\tonMouseEnter={ () => setIsHovered( true ) }\n\t\t\t\t\tonMouseLeave={ () => setIsHovered( false ) }\n\t\t\t\t\ttabIndex={ -1 }\n\t\t\t\t>\n\t\t\t\t\t<EditorStyles styles={ editorStyles } />\n\t\t\t\t\t<motion.div\n\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\theight: normalizedHeight * ratio,\n\t\t\t\t\t\t\twidth: '100%',\n\t\t\t\t\t\t\tbackground: gradientValue ?? backgroundColor,\n\t\t\t\t\t\t\tcursor: withHoverView ? 'pointer' : undefined,\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tinitial=\"start\"\n\t\t\t\t\t\tanimate={\n\t\t\t\t\t\t\t( isHovered || isFocused ) &&\n\t\t\t\t\t\t\t! disableMotion &&\n\t\t\t\t\t\t\tlabel\n\t\t\t\t\t\t\t\t? 'hover'\n\t\t\t\t\t\t\t\t: 'start'\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t{ []\n\t\t\t\t\t\t\t.concat( children ) // This makes sure children is always an array.\n\t\t\t\t\t\t\t.map( ( child, key ) => child( { ratio, key } ) ) }\n\t\t\t\t\t</motion.div>\n\t\t\t\t</Iframe>\n\t\t\t) }\n\t\t</>\n\t);\n}\n"],"mappings":"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","ignoreList":[]}