@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
@@ -1,3 +1,4 @@
1
+ /* wp:polyfill */
1
2
  /**
2
3
  * External dependencies
3
4
  */
@@ -8,12 +9,14 @@ import clsx from 'clsx';
8
9
  */
9
10
  import { Disabled, Composite, privateApis as componentsPrivateApis } from '@wordpress/components';
10
11
  import { __, _x, sprintf } from '@wordpress/i18n';
11
- import { BlockList, privateApis as blockEditorPrivateApis, store as blockEditorStore, useSettings, __unstableEditorStyles as EditorStyles, __unstableIframe as Iframe, __experimentalUseMultipleOriginColorsAndGradients as useMultipleOriginColorsAndGradients } from '@wordpress/block-editor';
12
+ import { BlockList, privateApis as blockEditorPrivateApis, store as blockEditorStore, useSettings, BlockEditorProvider, __unstableEditorStyles as EditorStyles, __unstableIframe as Iframe, __experimentalUseMultipleOriginColorsAndGradients as useMultipleOriginColorsAndGradients } from '@wordpress/block-editor';
12
13
  import { privateApis as editorPrivateApis } from '@wordpress/editor';
13
- import { useSelect } from '@wordpress/data';
14
+ import { useSelect, dispatch } from '@wordpress/data';
14
15
  import { useResizeObserver } from '@wordpress/compose';
15
- import { useMemo, useState, memo, useContext, useRef, useLayoutEffect } from '@wordpress/element';
16
+ import { useMemo, useState, memo, useContext, useRef, useLayoutEffect, useEffect } from '@wordpress/element';
16
17
  import { ENTER, SPACE } from '@wordpress/keycodes';
18
+ import { uploadMedia } from '@wordpress/media-utils';
19
+ import { store as coreStore } from '@wordpress/core-data';
17
20
 
18
21
  /**
19
22
  * Internal dependencies
@@ -23,6 +26,10 @@ import EditorCanvasContainer from '../editor-canvas-container';
23
26
  import { STYLE_BOOK_IFRAME_STYLES } from './constants';
24
27
  import { getExamplesByCategory, getTopLevelStyleBookCategories } from './categories';
25
28
  import { getExamples } from './examples';
29
+ import { store as siteEditorStore } from '../../store';
30
+ import { useSection } from '../sidebar-global-styles-wrapper';
31
+ import { GlobalStylesRenderer } from '../global-styles-renderer';
32
+ import { STYLE_BOOK_COLOR_GROUPS, STYLE_BOOK_PREVIEW_CATEGORIES } from '../style-book/constants';
26
33
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
27
34
  const {
28
35
  ExperimentalBlockEditorProvider,
@@ -47,10 +54,10 @@ function isObjectEmpty(object) {
47
54
  * @param {HTMLIFrameElement} iframe The target iframe.
48
55
  */
49
56
  const scrollToSection = (anchorId, iframe) => {
50
- if (!iframe || !iframe?.contentDocument) {
57
+ if (!anchorId || !iframe || !iframe?.contentDocument) {
51
58
  return;
52
59
  }
53
- const element = iframe.contentDocument.getElementById(anchorId);
60
+ const element = anchorId === 'top' ? iframe.contentDocument.body : iframe.contentDocument.getElementById(anchorId);
54
61
  if (element) {
55
62
  element.scrollIntoView({
56
63
  behavior: 'smooth'
@@ -59,26 +66,19 @@ const scrollToSection = (anchorId, iframe) => {
59
66
  };
60
67
 
61
68
  /**
62
- * Parses a Block Editor navigation path to extract the block name and
63
- * build a style book navigation path. The object can be extended to include a category,
64
- * representing a style book tab/section.
69
+ * Parses a Block Editor navigation path to build a style book navigation path.
70
+ * The object can be extended to include a category, representing a style book tab/section.
65
71
  *
66
72
  * @param {string} path An internal Block Editor navigation path.
67
73
  * @return {null|{block: string}} An object containing the example to navigate to.
68
74
  */
69
75
  const getStyleBookNavigationFromPath = path => {
70
76
  if (path && typeof path === 'string') {
71
- if (path.startsWith('/typography')) {
77
+ if (path === '/' || path.startsWith('/typography') || path.startsWith('/colors') || path.startsWith('/blocks')) {
72
78
  return {
73
- block: 'typography'
79
+ top: true
74
80
  };
75
81
  }
76
- let block = path.includes('/blocks/') ? decodeURIComponent(path.split('/blocks/')[1]) : null;
77
- // Default to theme-colors if the path ends with /colors.
78
- block = path.endsWith('/colors') ? 'theme-colors' : block;
79
- return {
80
- block
81
- };
82
82
  }
83
83
  return null;
84
84
  };
@@ -129,6 +129,24 @@ function useMultiOriginPalettes() {
129
129
  }, [colors, gradients, customDuotones, themeDuotones, defaultDuotones, shouldDisplayDefaultDuotones]);
130
130
  return palettes;
131
131
  }
132
+
133
+ /**
134
+ * Get deduped examples for single page stylebook.
135
+ * @param {Array} examples Array of examples.
136
+ * @return {Array} Deduped examples.
137
+ */
138
+ export function getExamplesForSinglePageUse(examples) {
139
+ const examplesForSinglePageUse = [];
140
+ const overviewCategoryExamples = getExamplesByCategory({
141
+ slug: 'overview'
142
+ }, examples);
143
+ examplesForSinglePageUse.push(...overviewCategoryExamples.examples);
144
+ const otherExamples = examples.filter(example => {
145
+ return example.category !== 'overview' && !overviewCategoryExamples.examples.find(overviewExample => overviewExample.name === example.name);
146
+ });
147
+ examplesForSinglePageUse.push(...otherExamples);
148
+ return examplesForSinglePageUse;
149
+ }
132
150
  function StyleBook({
133
151
  enableResizing = true,
134
152
  isSelected,
@@ -146,15 +164,7 @@ function StyleBook({
146
164
  const colors = useMultiOriginPalettes();
147
165
  const examples = useMemo(() => getExamples(colors), [colors]);
148
166
  const tabs = useMemo(() => getTopLevelStyleBookCategories().filter(category => examples.some(example => example.category === category.slug)), [examples]);
149
- const examplesForSinglePageUse = [];
150
- const overviewCategoryExamples = getExamplesByCategory({
151
- slug: 'overview'
152
- }, examples);
153
- examplesForSinglePageUse.push(...overviewCategoryExamples.examples);
154
- const otherExamples = examples.filter(example => {
155
- return example.category !== 'overview' && !overviewCategoryExamples.examples.find(overviewExample => overviewExample.name === example.name);
156
- });
157
- examplesForSinglePageUse.push(...otherExamples);
167
+ const examplesForSinglePageUse = getExamplesForSinglePageUse(examples);
158
168
  const {
159
169
  base: baseConfig
160
170
  } = useContext(GlobalStylesContext);
@@ -197,23 +207,31 @@ function StyleBook({
197
207
  children: tab.title
198
208
  }, tab.slug))
199
209
  })
200
- }), tabs.map(tab => /*#__PURE__*/_jsx(Tabs.TabPanel, {
201
- tabId: tab.slug,
202
- focusable: false,
203
- className: "edit-site-style-book__tabpanel",
204
- children: /*#__PURE__*/_jsx(StyleBookBody, {
205
- category: tab.slug,
206
- examples: examples,
207
- isSelected: isSelected,
208
- onSelect: onSelect,
209
- settings: settings,
210
- sizes: sizes,
211
- title: tab.title,
212
- goTo: goTo
213
- })
214
- }, tab.slug))]
210
+ }), tabs.map(tab => {
211
+ const categoryDefinition = tab.slug ? getTopLevelStyleBookCategories().find(_category => _category.slug === tab.slug) : null;
212
+ const filteredExamples = categoryDefinition ? getExamplesByCategory(categoryDefinition, examples) : {
213
+ examples
214
+ };
215
+ return /*#__PURE__*/_jsx(Tabs.TabPanel, {
216
+ tabId: tab.slug,
217
+ focusable: false,
218
+ className: "edit-site-style-book__tabpanel",
219
+ children: /*#__PURE__*/_jsx(StyleBookBody, {
220
+ category: tab.slug,
221
+ examples: filteredExamples,
222
+ isSelected: isSelected,
223
+ onSelect: onSelect,
224
+ settings: settings,
225
+ sizes: sizes,
226
+ title: tab.title,
227
+ goTo: goTo
228
+ })
229
+ }, tab.slug);
230
+ })]
215
231
  }) : /*#__PURE__*/_jsx(StyleBookBody, {
216
- examples: examplesForSinglePageUse,
232
+ examples: {
233
+ examples: examplesForSinglePageUse
234
+ },
217
235
  isSelected: isSelected,
218
236
  onClick: onClick,
219
237
  onSelect: onSelect,
@@ -224,8 +242,117 @@ function StyleBook({
224
242
  })
225
243
  });
226
244
  }
227
- const StyleBookBody = ({
228
- category,
245
+
246
+ /**
247
+ * Style Book Preview component renders the stylebook without the Editor dependency.
248
+ *
249
+ * @param {Object} props Component props.
250
+ * @param {Object} props.userConfig User configuration.
251
+ * @param {boolean} props.isStatic Whether the stylebook is static or clickable.
252
+ * @return {Object} Style Book Preview component.
253
+ */
254
+ export const StyleBookPreview = ({
255
+ userConfig = {},
256
+ isStatic = false
257
+ }) => {
258
+ const siteEditorSettings = useSelect(select => select(siteEditorStore).getSettings(), []);
259
+ const canUserUploadMedia = useSelect(select => select(coreStore).canUser('create', {
260
+ kind: 'root',
261
+ name: 'media'
262
+ }), []);
263
+
264
+ // Update block editor settings because useMultipleOriginColorsAndGradients fetch colours from there.
265
+ useEffect(() => {
266
+ dispatch(blockEditorStore).updateSettings({
267
+ ...siteEditorSettings,
268
+ mediaUpload: canUserUploadMedia ? uploadMedia : undefined
269
+ });
270
+ }, [siteEditorSettings, canUserUploadMedia]);
271
+ const [section, onChangeSection] = useSection();
272
+ const isSelected = blockName => {
273
+ // Match '/blocks/core%2Fbutton' and
274
+ // '/blocks/core%2Fbutton/typography', but not
275
+ // '/blocks/core%2Fbuttons'.
276
+ return section === `/blocks/${encodeURIComponent(blockName)}` || section.startsWith(`/blocks/${encodeURIComponent(blockName)}/`);
277
+ };
278
+ const onSelect = blockName => {
279
+ if (STYLE_BOOK_COLOR_GROUPS.find(group => group.slug === blockName)) {
280
+ // Go to color palettes Global Styles.
281
+ onChangeSection('/colors/palette');
282
+ return;
283
+ }
284
+ if (blockName === 'typography') {
285
+ // Go to typography Global Styles.
286
+ onChangeSection('/typography');
287
+ return;
288
+ }
289
+
290
+ // Now go to the selected block.
291
+ onChangeSection(`/blocks/${encodeURIComponent(blockName)}`);
292
+ };
293
+ const [resizeObserver, sizes] = useResizeObserver();
294
+ const colors = useMultiOriginPalettes();
295
+ const examples = getExamples(colors);
296
+ const examplesForSinglePageUse = getExamplesForSinglePageUse(examples);
297
+ let previewCategory = null;
298
+ if (section.includes('/colors')) {
299
+ previewCategory = 'colors';
300
+ } else if (section.includes('/typography')) {
301
+ previewCategory = 'text';
302
+ } else if (section.includes('/blocks')) {
303
+ previewCategory = 'blocks';
304
+ const blockName = decodeURIComponent(section).split('/blocks/')[1];
305
+ if (blockName && examples.find(example => example.name === blockName)) {
306
+ previewCategory = blockName;
307
+ }
308
+ } else if (!isStatic) {
309
+ previewCategory = 'overview';
310
+ }
311
+ const categoryDefinition = STYLE_BOOK_PREVIEW_CATEGORIES.find(category => category.slug === previewCategory);
312
+
313
+ // If there's no category definition there may be a single block.
314
+ const filteredExamples = categoryDefinition ? getExamplesByCategory(categoryDefinition, examples) : {
315
+ examples: [examples.find(example => example.name === previewCategory)]
316
+ };
317
+
318
+ // If there's no preview category, show all examples.
319
+ const displayedExamples = previewCategory ? filteredExamples : {
320
+ examples: examplesForSinglePageUse
321
+ };
322
+ const {
323
+ base: baseConfig
324
+ } = useContext(GlobalStylesContext);
325
+ const goTo = getStyleBookNavigationFromPath(section);
326
+ const mergedConfig = useMemo(() => {
327
+ if (!isObjectEmpty(userConfig) && !isObjectEmpty(baseConfig)) {
328
+ return mergeBaseAndUserConfigs(baseConfig, userConfig);
329
+ }
330
+ return {};
331
+ }, [baseConfig, userConfig]);
332
+ const [globalStyles] = useGlobalStylesOutputWithConfig(mergedConfig);
333
+ const settings = useMemo(() => ({
334
+ ...siteEditorSettings,
335
+ styles: !isObjectEmpty(globalStyles) && !isObjectEmpty(userConfig) ? globalStyles : siteEditorSettings.styles,
336
+ isPreviewMode: true
337
+ }), [globalStyles, siteEditorSettings, userConfig]);
338
+ return /*#__PURE__*/_jsxs("div", {
339
+ className: "edit-site-style-book",
340
+ children: [resizeObserver, /*#__PURE__*/_jsxs(BlockEditorProvider, {
341
+ settings: settings,
342
+ children: [/*#__PURE__*/_jsx(GlobalStylesRenderer, {
343
+ disableRootPadding: true
344
+ }), /*#__PURE__*/_jsx(StyleBookBody, {
345
+ examples: displayedExamples,
346
+ settings: settings,
347
+ goTo: goTo,
348
+ sizes: sizes,
349
+ isSelected: !isStatic ? isSelected : null,
350
+ onSelect: !isStatic ? onSelect : null
351
+ })]
352
+ })]
353
+ });
354
+ };
355
+ export const StyleBookBody = ({
229
356
  examples,
230
357
  isSelected,
231
358
  onClick,
@@ -269,10 +396,12 @@ const StyleBookBody = ({
269
396
  };
270
397
  const handleLoad = () => setHasIframeLoaded(true);
271
398
  useLayoutEffect(() => {
272
- if (goTo?.block && hasIframeLoaded && iframeRef?.current) {
273
- scrollToSection(`example-${goTo?.block}`, iframeRef?.current);
399
+ if (hasIframeLoaded && iframeRef?.current) {
400
+ if (goTo?.top) {
401
+ scrollToSection('top', iframeRef?.current);
402
+ }
274
403
  }
275
- }, [iframeRef?.current, goTo?.block, scrollToSection, hasIframeLoaded]);
404
+ }, [iframeRef?.current, goTo, scrollToSection, hasIframeLoaded]);
276
405
  return /*#__PURE__*/_jsxs(Iframe, {
277
406
  onLoad: handleLoad,
278
407
  ref: iframeRef,
@@ -291,28 +420,22 @@ const StyleBookBody = ({
291
420
  className: clsx('edit-site-style-book__examples', {
292
421
  'is-wide': sizes.width > 600
293
422
  }),
294
- examples: examples,
295
- category: category,
423
+ filteredExamples: examples,
296
424
  label: title ? sprintf(
297
425
  // translators: %s: Category of blocks, e.g. Text.
298
426
  __('Examples of blocks in the %s category'), title) : __('Examples of blocks'),
299
427
  isSelected: isSelected,
300
428
  onSelect: onSelect
301
- }, category)]
429
+ }, title)]
302
430
  });
303
431
  };
304
432
  const Examples = memo(({
305
433
  className,
306
- examples,
307
- category,
434
+ filteredExamples,
308
435
  label,
309
436
  isSelected,
310
437
  onSelect
311
438
  }) => {
312
- const categoryDefinition = category ? getTopLevelStyleBookCategories().find(_category => _category.slug === category) : null;
313
- const filteredExamples = categoryDefinition ? getExamplesByCategory(categoryDefinition, examples) : {
314
- examples
315
- };
316
439
  return /*#__PURE__*/_jsxs(Composite, {
317
440
  orientation: "vertical",
318
441
  className: className,
@@ -324,7 +447,7 @@ const Examples = memo(({
324
447
  content: example.content,
325
448
  blocks: example.blocks,
326
449
  isSelected: isSelected?.(example.name),
327
- onClick: () => onSelect?.(example.name)
450
+ onClick: !!onSelect ? () => onSelect(example.name) : null
328
451
  }, example.name)), !!filteredExamples?.subcategories?.length && filteredExamples.subcategories.map(subcategory => /*#__PURE__*/_jsxs(Composite.Group, {
329
452
  className: "edit-site-style-book__subcategory",
330
453
  children: [/*#__PURE__*/_jsx(Composite.GroupLabel, {
@@ -351,9 +474,7 @@ const Subcategory = ({
351
474
  content: example.content,
352
475
  blocks: example.blocks,
353
476
  isSelected: isSelected?.(example.name),
354
- onClick: () => {
355
- onSelect?.(example.name);
356
- }
477
+ onClick: !!onSelect ? () => onSelect(example.name) : null
357
478
  }, example.name));
358
479
  };
359
480
  const disabledExamples = ['example-duotones'];
@@ -375,9 +496,9 @@ const Example = ({
375
496
 
376
497
  // Cache the list of blocks to avoid additional processing when the component is re-rendered.
377
498
  const renderedBlocks = useMemo(() => Array.isArray(blocks) ? blocks : [blocks], [blocks]);
378
- const disabledProps = disabledExamples.includes(id) ? {
499
+ const disabledProps = disabledExamples.includes(id) || !onClick ? {
379
500
  disabled: true,
380
- accessibleWhenDisabled: true
501
+ accessibleWhenDisabled: !!onClick
381
502
  } : {};
382
503
  return /*#__PURE__*/_jsx("div", {
383
504
  role: "row",
@@ -389,11 +510,11 @@ const Example = ({
389
510
  'is-disabled-example': !!disabledProps?.disabled
390
511
  }),
391
512
  id: id,
392
- "aria-label": sprintf(
513
+ "aria-label": !!onClick ? sprintf(
393
514
  // translators: %s: Title of a block, e.g. Heading.
394
- __('Open %s styles in Styles panel'), title),
515
+ __('Open %s styles in Styles panel'), title) : undefined,
395
516
  render: /*#__PURE__*/_jsx("div", {}),
396
- role: "button",
517
+ role: !!onClick ? 'button' : null,
397
518
  onClick: onClick,
398
519
  ...disabledProps,
399
520
  children: [/*#__PURE__*/_jsx("span", {
@@ -1 +1 @@
1
- {"version":3,"names":["clsx","Disabled","Composite","privateApis","componentsPrivateApis","__","_x","sprintf","BlockList","blockEditorPrivateApis","store","blockEditorStore","useSettings","__unstableEditorStyles","EditorStyles","__unstableIframe","Iframe","__experimentalUseMultipleOriginColorsAndGradients","useMultipleOriginColorsAndGradients","editorPrivateApis","useSelect","useResizeObserver","useMemo","useState","memo","useContext","useRef","useLayoutEffect","ENTER","SPACE","unlock","EditorCanvasContainer","STYLE_BOOK_IFRAME_STYLES","getExamplesByCategory","getTopLevelStyleBookCategories","getExamples","jsx","_jsx","jsxs","_jsxs","ExperimentalBlockEditorProvider","useGlobalStyle","GlobalStylesContext","useGlobalStylesOutputWithConfig","mergeBaseAndUserConfigs","Tabs","isObjectEmpty","object","Object","keys","length","scrollToSection","anchorId","iframe","contentDocument","element","getElementById","scrollIntoView","behavior","getStyleBookNavigationFromPath","path","startsWith","block","includes","decodeURIComponent","split","endsWith","useMultiOriginPalettes","colors","gradients","shouldDisplayDefaultDuotones","customDuotones","themeDuotones","defaultDuotones","palettes","result","duotones","push","name","slug","StyleBook","enableResizing","isSelected","onClick","onSelect","showCloseButton","onClose","showTabs","userConfig","resizeObserver","sizes","textColor","backgroundColor","examples","tabs","filter","category","some","example","examplesForSinglePageUse","overviewCategoryExamples","otherExamples","find","overviewExample","base","baseConfig","goTo","mergedConfig","originalSettings","select","getSettings","globalStyles","settings","styles","isPreviewMode","closeButtonLabel","children","className","width","style","color","background","TabList","map","tab","Tab","tabId","title","TabPanel","focusable","StyleBookBody","isFocused","setIsFocused","hasIframeLoaded","setHasIframeLoaded","iframeRef","buttonModeProps","role","onFocus","onBlur","onKeyDown","event","defaultPrevented","keyCode","preventDefault","readonly","handleLoad","current","onLoad","ref","tabIndex","Examples","label","categoryDefinition","_category","filteredExamples","orientation","Example","id","content","blocks","subcategories","subcategory","Group","GroupLabel","Subcategory","disabledExamples","focusMode","renderedBlocks","Array","isArray","disabledProps","disabled","accessibleWhenDisabled","Item","render","value","renderAppender"],"sources":["@wordpress/edit-site/src/components/style-book/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tDisabled,\n\tComposite,\n\tprivateApis as componentsPrivateApis,\n} from '@wordpress/components';\nimport { __, _x, sprintf } from '@wordpress/i18n';\nimport {\n\tBlockList,\n\tprivateApis as blockEditorPrivateApis,\n\tstore as blockEditorStore,\n\tuseSettings,\n\t__unstableEditorStyles as EditorStyles,\n\t__unstableIframe as Iframe,\n\t__experimentalUseMultipleOriginColorsAndGradients as useMultipleOriginColorsAndGradients,\n} from '@wordpress/block-editor';\nimport { privateApis as editorPrivateApis } from '@wordpress/editor';\nimport { useSelect } from '@wordpress/data';\nimport { useResizeObserver } from '@wordpress/compose';\nimport {\n\tuseMemo,\n\tuseState,\n\tmemo,\n\tuseContext,\n\tuseRef,\n\tuseLayoutEffect,\n} from '@wordpress/element';\nimport { ENTER, SPACE } from '@wordpress/keycodes';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport EditorCanvasContainer from '../editor-canvas-container';\nimport { STYLE_BOOK_IFRAME_STYLES } from './constants';\nimport {\n\tgetExamplesByCategory,\n\tgetTopLevelStyleBookCategories,\n} from './categories';\nimport { getExamples } from './examples';\n\nconst {\n\tExperimentalBlockEditorProvider,\n\tuseGlobalStyle,\n\tGlobalStylesContext,\n\tuseGlobalStylesOutputWithConfig,\n} = unlock( blockEditorPrivateApis );\nconst { mergeBaseAndUserConfigs } = unlock( editorPrivateApis );\n\nconst { Tabs } = unlock( componentsPrivateApis );\n\nfunction isObjectEmpty( object ) {\n\treturn ! object || Object.keys( object ).length === 0;\n}\n\n/**\n * Scrolls to a section within an iframe.\n *\n * @param {string} anchorId The id of the element to scroll to.\n * @param {HTMLIFrameElement} iframe The target iframe.\n */\nconst scrollToSection = ( anchorId, iframe ) => {\n\tif ( ! iframe || ! iframe?.contentDocument ) {\n\t\treturn;\n\t}\n\n\tconst element = iframe.contentDocument.getElementById( anchorId );\n\tif ( element ) {\n\t\telement.scrollIntoView( {\n\t\t\tbehavior: 'smooth',\n\t\t} );\n\t}\n};\n\n/**\n * Parses a Block Editor navigation path to extract the block name and\n * build a style book navigation path. The object can be extended to include a category,\n * representing a style book tab/section.\n *\n * @param {string} path An internal Block Editor navigation path.\n * @return {null|{block: string}} An object containing the example to navigate to.\n */\nconst getStyleBookNavigationFromPath = ( path ) => {\n\tif ( path && typeof path === 'string' ) {\n\t\tif ( path.startsWith( '/typography' ) ) {\n\t\t\treturn {\n\t\t\t\tblock: 'typography',\n\t\t\t};\n\t\t}\n\t\tlet block = path.includes( '/blocks/' )\n\t\t\t? decodeURIComponent( path.split( '/blocks/' )[ 1 ] )\n\t\t\t: null;\n\t\t// Default to theme-colors if the path ends with /colors.\n\t\tblock = path.endsWith( '/colors' ) ? 'theme-colors' : block;\n\n\t\treturn {\n\t\t\tblock,\n\t\t};\n\t}\n\treturn null;\n};\n\n/**\n * Retrieves colors, gradients, and duotone filters from Global Styles.\n * The inclusion of default (Core) palettes is controlled by the relevant\n * theme.json property e.g. defaultPalette, defaultGradients, defaultDuotone.\n *\n * @return {Object} Object containing properties for each type of palette.\n */\nfunction useMultiOriginPalettes() {\n\tconst { colors, gradients } = useMultipleOriginColorsAndGradients();\n\n\t// Add duotone filters to the palettes data.\n\tconst [\n\t\tshouldDisplayDefaultDuotones,\n\t\tcustomDuotones,\n\t\tthemeDuotones,\n\t\tdefaultDuotones,\n\t] = useSettings(\n\t\t'color.defaultDuotone',\n\t\t'color.duotone.custom',\n\t\t'color.duotone.theme',\n\t\t'color.duotone.default'\n\t);\n\n\tconst palettes = useMemo( () => {\n\t\tconst result = { colors, gradients, duotones: [] };\n\n\t\tif ( themeDuotones && themeDuotones.length ) {\n\t\t\tresult.duotones.push( {\n\t\t\t\tname: _x(\n\t\t\t\t\t'Theme',\n\t\t\t\t\t'Indicates these duotone filters come from the theme.'\n\t\t\t\t),\n\t\t\t\tslug: 'theme',\n\t\t\t\tduotones: themeDuotones,\n\t\t\t} );\n\t\t}\n\n\t\tif (\n\t\t\tshouldDisplayDefaultDuotones &&\n\t\t\tdefaultDuotones &&\n\t\t\tdefaultDuotones.length\n\t\t) {\n\t\t\tresult.duotones.push( {\n\t\t\t\tname: _x(\n\t\t\t\t\t'Default',\n\t\t\t\t\t'Indicates these duotone filters come from WordPress.'\n\t\t\t\t),\n\t\t\t\tslug: 'default',\n\t\t\t\tduotones: defaultDuotones,\n\t\t\t} );\n\t\t}\n\t\tif ( customDuotones && customDuotones.length ) {\n\t\t\tresult.duotones.push( {\n\t\t\t\tname: _x(\n\t\t\t\t\t'Custom',\n\t\t\t\t\t'Indicates these doutone filters are created by the user.'\n\t\t\t\t),\n\t\t\t\tslug: 'custom',\n\t\t\t\tduotones: customDuotones,\n\t\t\t} );\n\t\t}\n\n\t\treturn result;\n\t}, [\n\t\tcolors,\n\t\tgradients,\n\t\tcustomDuotones,\n\t\tthemeDuotones,\n\t\tdefaultDuotones,\n\t\tshouldDisplayDefaultDuotones,\n\t] );\n\n\treturn palettes;\n}\n\nfunction StyleBook( {\n\tenableResizing = true,\n\tisSelected,\n\tonClick,\n\tonSelect,\n\tshowCloseButton = true,\n\tonClose,\n\tshowTabs = true,\n\tuserConfig = {},\n\tpath = '',\n} ) {\n\tconst [ resizeObserver, sizes ] = useResizeObserver();\n\tconst [ textColor ] = useGlobalStyle( 'color.text' );\n\tconst [ backgroundColor ] = useGlobalStyle( 'color.background' );\n\tconst colors = useMultiOriginPalettes();\n\tconst examples = useMemo( () => getExamples( colors ), [ colors ] );\n\tconst tabs = useMemo(\n\t\t() =>\n\t\t\tgetTopLevelStyleBookCategories().filter( ( category ) =>\n\t\t\t\texamples.some(\n\t\t\t\t\t( example ) => example.category === category.slug\n\t\t\t\t)\n\t\t\t),\n\t\t[ examples ]\n\t);\n\n\tconst examplesForSinglePageUse = [];\n\tconst overviewCategoryExamples = getExamplesByCategory(\n\t\t{ slug: 'overview' },\n\t\texamples\n\t);\n\texamplesForSinglePageUse.push( ...overviewCategoryExamples.examples );\n\tconst otherExamples = examples.filter( ( example ) => {\n\t\treturn (\n\t\t\texample.category !== 'overview' &&\n\t\t\t! overviewCategoryExamples.examples.find(\n\t\t\t\t( overviewExample ) => overviewExample.name === example.name\n\t\t\t)\n\t\t);\n\t} );\n\texamplesForSinglePageUse.push( ...otherExamples );\n\n\tconst { base: baseConfig } = useContext( GlobalStylesContext );\n\tconst goTo = getStyleBookNavigationFromPath( path );\n\n\tconst mergedConfig = useMemo( () => {\n\t\tif ( ! isObjectEmpty( userConfig ) && ! isObjectEmpty( baseConfig ) ) {\n\t\t\treturn mergeBaseAndUserConfigs( baseConfig, userConfig );\n\t\t}\n\t\treturn {};\n\t}, [ baseConfig, userConfig ] );\n\n\t// Copied from packages/edit-site/src/components/revisions/index.js\n\t// could we create a shared hook?\n\tconst originalSettings = useSelect(\n\t\t( select ) => select( blockEditorStore ).getSettings(),\n\t\t[]\n\t);\n\tconst [ globalStyles ] = useGlobalStylesOutputWithConfig( mergedConfig );\n\n\tconst settings = useMemo(\n\t\t() => ( {\n\t\t\t...originalSettings,\n\t\t\tstyles:\n\t\t\t\t! isObjectEmpty( globalStyles ) && ! isObjectEmpty( userConfig )\n\t\t\t\t\t? globalStyles\n\t\t\t\t\t: originalSettings.styles,\n\t\t\tisPreviewMode: true,\n\t\t} ),\n\t\t[ globalStyles, originalSettings, userConfig ]\n\t);\n\n\treturn (\n\t\t<EditorCanvasContainer\n\t\t\tonClose={ onClose }\n\t\t\tenableResizing={ enableResizing }\n\t\t\tcloseButtonLabel={ showCloseButton ? __( 'Close' ) : null }\n\t\t>\n\t\t\t<div\n\t\t\t\tclassName={ clsx( 'edit-site-style-book', {\n\t\t\t\t\t'is-wide': sizes.width > 600,\n\t\t\t\t\t'is-button': !! onClick,\n\t\t\t\t} ) }\n\t\t\t\tstyle={ {\n\t\t\t\t\tcolor: textColor,\n\t\t\t\t\tbackground: backgroundColor,\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t{ resizeObserver }\n\t\t\t\t{ showTabs ? (\n\t\t\t\t\t<Tabs>\n\t\t\t\t\t\t<div className=\"edit-site-style-book__tablist-container\">\n\t\t\t\t\t\t\t<Tabs.TabList>\n\t\t\t\t\t\t\t\t{ tabs.map( ( tab ) => (\n\t\t\t\t\t\t\t\t\t<Tabs.Tab\n\t\t\t\t\t\t\t\t\t\ttabId={ tab.slug }\n\t\t\t\t\t\t\t\t\t\tkey={ tab.slug }\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{ tab.title }\n\t\t\t\t\t\t\t\t\t</Tabs.Tab>\n\t\t\t\t\t\t\t\t) ) }\n\t\t\t\t\t\t\t</Tabs.TabList>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{ tabs.map( ( tab ) => (\n\t\t\t\t\t\t\t<Tabs.TabPanel\n\t\t\t\t\t\t\t\tkey={ tab.slug }\n\t\t\t\t\t\t\t\ttabId={ tab.slug }\n\t\t\t\t\t\t\t\tfocusable={ false }\n\t\t\t\t\t\t\t\tclassName=\"edit-site-style-book__tabpanel\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<StyleBookBody\n\t\t\t\t\t\t\t\t\tcategory={ tab.slug }\n\t\t\t\t\t\t\t\t\texamples={ examples }\n\t\t\t\t\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\t\t\t\t\tonSelect={ onSelect }\n\t\t\t\t\t\t\t\t\tsettings={ settings }\n\t\t\t\t\t\t\t\t\tsizes={ sizes }\n\t\t\t\t\t\t\t\t\ttitle={ tab.title }\n\t\t\t\t\t\t\t\t\tgoTo={ goTo }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</Tabs.TabPanel>\n\t\t\t\t\t\t) ) }\n\t\t\t\t\t</Tabs>\n\t\t\t\t) : (\n\t\t\t\t\t<StyleBookBody\n\t\t\t\t\t\texamples={ examplesForSinglePageUse }\n\t\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\t\tonClick={ onClick }\n\t\t\t\t\t\tonSelect={ onSelect }\n\t\t\t\t\t\tsettings={ settings }\n\t\t\t\t\t\tsizes={ sizes }\n\t\t\t\t\t\tgoTo={ goTo }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t</EditorCanvasContainer>\n\t);\n}\n\nconst StyleBookBody = ( {\n\tcategory,\n\texamples,\n\tisSelected,\n\tonClick,\n\tonSelect,\n\tsettings,\n\tsizes,\n\ttitle,\n\tgoTo,\n} ) => {\n\tconst [ isFocused, setIsFocused ] = useState( false );\n\tconst [ hasIframeLoaded, setHasIframeLoaded ] = useState( false );\n\tconst iframeRef = useRef( null );\n\t// The presence of an `onClick` prop indicates that the Style Book is being used as a button.\n\t// In this case, add additional props to the iframe to make it behave like a button.\n\tconst buttonModeProps = {\n\t\trole: 'button',\n\t\tonFocus: () => setIsFocused( true ),\n\t\tonBlur: () => setIsFocused( false ),\n\t\tonKeyDown: ( event ) => {\n\t\t\tif ( event.defaultPrevented ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst { keyCode } = event;\n\t\t\tif ( onClick && ( keyCode === ENTER || keyCode === SPACE ) ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tonClick( event );\n\t\t\t}\n\t\t},\n\t\tonClick: ( event ) => {\n\t\t\tif ( event.defaultPrevented ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( onClick ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tonClick( event );\n\t\t\t}\n\t\t},\n\t\treadonly: true,\n\t};\n\n\tconst handleLoad = () => setHasIframeLoaded( true );\n\tuseLayoutEffect( () => {\n\t\tif ( goTo?.block && hasIframeLoaded && iframeRef?.current ) {\n\t\t\tscrollToSection( `example-${ goTo?.block }`, iframeRef?.current );\n\t\t}\n\t}, [ iframeRef?.current, goTo?.block, scrollToSection, hasIframeLoaded ] );\n\n\treturn (\n\t\t<Iframe\n\t\t\tonLoad={ handleLoad }\n\t\t\tref={ iframeRef }\n\t\t\tclassName={ clsx( 'edit-site-style-book__iframe', {\n\t\t\t\t'is-focused': isFocused && !! onClick,\n\t\t\t\t'is-button': !! onClick,\n\t\t\t} ) }\n\t\t\tname=\"style-book-canvas\"\n\t\t\ttabIndex={ 0 }\n\t\t\t{ ...( onClick ? buttonModeProps : {} ) }\n\t\t>\n\t\t\t<EditorStyles styles={ settings.styles } />\n\t\t\t<style>\n\t\t\t\t{ STYLE_BOOK_IFRAME_STYLES }\n\t\t\t\t{ !! onClick &&\n\t\t\t\t\t'body { cursor: pointer; } body * { pointer-events: none; }' }\n\t\t\t</style>\n\t\t\t<Examples\n\t\t\t\tclassName={ clsx( 'edit-site-style-book__examples', {\n\t\t\t\t\t'is-wide': sizes.width > 600,\n\t\t\t\t} ) }\n\t\t\t\texamples={ examples }\n\t\t\t\tcategory={ category }\n\t\t\t\tlabel={\n\t\t\t\t\ttitle\n\t\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t\t// translators: %s: Category of blocks, e.g. Text.\n\t\t\t\t\t\t\t\t__( 'Examples of blocks in the %s category' ),\n\t\t\t\t\t\t\t\ttitle\n\t\t\t\t\t\t )\n\t\t\t\t\t\t: __( 'Examples of blocks' )\n\t\t\t\t}\n\t\t\t\tisSelected={ isSelected }\n\t\t\t\tonSelect={ onSelect }\n\t\t\t\tkey={ category }\n\t\t\t/>\n\t\t</Iframe>\n\t);\n};\n\nconst Examples = memo(\n\t( { className, examples, category, label, isSelected, onSelect } ) => {\n\t\tconst categoryDefinition = category\n\t\t\t? getTopLevelStyleBookCategories().find(\n\t\t\t\t\t( _category ) => _category.slug === category\n\t\t\t )\n\t\t\t: null;\n\n\t\tconst filteredExamples = categoryDefinition\n\t\t\t? getExamplesByCategory( categoryDefinition, examples )\n\t\t\t: { examples };\n\n\t\treturn (\n\t\t\t<Composite\n\t\t\t\torientation=\"vertical\"\n\t\t\t\tclassName={ className }\n\t\t\t\taria-label={ label }\n\t\t\t\trole=\"grid\"\n\t\t\t>\n\t\t\t\t{ !! filteredExamples?.examples?.length &&\n\t\t\t\t\tfilteredExamples.examples.map( ( example ) => (\n\t\t\t\t\t\t<Example\n\t\t\t\t\t\t\tkey={ example.name }\n\t\t\t\t\t\t\tid={ `example-${ example.name }` }\n\t\t\t\t\t\t\ttitle={ example.title }\n\t\t\t\t\t\t\tcontent={ example.content }\n\t\t\t\t\t\t\tblocks={ example.blocks }\n\t\t\t\t\t\t\tisSelected={ isSelected?.( example.name ) }\n\t\t\t\t\t\t\tonClick={ () => onSelect?.( example.name ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) ) }\n\t\t\t\t{ !! filteredExamples?.subcategories?.length &&\n\t\t\t\t\tfilteredExamples.subcategories.map( ( subcategory ) => (\n\t\t\t\t\t\t<Composite.Group\n\t\t\t\t\t\t\tclassName=\"edit-site-style-book__subcategory\"\n\t\t\t\t\t\t\tkey={ `subcategory-${ subcategory.slug }` }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Composite.GroupLabel>\n\t\t\t\t\t\t\t\t<h2 className=\"edit-site-style-book__subcategory-title\">\n\t\t\t\t\t\t\t\t\t{ subcategory.title }\n\t\t\t\t\t\t\t\t</h2>\n\t\t\t\t\t\t\t</Composite.GroupLabel>\n\t\t\t\t\t\t\t<Subcategory\n\t\t\t\t\t\t\t\texamples={ subcategory.examples }\n\t\t\t\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\t\t\t\tonSelect={ onSelect }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</Composite.Group>\n\t\t\t\t\t) ) }\n\t\t\t</Composite>\n\t\t);\n\t}\n);\n\nconst Subcategory = ( { examples, isSelected, onSelect } ) => {\n\treturn (\n\t\t!! examples?.length &&\n\t\texamples.map( ( example ) => (\n\t\t\t<Example\n\t\t\t\tkey={ example.name }\n\t\t\t\tid={ `example-${ example.name }` }\n\t\t\t\ttitle={ example.title }\n\t\t\t\tcontent={ example.content }\n\t\t\t\tblocks={ example.blocks }\n\t\t\t\tisSelected={ isSelected?.( example.name ) }\n\t\t\t\tonClick={ () => {\n\t\t\t\t\tonSelect?.( example.name );\n\t\t\t\t} }\n\t\t\t/>\n\t\t) )\n\t);\n};\n\nconst disabledExamples = [ 'example-duotones' ];\n\nconst Example = ( { id, title, blocks, isSelected, onClick, content } ) => {\n\tconst originalSettings = useSelect(\n\t\t( select ) => select( blockEditorStore ).getSettings(),\n\t\t[]\n\t);\n\tconst settings = useMemo(\n\t\t() => ( {\n\t\t\t...originalSettings,\n\t\t\tfocusMode: false, // Disable \"Spotlight mode\".\n\t\t\tisPreviewMode: true,\n\t\t} ),\n\t\t[ originalSettings ]\n\t);\n\n\t// Cache the list of blocks to avoid additional processing when the component is re-rendered.\n\tconst renderedBlocks = useMemo(\n\t\t() => ( Array.isArray( blocks ) ? blocks : [ blocks ] ),\n\t\t[ blocks ]\n\t);\n\n\tconst disabledProps = disabledExamples.includes( id )\n\t\t? {\n\t\t\t\tdisabled: true,\n\t\t\t\taccessibleWhenDisabled: true,\n\t\t }\n\t\t: {};\n\n\treturn (\n\t\t<div role=\"row\">\n\t\t\t<div role=\"gridcell\">\n\t\t\t\t<Composite.Item\n\t\t\t\t\tclassName={ clsx( 'edit-site-style-book__example', {\n\t\t\t\t\t\t'is-selected': isSelected,\n\t\t\t\t\t\t'is-disabled-example': !! disabledProps?.disabled,\n\t\t\t\t\t} ) }\n\t\t\t\t\tid={ id }\n\t\t\t\t\taria-label={ sprintf(\n\t\t\t\t\t\t// translators: %s: Title of a block, e.g. Heading.\n\t\t\t\t\t\t__( 'Open %s styles in Styles panel' ),\n\t\t\t\t\t\ttitle\n\t\t\t\t\t) }\n\t\t\t\t\trender={ <div /> }\n\t\t\t\t\trole=\"button\"\n\t\t\t\t\tonClick={ onClick }\n\t\t\t\t\t{ ...disabledProps }\n\t\t\t\t>\n\t\t\t\t\t<span className=\"edit-site-style-book__example-title\">\n\t\t\t\t\t\t{ title }\n\t\t\t\t\t</span>\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName=\"edit-site-style-book__example-preview\"\n\t\t\t\t\t\taria-hidden\n\t\t\t\t\t>\n\t\t\t\t\t\t<Disabled className=\"edit-site-style-book__example-preview__content\">\n\t\t\t\t\t\t\t{ content ? (\n\t\t\t\t\t\t\t\tcontent\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<ExperimentalBlockEditorProvider\n\t\t\t\t\t\t\t\t\tvalue={ renderedBlocks }\n\t\t\t\t\t\t\t\t\tsettings={ settings }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<EditorStyles />\n\t\t\t\t\t\t\t\t\t<BlockList renderAppender={ false } />\n\t\t\t\t\t\t\t\t</ExperimentalBlockEditorProvider>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</Disabled>\n\t\t\t\t\t</div>\n\t\t\t\t</Composite.Item>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nexport default StyleBook;\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SACCC,QAAQ,EACRC,SAAS,EACTC,WAAW,IAAIC,qBAAqB,QAC9B,uBAAuB;AAC9B,SAASC,EAAE,EAAEC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AACjD,SACCC,SAAS,EACTL,WAAW,IAAIM,sBAAsB,EACrCC,KAAK,IAAIC,gBAAgB,EACzBC,WAAW,EACXC,sBAAsB,IAAIC,YAAY,EACtCC,gBAAgB,IAAIC,MAAM,EAC1BC,iDAAiD,IAAIC,mCAAmC,QAClF,yBAAyB;AAChC,SAASf,WAAW,IAAIgB,iBAAiB,QAAQ,mBAAmB;AACpE,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,iBAAiB,QAAQ,oBAAoB;AACtD,SACCC,OAAO,EACPC,QAAQ,EACRC,IAAI,EACJC,UAAU,EACVC,MAAM,EACNC,eAAe,QACT,oBAAoB;AAC3B,SAASC,KAAK,EAAEC,KAAK,QAAQ,qBAAqB;;AAElD;AACA;AACA;AACA,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,OAAOC,qBAAqB,MAAM,4BAA4B;AAC9D,SAASC,wBAAwB,QAAQ,aAAa;AACtD,SACCC,qBAAqB,EACrBC,8BAA8B,QACxB,cAAc;AACrB,SAASC,WAAW,QAAQ,YAAY;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAEzC,MAAM;EACLC,+BAA+B;EAC/BC,cAAc;EACdC,mBAAmB;EACnBC;AACD,CAAC,GAAGb,MAAM,CAAErB,sBAAuB,CAAC;A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O,EAAGA,OAAS;QAAA,GACdwF,aAAa;QAAAvD,QAAA,gBAElB/E,IAAA;UAAMgF,SAAS,EAAC,qCAAqC;UAAAD,QAAA,EAClDW;QAAK,CACF,CAAC,eACP1F,IAAA;UACCgF,SAAS,EAAC,uCAAuC;UACjD,mBAAW;UAAAD,QAAA,eAEX/E,IAAA,CAACpC,QAAQ;YAACoH,SAAS,EAAC,gDAAgD;YAAAD,QAAA,EACjE2C,OAAO,GACRA,OAAO,gBAEPxH,KAAA,CAACC,+BAA+B;cAC/BwI,KAAK,EAAGR,cAAgB;cACxBxD,QAAQ,EAAGA,QAAU;cAAAI,QAAA,gBAErB/E,IAAA,CAACvB,YAAY,IAAE,CAAC,eAChBuB,IAAA,CAAC7B,SAAS;gBAACyK,cAAc,EAAG;cAAO,CAAE,CAAC;YAAA,CACN;UACjC,CACQ;QAAC,CACP,CAAC;MAAA,CACS;IAAC,CACb;EAAC,CACF,CAAC;AAER,CAAC;AAED,eAAejG,SAAS","ignoreList":[]}
1
+ {"version":3,"names":["clsx","Disabled","Composite","privateApis","componentsPrivateApis","__","_x","sprintf","BlockList","blockEditorPrivateApis","store","blockEditorStore","useSettings","BlockEditorProvider","__unstableEditorStyles","EditorStyles","__unstableIframe","Iframe","__experimentalUseMultipleOriginColorsAndGradients","useMultipleOriginColorsAndGradients","editorPrivateApis","useSelect","dispatch","useResizeObserver","useMemo","useState","memo","useContext","useRef","useLayoutEffect","useEffect","ENTER","SPACE","uploadMedia","coreStore","unlock","EditorCanvasContainer","STYLE_BOOK_IFRAME_STYLES","getExamplesByCategory","getTopLevelStyleBookCategories","getExamples","siteEditorStore","useSection","GlobalStylesRenderer","STYLE_BOOK_COLOR_GROUPS","STYLE_BOOK_PREVIEW_CATEGORIES","jsx","_jsx","jsxs","_jsxs","ExperimentalBlockEditorProvider","useGlobalStyle","GlobalStylesContext","useGlobalStylesOutputWithConfig","mergeBaseAndUserConfigs","Tabs","isObjectEmpty","object","Object","keys","length","scrollToSection","anchorId","iframe","contentDocument","element","body","getElementById","scrollIntoView","behavior","getStyleBookNavigationFromPath","path","startsWith","top","useMultiOriginPalettes","colors","gradients","shouldDisplayDefaultDuotones","customDuotones","themeDuotones","defaultDuotones","palettes","result","duotones","push","name","slug","getExamplesForSinglePageUse","examples","examplesForSinglePageUse","overviewCategoryExamples","otherExamples","filter","example","category","find","overviewExample","StyleBook","enableResizing","isSelected","onClick","onSelect","showCloseButton","onClose","showTabs","userConfig","resizeObserver","sizes","textColor","backgroundColor","tabs","some","base","baseConfig","goTo","mergedConfig","originalSettings","select","getSettings","globalStyles","settings","styles","isPreviewMode","closeButtonLabel","children","className","width","style","color","background","TabList","map","tab","Tab","tabId","title","categoryDefinition","_category","filteredExamples","TabPanel","focusable","StyleBookBody","StyleBookPreview","isStatic","siteEditorSettings","canUserUploadMedia","canUser","kind","updateSettings","mediaUpload","undefined","section","onChangeSection","blockName","encodeURIComponent","group","previewCategory","includes","decodeURIComponent","split","displayedExamples","disableRootPadding","isFocused","setIsFocused","hasIframeLoaded","setHasIframeLoaded","iframeRef","buttonModeProps","role","onFocus","onBlur","onKeyDown","event","defaultPrevented","keyCode","preventDefault","readonly","handleLoad","current","onLoad","ref","tabIndex","Examples","label","orientation","Example","id","content","blocks","subcategories","subcategory","Group","GroupLabel","Subcategory","disabledExamples","focusMode","renderedBlocks","Array","isArray","disabledProps","disabled","accessibleWhenDisabled","Item","render","value","renderAppender"],"sources":["@wordpress/edit-site/src/components/style-book/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tDisabled,\n\tComposite,\n\tprivateApis as componentsPrivateApis,\n} from '@wordpress/components';\nimport { __, _x, sprintf } from '@wordpress/i18n';\nimport {\n\tBlockList,\n\tprivateApis as blockEditorPrivateApis,\n\tstore as blockEditorStore,\n\tuseSettings,\n\tBlockEditorProvider,\n\t__unstableEditorStyles as EditorStyles,\n\t__unstableIframe as Iframe,\n\t__experimentalUseMultipleOriginColorsAndGradients as useMultipleOriginColorsAndGradients,\n} from '@wordpress/block-editor';\nimport { privateApis as editorPrivateApis } from '@wordpress/editor';\nimport { useSelect, dispatch } from '@wordpress/data';\nimport { useResizeObserver } from '@wordpress/compose';\nimport {\n\tuseMemo,\n\tuseState,\n\tmemo,\n\tuseContext,\n\tuseRef,\n\tuseLayoutEffect,\n\tuseEffect,\n} from '@wordpress/element';\nimport { ENTER, SPACE } from '@wordpress/keycodes';\nimport { uploadMedia } from '@wordpress/media-utils';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport EditorCanvasContainer from '../editor-canvas-container';\nimport { STYLE_BOOK_IFRAME_STYLES } from './constants';\nimport {\n\tgetExamplesByCategory,\n\tgetTopLevelStyleBookCategories,\n} from './categories';\nimport { getExamples } from './examples';\nimport { store as siteEditorStore } from '../../store';\nimport { useSection } from '../sidebar-global-styles-wrapper';\nimport { GlobalStylesRenderer } from '../global-styles-renderer';\nimport {\n\tSTYLE_BOOK_COLOR_GROUPS,\n\tSTYLE_BOOK_PREVIEW_CATEGORIES,\n} from '../style-book/constants';\n\nconst {\n\tExperimentalBlockEditorProvider,\n\tuseGlobalStyle,\n\tGlobalStylesContext,\n\tuseGlobalStylesOutputWithConfig,\n} = unlock( blockEditorPrivateApis );\nconst { mergeBaseAndUserConfigs } = unlock( editorPrivateApis );\n\nconst { Tabs } = unlock( componentsPrivateApis );\n\nfunction isObjectEmpty( object ) {\n\treturn ! object || Object.keys( object ).length === 0;\n}\n\n/**\n * Scrolls to a section within an iframe.\n *\n * @param {string} anchorId The id of the element to scroll to.\n * @param {HTMLIFrameElement} iframe The target iframe.\n */\nconst scrollToSection = ( anchorId, iframe ) => {\n\tif ( ! anchorId || ! iframe || ! iframe?.contentDocument ) {\n\t\treturn;\n\t}\n\n\tconst element =\n\t\tanchorId === 'top'\n\t\t\t? iframe.contentDocument.body\n\t\t\t: iframe.contentDocument.getElementById( anchorId );\n\tif ( element ) {\n\t\telement.scrollIntoView( {\n\t\t\tbehavior: 'smooth',\n\t\t} );\n\t}\n};\n\n/**\n * Parses a Block Editor navigation path to build a style book navigation path.\n * The object can be extended to include a category, representing a style book tab/section.\n *\n * @param {string} path An internal Block Editor navigation path.\n * @return {null|{block: string}} An object containing the example to navigate to.\n */\nconst getStyleBookNavigationFromPath = ( path ) => {\n\tif ( path && typeof path === 'string' ) {\n\t\tif (\n\t\t\tpath === '/' ||\n\t\t\tpath.startsWith( '/typography' ) ||\n\t\t\tpath.startsWith( '/colors' ) ||\n\t\t\tpath.startsWith( '/blocks' )\n\t\t) {\n\t\t\treturn {\n\t\t\t\ttop: true,\n\t\t\t};\n\t\t}\n\t}\n\treturn null;\n};\n\n/**\n * Retrieves colors, gradients, and duotone filters from Global Styles.\n * The inclusion of default (Core) palettes is controlled by the relevant\n * theme.json property e.g. defaultPalette, defaultGradients, defaultDuotone.\n *\n * @return {Object} Object containing properties for each type of palette.\n */\nfunction useMultiOriginPalettes() {\n\tconst { colors, gradients } = useMultipleOriginColorsAndGradients();\n\n\t// Add duotone filters to the palettes data.\n\tconst [\n\t\tshouldDisplayDefaultDuotones,\n\t\tcustomDuotones,\n\t\tthemeDuotones,\n\t\tdefaultDuotones,\n\t] = useSettings(\n\t\t'color.defaultDuotone',\n\t\t'color.duotone.custom',\n\t\t'color.duotone.theme',\n\t\t'color.duotone.default'\n\t);\n\n\tconst palettes = useMemo( () => {\n\t\tconst result = { colors, gradients, duotones: [] };\n\n\t\tif ( themeDuotones && themeDuotones.length ) {\n\t\t\tresult.duotones.push( {\n\t\t\t\tname: _x(\n\t\t\t\t\t'Theme',\n\t\t\t\t\t'Indicates these duotone filters come from the theme.'\n\t\t\t\t),\n\t\t\t\tslug: 'theme',\n\t\t\t\tduotones: themeDuotones,\n\t\t\t} );\n\t\t}\n\n\t\tif (\n\t\t\tshouldDisplayDefaultDuotones &&\n\t\t\tdefaultDuotones &&\n\t\t\tdefaultDuotones.length\n\t\t) {\n\t\t\tresult.duotones.push( {\n\t\t\t\tname: _x(\n\t\t\t\t\t'Default',\n\t\t\t\t\t'Indicates these duotone filters come from WordPress.'\n\t\t\t\t),\n\t\t\t\tslug: 'default',\n\t\t\t\tduotones: defaultDuotones,\n\t\t\t} );\n\t\t}\n\t\tif ( customDuotones && customDuotones.length ) {\n\t\t\tresult.duotones.push( {\n\t\t\t\tname: _x(\n\t\t\t\t\t'Custom',\n\t\t\t\t\t'Indicates these doutone filters are created by the user.'\n\t\t\t\t),\n\t\t\t\tslug: 'custom',\n\t\t\t\tduotones: customDuotones,\n\t\t\t} );\n\t\t}\n\n\t\treturn result;\n\t}, [\n\t\tcolors,\n\t\tgradients,\n\t\tcustomDuotones,\n\t\tthemeDuotones,\n\t\tdefaultDuotones,\n\t\tshouldDisplayDefaultDuotones,\n\t] );\n\n\treturn palettes;\n}\n\n/**\n * Get deduped examples for single page stylebook.\n * @param {Array} examples Array of examples.\n * @return {Array} Deduped examples.\n */\nexport function getExamplesForSinglePageUse( examples ) {\n\tconst examplesForSinglePageUse = [];\n\tconst overviewCategoryExamples = getExamplesByCategory(\n\t\t{ slug: 'overview' },\n\t\texamples\n\t);\n\texamplesForSinglePageUse.push( ...overviewCategoryExamples.examples );\n\tconst otherExamples = examples.filter( ( example ) => {\n\t\treturn (\n\t\t\texample.category !== 'overview' &&\n\t\t\t! overviewCategoryExamples.examples.find(\n\t\t\t\t( overviewExample ) => overviewExample.name === example.name\n\t\t\t)\n\t\t);\n\t} );\n\texamplesForSinglePageUse.push( ...otherExamples );\n\n\treturn examplesForSinglePageUse;\n}\n\nfunction StyleBook( {\n\tenableResizing = true,\n\tisSelected,\n\tonClick,\n\tonSelect,\n\tshowCloseButton = true,\n\tonClose,\n\tshowTabs = true,\n\tuserConfig = {},\n\tpath = '',\n} ) {\n\tconst [ resizeObserver, sizes ] = useResizeObserver();\n\tconst [ textColor ] = useGlobalStyle( 'color.text' );\n\tconst [ backgroundColor ] = useGlobalStyle( 'color.background' );\n\tconst colors = useMultiOriginPalettes();\n\tconst examples = useMemo( () => getExamples( colors ), [ colors ] );\n\tconst tabs = useMemo(\n\t\t() =>\n\t\t\tgetTopLevelStyleBookCategories().filter( ( category ) =>\n\t\t\t\texamples.some(\n\t\t\t\t\t( example ) => example.category === category.slug\n\t\t\t\t)\n\t\t\t),\n\t\t[ examples ]\n\t);\n\n\tconst examplesForSinglePageUse = getExamplesForSinglePageUse( examples );\n\n\tconst { base: baseConfig } = useContext( GlobalStylesContext );\n\tconst goTo = getStyleBookNavigationFromPath( path );\n\n\tconst mergedConfig = useMemo( () => {\n\t\tif ( ! isObjectEmpty( userConfig ) && ! isObjectEmpty( baseConfig ) ) {\n\t\t\treturn mergeBaseAndUserConfigs( baseConfig, userConfig );\n\t\t}\n\t\treturn {};\n\t}, [ baseConfig, userConfig ] );\n\n\t// Copied from packages/edit-site/src/components/revisions/index.js\n\t// could we create a shared hook?\n\tconst originalSettings = useSelect(\n\t\t( select ) => select( blockEditorStore ).getSettings(),\n\t\t[]\n\t);\n\tconst [ globalStyles ] = useGlobalStylesOutputWithConfig( mergedConfig );\n\n\tconst settings = useMemo(\n\t\t() => ( {\n\t\t\t...originalSettings,\n\t\t\tstyles:\n\t\t\t\t! isObjectEmpty( globalStyles ) && ! isObjectEmpty( userConfig )\n\t\t\t\t\t? globalStyles\n\t\t\t\t\t: originalSettings.styles,\n\t\t\tisPreviewMode: true,\n\t\t} ),\n\t\t[ globalStyles, originalSettings, userConfig ]\n\t);\n\n\treturn (\n\t\t<EditorCanvasContainer\n\t\t\tonClose={ onClose }\n\t\t\tenableResizing={ enableResizing }\n\t\t\tcloseButtonLabel={ showCloseButton ? __( 'Close' ) : null }\n\t\t>\n\t\t\t<div\n\t\t\t\tclassName={ clsx( 'edit-site-style-book', {\n\t\t\t\t\t'is-wide': sizes.width > 600,\n\t\t\t\t\t'is-button': !! onClick,\n\t\t\t\t} ) }\n\t\t\t\tstyle={ {\n\t\t\t\t\tcolor: textColor,\n\t\t\t\t\tbackground: backgroundColor,\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t{ resizeObserver }\n\t\t\t\t{ showTabs ? (\n\t\t\t\t\t<Tabs>\n\t\t\t\t\t\t<div className=\"edit-site-style-book__tablist-container\">\n\t\t\t\t\t\t\t<Tabs.TabList>\n\t\t\t\t\t\t\t\t{ tabs.map( ( tab ) => (\n\t\t\t\t\t\t\t\t\t<Tabs.Tab\n\t\t\t\t\t\t\t\t\t\ttabId={ tab.slug }\n\t\t\t\t\t\t\t\t\t\tkey={ tab.slug }\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{ tab.title }\n\t\t\t\t\t\t\t\t\t</Tabs.Tab>\n\t\t\t\t\t\t\t\t) ) }\n\t\t\t\t\t\t\t</Tabs.TabList>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{ tabs.map( ( tab ) => {\n\t\t\t\t\t\t\tconst categoryDefinition = tab.slug\n\t\t\t\t\t\t\t\t? getTopLevelStyleBookCategories().find(\n\t\t\t\t\t\t\t\t\t\t( _category ) =>\n\t\t\t\t\t\t\t\t\t\t\t_category.slug === tab.slug\n\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t: null;\n\t\t\t\t\t\t\tconst filteredExamples = categoryDefinition\n\t\t\t\t\t\t\t\t? getExamplesByCategory(\n\t\t\t\t\t\t\t\t\t\tcategoryDefinition,\n\t\t\t\t\t\t\t\t\t\texamples\n\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t: { examples };\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<Tabs.TabPanel\n\t\t\t\t\t\t\t\t\tkey={ tab.slug }\n\t\t\t\t\t\t\t\t\ttabId={ tab.slug }\n\t\t\t\t\t\t\t\t\tfocusable={ false }\n\t\t\t\t\t\t\t\t\tclassName=\"edit-site-style-book__tabpanel\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<StyleBookBody\n\t\t\t\t\t\t\t\t\t\tcategory={ tab.slug }\n\t\t\t\t\t\t\t\t\t\texamples={ filteredExamples }\n\t\t\t\t\t\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\t\t\t\t\t\tonSelect={ onSelect }\n\t\t\t\t\t\t\t\t\t\tsettings={ settings }\n\t\t\t\t\t\t\t\t\t\tsizes={ sizes }\n\t\t\t\t\t\t\t\t\t\ttitle={ tab.title }\n\t\t\t\t\t\t\t\t\t\tgoTo={ goTo }\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</Tabs.TabPanel>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} ) }\n\t\t\t\t\t</Tabs>\n\t\t\t\t) : (\n\t\t\t\t\t<StyleBookBody\n\t\t\t\t\t\texamples={ { examples: examplesForSinglePageUse } }\n\t\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\t\tonClick={ onClick }\n\t\t\t\t\t\tonSelect={ onSelect }\n\t\t\t\t\t\tsettings={ settings }\n\t\t\t\t\t\tsizes={ sizes }\n\t\t\t\t\t\tgoTo={ goTo }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t</EditorCanvasContainer>\n\t);\n}\n\n/**\n * Style Book Preview component renders the stylebook without the Editor dependency.\n *\n * @param {Object} props Component props.\n * @param {Object} props.userConfig User configuration.\n * @param {boolean} props.isStatic Whether the stylebook is static or clickable.\n * @return {Object} Style Book Preview component.\n */\nexport const StyleBookPreview = ( { userConfig = {}, isStatic = false } ) => {\n\tconst siteEditorSettings = useSelect(\n\t\t( select ) => select( siteEditorStore ).getSettings(),\n\t\t[]\n\t);\n\n\tconst canUserUploadMedia = useSelect(\n\t\t( select ) =>\n\t\t\tselect( coreStore ).canUser( 'create', {\n\t\t\t\tkind: 'root',\n\t\t\t\tname: 'media',\n\t\t\t} ),\n\t\t[]\n\t);\n\n\t// Update block editor settings because useMultipleOriginColorsAndGradients fetch colours from there.\n\tuseEffect( () => {\n\t\tdispatch( blockEditorStore ).updateSettings( {\n\t\t\t...siteEditorSettings,\n\t\t\tmediaUpload: canUserUploadMedia ? uploadMedia : undefined,\n\t\t} );\n\t}, [ siteEditorSettings, canUserUploadMedia ] );\n\n\tconst [ section, onChangeSection ] = useSection();\n\n\tconst isSelected = ( blockName ) => {\n\t\t// Match '/blocks/core%2Fbutton' and\n\t\t// '/blocks/core%2Fbutton/typography', but not\n\t\t// '/blocks/core%2Fbuttons'.\n\t\treturn (\n\t\t\tsection === `/blocks/${ encodeURIComponent( blockName ) }` ||\n\t\t\tsection.startsWith(\n\t\t\t\t`/blocks/${ encodeURIComponent( blockName ) }/`\n\t\t\t)\n\t\t);\n\t};\n\n\tconst onSelect = ( blockName ) => {\n\t\tif (\n\t\t\tSTYLE_BOOK_COLOR_GROUPS.find(\n\t\t\t\t( group ) => group.slug === blockName\n\t\t\t)\n\t\t) {\n\t\t\t// Go to color palettes Global Styles.\n\t\t\tonChangeSection( '/colors/palette' );\n\t\t\treturn;\n\t\t}\n\t\tif ( blockName === 'typography' ) {\n\t\t\t// Go to typography Global Styles.\n\t\t\tonChangeSection( '/typography' );\n\t\t\treturn;\n\t\t}\n\n\t\t// Now go to the selected block.\n\t\tonChangeSection( `/blocks/${ encodeURIComponent( blockName ) }` );\n\t};\n\n\tconst [ resizeObserver, sizes ] = useResizeObserver();\n\tconst colors = useMultiOriginPalettes();\n\tconst examples = getExamples( colors );\n\tconst examplesForSinglePageUse = getExamplesForSinglePageUse( examples );\n\n\tlet previewCategory = null;\n\tif ( section.includes( '/colors' ) ) {\n\t\tpreviewCategory = 'colors';\n\t} else if ( section.includes( '/typography' ) ) {\n\t\tpreviewCategory = 'text';\n\t} else if ( section.includes( '/blocks' ) ) {\n\t\tpreviewCategory = 'blocks';\n\t\tconst blockName =\n\t\t\tdecodeURIComponent( section ).split( '/blocks/' )[ 1 ];\n\t\tif (\n\t\t\tblockName &&\n\t\t\texamples.find( ( example ) => example.name === blockName )\n\t\t) {\n\t\t\tpreviewCategory = blockName;\n\t\t}\n\t} else if ( ! isStatic ) {\n\t\tpreviewCategory = 'overview';\n\t}\n\tconst categoryDefinition = STYLE_BOOK_PREVIEW_CATEGORIES.find(\n\t\t( category ) => category.slug === previewCategory\n\t);\n\n\t// If there's no category definition there may be a single block.\n\tconst filteredExamples = categoryDefinition\n\t\t? getExamplesByCategory( categoryDefinition, examples )\n\t\t: {\n\t\t\t\texamples: [\n\t\t\t\t\texamples.find(\n\t\t\t\t\t\t( example ) => example.name === previewCategory\n\t\t\t\t\t),\n\t\t\t\t],\n\t\t };\n\n\t// If there's no preview category, show all examples.\n\tconst displayedExamples = previewCategory\n\t\t? filteredExamples\n\t\t: { examples: examplesForSinglePageUse };\n\n\tconst { base: baseConfig } = useContext( GlobalStylesContext );\n\tconst goTo = getStyleBookNavigationFromPath( section );\n\n\tconst mergedConfig = useMemo( () => {\n\t\tif ( ! isObjectEmpty( userConfig ) && ! isObjectEmpty( baseConfig ) ) {\n\t\t\treturn mergeBaseAndUserConfigs( baseConfig, userConfig );\n\t\t}\n\t\treturn {};\n\t}, [ baseConfig, userConfig ] );\n\n\tconst [ globalStyles ] = useGlobalStylesOutputWithConfig( mergedConfig );\n\n\tconst settings = useMemo(\n\t\t() => ( {\n\t\t\t...siteEditorSettings,\n\t\t\tstyles:\n\t\t\t\t! isObjectEmpty( globalStyles ) && ! isObjectEmpty( userConfig )\n\t\t\t\t\t? globalStyles\n\t\t\t\t\t: siteEditorSettings.styles,\n\t\t\tisPreviewMode: true,\n\t\t} ),\n\t\t[ globalStyles, siteEditorSettings, userConfig ]\n\t);\n\n\treturn (\n\t\t<div className=\"edit-site-style-book\">\n\t\t\t{ resizeObserver }\n\t\t\t<BlockEditorProvider settings={ settings }>\n\t\t\t\t<GlobalStylesRenderer disableRootPadding />\n\t\t\t\t<StyleBookBody\n\t\t\t\t\texamples={ displayedExamples }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t\tgoTo={ goTo }\n\t\t\t\t\tsizes={ sizes }\n\t\t\t\t\tisSelected={ ! isStatic ? isSelected : null }\n\t\t\t\t\tonSelect={ ! isStatic ? onSelect : null }\n\t\t\t\t/>\n\t\t\t</BlockEditorProvider>\n\t\t</div>\n\t);\n};\n\nexport const StyleBookBody = ( {\n\texamples,\n\tisSelected,\n\tonClick,\n\tonSelect,\n\tsettings,\n\tsizes,\n\ttitle,\n\tgoTo,\n} ) => {\n\tconst [ isFocused, setIsFocused ] = useState( false );\n\tconst [ hasIframeLoaded, setHasIframeLoaded ] = useState( false );\n\tconst iframeRef = useRef( null );\n\t// The presence of an `onClick` prop indicates that the Style Book is being used as a button.\n\t// In this case, add additional props to the iframe to make it behave like a button.\n\tconst buttonModeProps = {\n\t\trole: 'button',\n\t\tonFocus: () => setIsFocused( true ),\n\t\tonBlur: () => setIsFocused( false ),\n\t\tonKeyDown: ( event ) => {\n\t\t\tif ( event.defaultPrevented ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst { keyCode } = event;\n\t\t\tif ( onClick && ( keyCode === ENTER || keyCode === SPACE ) ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tonClick( event );\n\t\t\t}\n\t\t},\n\t\tonClick: ( event ) => {\n\t\t\tif ( event.defaultPrevented ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( onClick ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tonClick( event );\n\t\t\t}\n\t\t},\n\t\treadonly: true,\n\t};\n\n\tconst handleLoad = () => setHasIframeLoaded( true );\n\tuseLayoutEffect( () => {\n\t\tif ( hasIframeLoaded && iframeRef?.current ) {\n\t\t\tif ( goTo?.top ) {\n\t\t\t\tscrollToSection( 'top', iframeRef?.current );\n\t\t\t}\n\t\t}\n\t}, [ iframeRef?.current, goTo, scrollToSection, hasIframeLoaded ] );\n\n\treturn (\n\t\t<Iframe\n\t\t\tonLoad={ handleLoad }\n\t\t\tref={ iframeRef }\n\t\t\tclassName={ clsx( 'edit-site-style-book__iframe', {\n\t\t\t\t'is-focused': isFocused && !! onClick,\n\t\t\t\t'is-button': !! onClick,\n\t\t\t} ) }\n\t\t\tname=\"style-book-canvas\"\n\t\t\ttabIndex={ 0 }\n\t\t\t{ ...( onClick ? buttonModeProps : {} ) }\n\t\t>\n\t\t\t<EditorStyles styles={ settings.styles } />\n\t\t\t<style>\n\t\t\t\t{ STYLE_BOOK_IFRAME_STYLES }\n\t\t\t\t{ !! onClick &&\n\t\t\t\t\t'body { cursor: pointer; } body * { pointer-events: none; }' }\n\t\t\t</style>\n\t\t\t<Examples\n\t\t\t\tclassName={ clsx( 'edit-site-style-book__examples', {\n\t\t\t\t\t'is-wide': sizes.width > 600,\n\t\t\t\t} ) }\n\t\t\t\tfilteredExamples={ examples }\n\t\t\t\tlabel={\n\t\t\t\t\ttitle\n\t\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t\t// translators: %s: Category of blocks, e.g. Text.\n\t\t\t\t\t\t\t\t__( 'Examples of blocks in the %s category' ),\n\t\t\t\t\t\t\t\ttitle\n\t\t\t\t\t\t )\n\t\t\t\t\t\t: __( 'Examples of blocks' )\n\t\t\t\t}\n\t\t\t\tisSelected={ isSelected }\n\t\t\t\tonSelect={ onSelect }\n\t\t\t\tkey={ title }\n\t\t\t/>\n\t\t</Iframe>\n\t);\n};\n\nconst Examples = memo(\n\t( { className, filteredExamples, label, isSelected, onSelect } ) => {\n\t\treturn (\n\t\t\t<Composite\n\t\t\t\torientation=\"vertical\"\n\t\t\t\tclassName={ className }\n\t\t\t\taria-label={ label }\n\t\t\t\trole=\"grid\"\n\t\t\t>\n\t\t\t\t{ !! filteredExamples?.examples?.length &&\n\t\t\t\t\tfilteredExamples.examples.map( ( example ) => (\n\t\t\t\t\t\t<Example\n\t\t\t\t\t\t\tkey={ example.name }\n\t\t\t\t\t\t\tid={ `example-${ example.name }` }\n\t\t\t\t\t\t\ttitle={ example.title }\n\t\t\t\t\t\t\tcontent={ example.content }\n\t\t\t\t\t\t\tblocks={ example.blocks }\n\t\t\t\t\t\t\tisSelected={ isSelected?.( example.name ) }\n\t\t\t\t\t\t\tonClick={\n\t\t\t\t\t\t\t\t!! onSelect\n\t\t\t\t\t\t\t\t\t? () => onSelect( example.name )\n\t\t\t\t\t\t\t\t\t: null\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t) ) }\n\t\t\t\t{ !! filteredExamples?.subcategories?.length &&\n\t\t\t\t\tfilteredExamples.subcategories.map( ( subcategory ) => (\n\t\t\t\t\t\t<Composite.Group\n\t\t\t\t\t\t\tclassName=\"edit-site-style-book__subcategory\"\n\t\t\t\t\t\t\tkey={ `subcategory-${ subcategory.slug }` }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Composite.GroupLabel>\n\t\t\t\t\t\t\t\t<h2 className=\"edit-site-style-book__subcategory-title\">\n\t\t\t\t\t\t\t\t\t{ subcategory.title }\n\t\t\t\t\t\t\t\t</h2>\n\t\t\t\t\t\t\t</Composite.GroupLabel>\n\t\t\t\t\t\t\t<Subcategory\n\t\t\t\t\t\t\t\texamples={ subcategory.examples }\n\t\t\t\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\t\t\t\tonSelect={ onSelect }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</Composite.Group>\n\t\t\t\t\t) ) }\n\t\t\t</Composite>\n\t\t);\n\t}\n);\n\nconst Subcategory = ( { examples, isSelected, onSelect } ) => {\n\treturn (\n\t\t!! examples?.length &&\n\t\texamples.map( ( example ) => (\n\t\t\t<Example\n\t\t\t\tkey={ example.name }\n\t\t\t\tid={ `example-${ example.name }` }\n\t\t\t\ttitle={ example.title }\n\t\t\t\tcontent={ example.content }\n\t\t\t\tblocks={ example.blocks }\n\t\t\t\tisSelected={ isSelected?.( example.name ) }\n\t\t\t\tonClick={ !! onSelect ? () => onSelect( example.name ) : null }\n\t\t\t/>\n\t\t) )\n\t);\n};\n\nconst disabledExamples = [ 'example-duotones' ];\n\nconst Example = ( { id, title, blocks, isSelected, onClick, content } ) => {\n\tconst originalSettings = useSelect(\n\t\t( select ) => select( blockEditorStore ).getSettings(),\n\t\t[]\n\t);\n\tconst settings = useMemo(\n\t\t() => ( {\n\t\t\t...originalSettings,\n\t\t\tfocusMode: false, // Disable \"Spotlight mode\".\n\t\t\tisPreviewMode: true,\n\t\t} ),\n\t\t[ originalSettings ]\n\t);\n\n\t// Cache the list of blocks to avoid additional processing when the component is re-rendered.\n\tconst renderedBlocks = useMemo(\n\t\t() => ( Array.isArray( blocks ) ? blocks : [ blocks ] ),\n\t\t[ blocks ]\n\t);\n\n\tconst disabledProps =\n\t\tdisabledExamples.includes( id ) || ! onClick\n\t\t\t? {\n\t\t\t\t\tdisabled: true,\n\t\t\t\t\taccessibleWhenDisabled: !! onClick,\n\t\t\t }\n\t\t\t: {};\n\n\treturn (\n\t\t<div role=\"row\">\n\t\t\t<div role=\"gridcell\">\n\t\t\t\t<Composite.Item\n\t\t\t\t\tclassName={ clsx( 'edit-site-style-book__example', {\n\t\t\t\t\t\t'is-selected': isSelected,\n\t\t\t\t\t\t'is-disabled-example': !! disabledProps?.disabled,\n\t\t\t\t\t} ) }\n\t\t\t\t\tid={ id }\n\t\t\t\t\taria-label={\n\t\t\t\t\t\t!! onClick\n\t\t\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t\t\t// translators: %s: Title of a block, e.g. Heading.\n\t\t\t\t\t\t\t\t\t__( 'Open %s styles in Styles panel' ),\n\t\t\t\t\t\t\t\t\ttitle\n\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t}\n\t\t\t\t\trender={ <div /> }\n\t\t\t\t\trole={ !! onClick ? 'button' : null }\n\t\t\t\t\tonClick={ onClick }\n\t\t\t\t\t{ ...disabledProps }\n\t\t\t\t>\n\t\t\t\t\t<span className=\"edit-site-style-book__example-title\">\n\t\t\t\t\t\t{ title }\n\t\t\t\t\t</span>\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName=\"edit-site-style-book__example-preview\"\n\t\t\t\t\t\taria-hidden\n\t\t\t\t\t>\n\t\t\t\t\t\t<Disabled className=\"edit-site-style-book__example-preview__content\">\n\t\t\t\t\t\t\t{ content ? (\n\t\t\t\t\t\t\t\tcontent\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<ExperimentalBlockEditorProvider\n\t\t\t\t\t\t\t\t\tvalue={ renderedBlocks }\n\t\t\t\t\t\t\t\t\tsettings={ settings }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<EditorStyles />\n\t\t\t\t\t\t\t\t\t<BlockList renderAppender={ false } />\n\t\t\t\t\t\t\t\t</ExperimentalBlockEditorProvider>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</Disabled>\n\t\t\t\t\t</div>\n\t\t\t\t</Composite.Item>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nexport default StyleBook;\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SACCC,QAAQ,EACRC,SAAS,EACTC,WAAW,IAAIC,qBAAqB,QAC9B,uBAAuB;AAC9B,SAASC,EAAE,EAAEC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AACjD,SACCC,SAAS,EACTL,WAAW,IAAIM,sBAAsB,EACrCC,KAAK,IAAIC,gBAAgB,EACzBC,WAAW,EACXC,mBAAmB,EACnBC,sBAAsB,IAAIC,YAAY,EACtCC,gBAAgB,IAAIC,MAAM,EAC1BC,iDAAiD,IAAIC,mCAAmC,QAClF,yBAAyB;AAChC,SAAShB,WAAW,IAAIiB,iBAAiB,QAAQ,mBAAmB;AACpE,SAASC,SAAS,EAAEC,QAAQ,QAAQ,iBAAiB;AACrD,SAASC,iBAAiB,QAAQ,oBAAoB;AACtD,SACCC,OAAO,EACPC,QAAQ,EACRC,IAAI,EACJC,UAAU,EACVC,MAAM,EACNC,eAAe,EACfC,SAAS,QACH,oBAAoB;AA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A3E,QAAA,gBAElB7E,IAAA;UAAM8E,SAAS,EAAC,qCAAqC;UAAAD,QAAA,EAClDW;QAAK,CACF,CAAC,eACPxF,IAAA;UACC8E,SAAS,EAAC,uCAAuC;UACjD,mBAAW;UAAAD,QAAA,eAEX7E,IAAA,CAAC9C,QAAQ;YAAC4H,SAAS,EAAC,gDAAgD;YAAAD,QAAA,EACjE+D,OAAO,GACRA,OAAO,gBAEP1I,KAAA,CAACC,+BAA+B;cAC/B0J,KAAK,EAAGR,cAAgB;cACxB5E,QAAQ,EAAGA,QAAU;cAAAI,QAAA,gBAErB7E,IAAA,CAAChC,YAAY,IAAE,CAAC,eAChBgC,IAAA,CAACvC,SAAS;gBAACqM,cAAc,EAAG;cAAO,CAAE,CAAC;YAAA,CACN;UACjC,CACQ;QAAC,CACP,CAAC;MAAA,CACS;IAAC,CACb;EAAC,CACF,CAAC;AAER,CAAC;AAED,eAAe5G,SAAS","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["@wordpress/edit-site/src/components/style-book/types.ts"],"sourcesContent":["type Block = {\n\tname: string;\n\tattributes: Record< string, unknown >;\n\tinnerBlocks?: Block[];\n};\n\nexport type StyleBookCategory = {\n\ttitle: string;\n\tslug: string;\n\tblocks?: string[];\n\texclude?: string[];\n\tinclude?: string[];\n\tsubcategories?: StyleBookCategory[];\n};\n\nexport type BlockExample = {\n\tname: string;\n\ttitle: string;\n\tcategory: string;\n\tcontent?: JSX.Element;\n\tblocks?: Block | Block[];\n};\n\nexport type CategoryExamples = {\n\ttitle: string;\n\tslug: string;\n\texamples?: BlockExample[];\n\tsubcategories?: CategoryExamples[];\n};\n\nexport type StyleBookColorGroup = {\n\torigin: string;\n\tslug: string;\n\ttitle: string;\n\ttype: string;\n};\n\nexport type Color = { slug: string };\nexport type Gradient = { slug: string };\nexport type Duotone = {\n\tcolors: string[];\n\tslug: string;\n};\n\nexport type ColorOrigin = {\n\tname: string;\n\tslug: string;\n\tcolors?: Color[];\n\tgradients?: Gradient[];\n\tduotones?: Duotone[];\n};\n\nexport type MultiOriginPalettes = {\n\tdisableCustomColors: boolean;\n\tdisableCustomGradients: boolean;\n\thasColorsOrGradients: boolean;\n\tcolors: Omit< ColorOrigin, 'gradients' | 'duotones' >;\n\tduotones: Omit< ColorOrigin, 'colors' | 'gradients' >;\n\tgradients: Omit< ColorOrigin, 'colors' | 'duotones' >;\n};\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["@wordpress/edit-site/src/components/style-book/types.ts"],"sourcesContent":["export type Block = {\n\tname: string;\n\tattributes: Record< string, unknown >;\n\tinnerBlocks?: Block[];\n};\n\nexport type StyleBookCategory = {\n\ttitle: string;\n\tslug: string;\n\tblocks?: string[];\n\texclude?: string[];\n\tinclude?: string[];\n\tsubcategories?: StyleBookCategory[];\n};\n\nexport type BlockExample = {\n\tname: string;\n\ttitle: string;\n\tcategory: string;\n\tcontent?: JSX.Element;\n\tblocks?: Block | Block[];\n};\n\nexport type CategoryExamples = {\n\ttitle: string;\n\tslug: string;\n\texamples?: BlockExample[];\n\tsubcategories?: CategoryExamples[];\n};\n\nexport type StyleBookColorGroup = {\n\torigin: string;\n\tslug: string;\n\ttitle: string;\n\ttype: string;\n};\n\nexport type Color = { slug: string };\nexport type Gradient = { slug: string };\nexport type Duotone = {\n\tcolors: string[];\n\tslug: string;\n};\n\nexport type ColorOrigin = {\n\tname: string;\n\tslug: string;\n\tcolors?: Color[];\n\tgradients?: Gradient[];\n\tduotones?: Duotone[];\n};\n\nexport type MultiOriginPalettes = {\n\tdisableCustomColors: boolean;\n\tdisableCustomGradients: boolean;\n\thasColorsOrGradients: boolean;\n\tcolors: Omit< ColorOrigin, 'gradients' | 'duotones' >;\n\tduotones: Omit< ColorOrigin, 'colors' | 'gradients' >;\n\tgradients: Omit< ColorOrigin, 'colors' | 'duotones' >;\n};\n"],"mappings":"","ignoreList":[]}
@@ -1,3 +1,4 @@
1
+ /* wp:polyfill */
1
2
  /**
2
3
  * WordPress dependencies
3
4
  */
@@ -1 +1 @@
1
- {"version":3,"names":["store","blocksStore","registerCoreBlocks","__experimentalGetCoreBlocks","__experimentalRegisterExperimentalCoreBlocks","dispatch","deprecated","createRoot","StrictMode","privateApis","editorPrivateApis","preferencesStore","registerLegacyWidgetBlock","registerWidgetGroupBlock","editSiteStore","unlock","App","jsx","_jsx","registerCoreBlockBindingsSources","initializeEditor","id","settings","target","document","getElementById","root","reapplyBlockTypeFilters","coreBlocks","filter","name","setFreeformFallbackBlockName","inserter","globalThis","IS_GUTENBERG_PLUGIN","enableFSEBlocks","setDefaults","welcomeGuide","welcomeGuideStyles","welcomeGuidePage","welcomeGuideTemplate","allowRightClickOverrides","distractionFree","editorMode","editorTool","fixedToolbar","focusMode","inactivePanels","keepCaretInsideBlock","openPanels","showBlockBreadcrumbs","showListViewByDefault","enableChoosePatternModal","window","__experimentalMediaProcessing","requireApproval","optimizeOnUpload","updateSettings","addEventListener","e","preventDefault","render","children","reinitializeEditor","since","version","default","PluginTemplateSettingPanel","initializePostsDashboard"],"sources":["@wordpress/edit-site/src/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport {\n\tregisterCoreBlocks,\n\t__experimentalGetCoreBlocks,\n\t__experimentalRegisterExperimentalCoreBlocks,\n} from '@wordpress/block-library';\nimport { dispatch } from '@wordpress/data';\nimport deprecated from '@wordpress/deprecated';\nimport { createRoot, StrictMode } from '@wordpress/element';\nimport { privateApis as editorPrivateApis } from '@wordpress/editor';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport {\n\tregisterLegacyWidgetBlock,\n\tregisterWidgetGroupBlock,\n} from '@wordpress/widgets';\n\n/**\n * Internal dependencies\n */\nimport './hooks';\nimport { store as editSiteStore } from './store';\nimport { unlock } from './lock-unlock';\nimport App from './components/app';\n\nconst { registerCoreBlockBindingsSources } = unlock( editorPrivateApis );\n\n/**\n * Initializes the site editor screen.\n *\n * @param {string} id ID of the root element to render the screen in.\n * @param {Object} settings Editor settings.\n */\nexport function initializeEditor( id, settings ) {\n\tconst target = document.getElementById( id );\n\tconst root = createRoot( target );\n\n\tdispatch( blocksStore ).reapplyBlockTypeFilters();\n\tconst coreBlocks = __experimentalGetCoreBlocks().filter(\n\t\t( { name } ) => name !== 'core/freeform'\n\t);\n\tregisterCoreBlocks( coreBlocks );\n\tregisterCoreBlockBindingsSources();\n\tdispatch( blocksStore ).setFreeformFallbackBlockName( 'core/html' );\n\tregisterLegacyWidgetBlock( { inserter: false } );\n\tregisterWidgetGroupBlock( { inserter: false } );\n\tif ( globalThis.IS_GUTENBERG_PLUGIN ) {\n\t\t__experimentalRegisterExperimentalCoreBlocks( {\n\t\t\tenableFSEBlocks: true,\n\t\t} );\n\t}\n\n\t// We dispatch actions and update the store synchronously before rendering\n\t// so that we won't trigger unnecessary re-renders with useEffect.\n\tdispatch( preferencesStore ).setDefaults( 'core/edit-site', {\n\t\twelcomeGuide: true,\n\t\twelcomeGuideStyles: true,\n\t\twelcomeGuidePage: true,\n\t\twelcomeGuideTemplate: true,\n\t} );\n\n\tdispatch( preferencesStore ).setDefaults( 'core', {\n\t\tallowRightClickOverrides: true,\n\t\tdistractionFree: false,\n\t\teditorMode: 'visual',\n\t\teditorTool: 'edit',\n\t\tfixedToolbar: false,\n\t\tfocusMode: false,\n\t\tinactivePanels: [],\n\t\tkeepCaretInsideBlock: false,\n\t\topenPanels: [ 'post-status' ],\n\t\tshowBlockBreadcrumbs: true,\n\t\tshowListViewByDefault: false,\n\t\tenableChoosePatternModal: true,\n\t} );\n\n\tif ( window.__experimentalMediaProcessing ) {\n\t\tdispatch( preferencesStore ).setDefaults( 'core/media', {\n\t\t\trequireApproval: true,\n\t\t\toptimizeOnUpload: true,\n\t\t} );\n\t}\n\n\tdispatch( editSiteStore ).updateSettings( settings );\n\n\t// Prevent the default browser action for files dropped outside of dropzones.\n\twindow.addEventListener( 'dragover', ( e ) => e.preventDefault(), false );\n\twindow.addEventListener( 'drop', ( e ) => e.preventDefault(), false );\n\n\troot.render(\n\t\t<StrictMode>\n\t\t\t<App />\n\t\t</StrictMode>\n\t);\n\n\treturn root;\n}\n\nexport function reinitializeEditor() {\n\tdeprecated( 'wp.editSite.reinitializeEditor', {\n\t\tsince: '6.2',\n\t\tversion: '6.3',\n\t} );\n}\n\nexport { default as PluginTemplateSettingPanel } from './components/plugin-template-setting-panel';\nexport { store } from './store';\nexport * from './deprecated';\n\n// Temporary: While the posts dashboard is being iterated on\n// it's being built in the same package as the site editor.\nexport { initializePostsDashboard } from './posts';\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,KAAK,IAAIC,WAAW,QAAQ,mBAAmB;AACxD,SACCC,kBAAkB,EAClBC,2BAA2B,EAC3BC,4CAA4C,QACtC,0BAA0B;AACjC,SAASC,QAAQ,QAAQ,iBAAiB;AAC1C,OAAOC,UAAU,MAAM,uBAAuB;AAC9C,SAASC,UAAU,EAAEC,UAAU,QAAQ,oBAAoB;AAC3D,SAASC,WAAW,IAAIC,iBAAiB,QAAQ,mBAAmB;AACpE,SAASV,KAAK,IAAIW,gBAAgB,QAAQ,wBAAwB;AAClE,SACCC,yBAAyB,EACzBC,wBAAwB,QAClB,oBAAoB;;AAE3B;AACA;AACA;AACA,OAAO,SAAS;AAChB,SAASb,KAAK,IAAIc,aAAa,QAAQ,SAAS;AAChD,SAASC,MAAM,QAAQ,eAAe;AACtC,OAAOC,GAAG,MAAM,kBAAkB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEnC,MAAM;EAAEC;AAAiC,CAAC,GAAGJ,MAAM,CAAEL,iBAAkB,CAAC;;AAExE;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASU,gBAAgBA,CAAEC,EAAE,EAAEC,QAAQ,EAAG;EAChD,MAAMC,MAAM,GAAGC,QAAQ,CAACC,cAAc,CAAEJ,EAAG,CAAC;EAC5C,MAAMK,IAAI,GAAGnB,UAAU,CAAEgB,MAAO,CAAC;EAEjClB,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M,gBAAiB,CAAC,CAACyB,WAAW,CAAE,YAAY,EAAE;MACvDmB,eAAe,EAAE,IAAI;MACrBC,gBAAgB,EAAE;IACnB,CAAE,CAAC;EACJ;EAEAnD,QAAQ,CAAES,aAAc,CAAC,CAAC2C,cAAc,CAAEnC,QAAS,CAAC;;EAEpD;EACA+B,MAAM,CAACK,gBAAgB,CAAE,UAAU,EAAIC,CAAC,IAAMA,CAAC,CAACC,cAAc,CAAC,CAAC,EAAE,KAAM,CAAC;EACzEP,MAAM,CAACK,gBAAgB,CAAE,MAAM,EAAIC,CAAC,IAAMA,CAAC,CAACC,cAAc,CAAC,CAAC,EAAE,KAAM,CAAC;EAErElC,IAAI,CAACmC,MAAM,cACV3C,IAAA,CAACV,UAAU;IAAAsD,QAAA,eACV5C,IAAA,CAACF,GAAG,IAAE;EAAC,CACI,CACb,CAAC;EAED,OAAOU,IAAI;AACZ;AAEA,OAAO,SAASqC,kBAAkBA,CAAA,EAAG;EACpCzD,UAAU,CAAE,gCAAgC,EAAE;IAC7C0D,KAAK,EAAE,KAAK;IACZC,OAAO,EAAE;EACV,CAAE,CAAC;AACJ;AAEA,SAASC,OAAO,IAAIC,0BAA0B,QAAQ,4CAA4C;AAClG,SAASnE,KAAK,QAAQ,SAAS;AAC/B,cAAc,cAAc;;AAE5B;AACA;AACA,SAASoE,wBAAwB,QAAQ,SAAS","ignoreList":[]}
1
+ {"version":3,"names":["store","blocksStore","registerCoreBlocks","__experimentalGetCoreBlocks","__experimentalRegisterExperimentalCoreBlocks","dispatch","deprecated","createRoot","StrictMode","privateApis","editorPrivateApis","preferencesStore","registerLegacyWidgetBlock","registerWidgetGroupBlock","editSiteStore","unlock","App","jsx","_jsx","registerCoreBlockBindingsSources","initializeEditor","id","settings","target","document","getElementById","root","reapplyBlockTypeFilters","coreBlocks","filter","name","setFreeformFallbackBlockName","inserter","globalThis","IS_GUTENBERG_PLUGIN","enableFSEBlocks","setDefaults","welcomeGuide","welcomeGuideStyles","welcomeGuidePage","welcomeGuideTemplate","allowRightClickOverrides","distractionFree","editorMode","editorTool","fixedToolbar","focusMode","inactivePanels","keepCaretInsideBlock","openPanels","showBlockBreadcrumbs","showListViewByDefault","enableChoosePatternModal","window","__experimentalMediaProcessing","requireApproval","optimizeOnUpload","updateSettings","addEventListener","e","preventDefault","render","children","reinitializeEditor","since","version","default","PluginTemplateSettingPanel","initializePostsDashboard"],"sources":["@wordpress/edit-site/src/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport {\n\tregisterCoreBlocks,\n\t__experimentalGetCoreBlocks,\n\t__experimentalRegisterExperimentalCoreBlocks,\n} from '@wordpress/block-library';\nimport { dispatch } from '@wordpress/data';\nimport deprecated from '@wordpress/deprecated';\nimport { createRoot, StrictMode } from '@wordpress/element';\nimport { privateApis as editorPrivateApis } from '@wordpress/editor';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport {\n\tregisterLegacyWidgetBlock,\n\tregisterWidgetGroupBlock,\n} from '@wordpress/widgets';\n\n/**\n * Internal dependencies\n */\nimport './hooks';\nimport { store as editSiteStore } from './store';\nimport { unlock } from './lock-unlock';\nimport App from './components/app';\n\nconst { registerCoreBlockBindingsSources } = unlock( editorPrivateApis );\n\n/**\n * Initializes the site editor screen.\n *\n * @param {string} id ID of the root element to render the screen in.\n * @param {Object} settings Editor settings.\n */\nexport function initializeEditor( id, settings ) {\n\tconst target = document.getElementById( id );\n\tconst root = createRoot( target );\n\n\tdispatch( blocksStore ).reapplyBlockTypeFilters();\n\tconst coreBlocks = __experimentalGetCoreBlocks().filter(\n\t\t( { name } ) => name !== 'core/freeform'\n\t);\n\tregisterCoreBlocks( coreBlocks );\n\tregisterCoreBlockBindingsSources();\n\tdispatch( blocksStore ).setFreeformFallbackBlockName( 'core/html' );\n\tregisterLegacyWidgetBlock( { inserter: false } );\n\tregisterWidgetGroupBlock( { inserter: false } );\n\tif ( globalThis.IS_GUTENBERG_PLUGIN ) {\n\t\t__experimentalRegisterExperimentalCoreBlocks( {\n\t\t\tenableFSEBlocks: true,\n\t\t} );\n\t}\n\n\t// We dispatch actions and update the store synchronously before rendering\n\t// so that we won't trigger unnecessary re-renders with useEffect.\n\tdispatch( preferencesStore ).setDefaults( 'core/edit-site', {\n\t\twelcomeGuide: true,\n\t\twelcomeGuideStyles: true,\n\t\twelcomeGuidePage: true,\n\t\twelcomeGuideTemplate: true,\n\t} );\n\n\tdispatch( preferencesStore ).setDefaults( 'core', {\n\t\tallowRightClickOverrides: true,\n\t\tdistractionFree: false,\n\t\teditorMode: 'visual',\n\t\teditorTool: 'edit',\n\t\tfixedToolbar: false,\n\t\tfocusMode: false,\n\t\tinactivePanels: [],\n\t\tkeepCaretInsideBlock: false,\n\t\topenPanels: [ 'post-status' ],\n\t\tshowBlockBreadcrumbs: true,\n\t\tshowListViewByDefault: false,\n\t\tenableChoosePatternModal: true,\n\t} );\n\n\tif ( window.__experimentalMediaProcessing ) {\n\t\tdispatch( preferencesStore ).setDefaults( 'core/media', {\n\t\t\trequireApproval: true,\n\t\t\toptimizeOnUpload: true,\n\t\t} );\n\t}\n\n\tdispatch( editSiteStore ).updateSettings( settings );\n\n\t// Prevent the default browser action for files dropped outside of dropzones.\n\twindow.addEventListener( 'dragover', ( e ) => e.preventDefault(), false );\n\twindow.addEventListener( 'drop', ( e ) => e.preventDefault(), false );\n\n\troot.render(\n\t\t<StrictMode>\n\t\t\t<App />\n\t\t</StrictMode>\n\t);\n\n\treturn root;\n}\n\nexport function reinitializeEditor() {\n\tdeprecated( 'wp.editSite.reinitializeEditor', {\n\t\tsince: '6.2',\n\t\tversion: '6.3',\n\t} );\n}\n\nexport { default as PluginTemplateSettingPanel } from './components/plugin-template-setting-panel';\nexport { store } from './store';\nexport * from './deprecated';\n\n// Temporary: While the posts dashboard is being iterated on\n// it's being built in the same package as the site editor.\nexport { initializePostsDashboard } from './posts';\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,KAAK,IAAIC,W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