@wordpress/edit-site 6.13.1-next.cd6172eb0.0 → 6.14.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 (441) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/components/add-new-pattern/index.js +1 -0
  3. package/build/components/add-new-pattern/index.js.map +1 -1
  4. package/build/components/add-new-post/index.js +1 -1
  5. package/build/components/add-new-post/index.js.map +1 -1
  6. package/build/components/add-new-template/add-custom-template-modal-content.js +1 -0
  7. package/build/components/add-new-template/add-custom-template-modal-content.js.map +1 -1
  8. package/build/components/add-new-template/index.js +1 -0
  9. package/build/components/add-new-template/index.js.map +1 -1
  10. package/build/components/add-new-template/utils.js +1 -0
  11. package/build/components/add-new-template/utils.js.map +1 -1
  12. package/build/components/editor-canvas-container/index.js +1 -0
  13. package/build/components/editor-canvas-container/index.js.map +1 -1
  14. package/build/components/global-styles/font-families.js +1 -0
  15. package/build/components/global-styles/font-families.js.map +1 -1
  16. package/build/components/global-styles/font-library-modal/context.js +1 -0
  17. package/build/components/global-styles/font-library-modal/context.js.map +1 -1
  18. package/build/components/global-styles/font-library-modal/font-collection.js +1 -0
  19. package/build/components/global-styles/font-library-modal/font-collection.js.map +1 -1
  20. package/build/components/global-styles/font-library-modal/font-demo.js +1 -0
  21. package/build/components/global-styles/font-library-modal/font-demo.js.map +1 -1
  22. package/build/components/global-styles/font-library-modal/index.js +1 -0
  23. package/build/components/global-styles/font-library-modal/index.js.map +1 -1
  24. package/build/components/global-styles/font-library-modal/installed-fonts.js +1 -0
  25. package/build/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
  26. package/build/components/global-styles/font-library-modal/library-font-details.js +1 -0
  27. package/build/components/global-styles/font-library-modal/library-font-details.js.map +1 -1
  28. package/build/components/global-styles/font-library-modal/upload-fonts.js +1 -0
  29. package/build/components/global-styles/font-library-modal/upload-fonts.js.map +1 -1
  30. package/build/components/global-styles/font-library-modal/utils/filter-fonts.js +1 -0
  31. package/build/components/global-styles/font-library-modal/utils/filter-fonts.js.map +1 -1
  32. package/build/components/global-styles/font-library-modal/utils/fonts-outline.js +1 -0
  33. package/build/components/global-styles/font-library-modal/utils/fonts-outline.js.map +1 -1
  34. package/build/components/global-styles/font-library-modal/utils/index.js +1 -0
  35. package/build/components/global-styles/font-library-modal/utils/index.js.map +1 -1
  36. package/build/components/global-styles/font-library-modal/utils/make-families-from-faces.js +1 -0
  37. package/build/components/global-styles/font-library-modal/utils/make-families-from-faces.js.map +1 -1
  38. package/build/components/global-styles/font-library-modal/utils/preview-styles.js +1 -0
  39. package/build/components/global-styles/font-library-modal/utils/preview-styles.js.map +1 -1
  40. package/build/components/global-styles/font-library-modal/utils/toggleFont.js +1 -0
  41. package/build/components/global-styles/font-library-modal/utils/toggleFont.js.map +1 -1
  42. package/build/components/global-styles/font-sizes/font-size.js +1 -0
  43. package/build/components/global-styles/font-sizes/font-size.js.map +1 -1
  44. package/build/components/global-styles/font-sizes/font-sizes.js +1 -0
  45. package/build/components/global-styles/font-sizes/font-sizes.js.map +1 -1
  46. package/build/components/global-styles/highlighted-colors.js +1 -0
  47. package/build/components/global-styles/highlighted-colors.js.map +1 -1
  48. package/build/components/global-styles/hooks.js +1 -0
  49. package/build/components/global-styles/hooks.js.map +1 -1
  50. package/build/components/global-styles/palette.js +1 -0
  51. package/build/components/global-styles/palette.js.map +1 -1
  52. package/build/components/global-styles/preset-colors.js +1 -0
  53. package/build/components/global-styles/preset-colors.js.map +1 -1
  54. package/build/components/global-styles/preview-colors.js +2 -2
  55. package/build/components/global-styles/preview-colors.js.map +1 -1
  56. package/build/components/global-styles/preview-styles.js +3 -2
  57. package/build/components/global-styles/preview-styles.js.map +1 -1
  58. package/build/components/global-styles/preview-typography.js +2 -2
  59. package/build/components/global-styles/preview-typography.js.map +1 -1
  60. package/build/components/global-styles/{preview-iframe.js → preview-wrapper.js} +11 -29
  61. package/build/components/global-styles/preview-wrapper.js.map +1 -0
  62. package/build/components/global-styles/screen-block-list.js +1 -0
  63. package/build/components/global-styles/screen-block-list.js.map +1 -1
  64. package/build/components/global-styles/screen-revisions/revisions-buttons.js +1 -0
  65. package/build/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
  66. package/build/components/global-styles/screen-revisions/use-global-styles-revisions.js +1 -0
  67. package/build/components/global-styles/screen-revisions/use-global-styles-revisions.js.map +1 -1
  68. package/build/components/global-styles/shadow-utils.js +1 -0
  69. package/build/components/global-styles/shadow-utils.js.map +1 -1
  70. package/build/components/global-styles/shadows-edit-panel.js +15 -21
  71. package/build/components/global-styles/shadows-edit-panel.js.map +1 -1
  72. package/build/components/global-styles/shadows-panel.js +1 -0
  73. package/build/components/global-styles/shadows-panel.js.map +1 -1
  74. package/build/components/global-styles/style-variations-container.js +1 -0
  75. package/build/components/global-styles/style-variations-container.js.map +1 -1
  76. package/build/components/global-styles/typeset.js +1 -0
  77. package/build/components/global-styles/typeset.js.map +1 -1
  78. package/build/components/global-styles/typography-example.js +8 -1
  79. package/build/components/global-styles/typography-example.js.map +1 -1
  80. package/build/components/global-styles/ui.js +1 -0
  81. package/build/components/global-styles/ui.js.map +1 -1
  82. package/build/components/global-styles/utils.js +1 -0
  83. package/build/components/global-styles/utils.js.map +1 -1
  84. package/build/components/global-styles/variations/variations-color.js +1 -0
  85. package/build/components/global-styles/variations/variations-color.js.map +1 -1
  86. package/build/components/global-styles/variations/variations-panel.js +1 -0
  87. package/build/components/global-styles/variations/variations-panel.js.map +1 -1
  88. package/build/components/global-styles/variations/variations-typography.js +1 -0
  89. package/build/components/global-styles/variations/variations-typography.js.map +1 -1
  90. package/build/components/global-styles-renderer/index.js +1 -0
  91. package/build/components/global-styles-renderer/index.js.map +1 -1
  92. package/build/components/layout/index.js +14 -7
  93. package/build/components/layout/index.js.map +1 -1
  94. package/build/components/maybe-editor/index.js +65 -0
  95. package/build/components/maybe-editor/index.js.map +1 -0
  96. package/build/components/media/index.js +1 -0
  97. package/build/components/media/index.js.map +1 -1
  98. package/build/components/page-patterns/fields.js +2 -47
  99. package/build/components/page-patterns/fields.js.map +1 -1
  100. package/build/components/page-patterns/header.js +1 -0
  101. package/build/components/page-patterns/header.js.map +1 -1
  102. package/build/components/page-patterns/index.js +18 -14
  103. package/build/components/page-patterns/index.js.map +1 -1
  104. package/build/components/page-patterns/search-items.js +1 -0
  105. package/build/components/page-patterns/search-items.js.map +1 -1
  106. package/build/components/page-patterns/use-pattern-settings.js +1 -0
  107. package/build/components/page-patterns/use-pattern-settings.js.map +1 -1
  108. package/build/components/page-patterns/use-patterns.js +1 -0
  109. package/build/components/page-patterns/use-patterns.js.map +1 -1
  110. package/build/components/page-templates/fields.js +2 -21
  111. package/build/components/page-templates/fields.js.map +1 -1
  112. package/build/components/page-templates/index.js +38 -41
  113. package/build/components/page-templates/index.js.map +1 -1
  114. package/build/components/post-edit/index.js +16 -8
  115. package/build/components/post-edit/index.js.map +1 -1
  116. package/build/components/post-list/index.js +30 -19
  117. package/build/components/post-list/index.js.map +1 -1
  118. package/build/components/posts-app-routes/index.js +1 -0
  119. package/build/components/posts-app-routes/index.js.map +1 -1
  120. package/build/components/resizable-frame/index.js +9 -1
  121. package/build/components/resizable-frame/index.js.map +1 -1
  122. package/build/components/save-button/index.js +1 -0
  123. package/build/components/save-button/index.js.map +1 -1
  124. package/build/components/save-hub/index.js +1 -0
  125. package/build/components/save-hub/index.js.map +1 -1
  126. package/build/components/save-keyboard-shortcut/index.js +1 -0
  127. package/build/components/save-keyboard-shortcut/index.js.map +1 -1
  128. package/build/components/save-panel/index.js +1 -0
  129. package/build/components/save-panel/index.js.map +1 -1
  130. package/build/components/sidebar/index.js +1 -0
  131. package/build/components/sidebar/index.js.map +1 -1
  132. package/build/components/sidebar-dataviews/custom-dataviews-list.js +1 -0
  133. package/build/components/sidebar-dataviews/custom-dataviews-list.js.map +1 -1
  134. package/build/components/sidebar-dataviews/dataview-item.js +1 -0
  135. package/build/components/sidebar-dataviews/dataview-item.js.map +1 -1
  136. package/build/components/sidebar-dataviews/default-views.js +7 -24
  137. package/build/components/sidebar-dataviews/default-views.js.map +1 -1
  138. package/build/components/sidebar-dataviews/index.js +2 -0
  139. package/build/components/sidebar-dataviews/index.js.map +1 -1
  140. package/build/components/sidebar-global-styles-wrapper/index.js +1 -0
  141. package/build/components/sidebar-global-styles-wrapper/index.js.map +1 -1
  142. package/build/components/sidebar-navigation-screen-global-styles/content.js +12 -38
  143. package/build/components/sidebar-navigation-screen-global-styles/content.js.map +1 -1
  144. package/build/components/sidebar-navigation-screen-main/index.js +37 -23
  145. package/build/components/sidebar-navigation-screen-main/index.js.map +1 -1
  146. package/build/components/sidebar-navigation-screen-navigation-menus/index.js +1 -0
  147. package/build/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
  148. package/build/components/sidebar-navigation-screen-patterns/index.js +1 -4
  149. package/build/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
  150. package/build/components/sidebar-navigation-screen-patterns/use-pattern-categories.js +1 -0
  151. package/build/components/sidebar-navigation-screen-patterns/use-pattern-categories.js.map +1 -1
  152. package/build/components/sidebar-navigation-screen-patterns/use-template-part-areas.js +1 -0
  153. package/build/components/sidebar-navigation-screen-patterns/use-template-part-areas.js.map +1 -1
  154. package/build/components/sidebar-navigation-screen-patterns/use-theme-patterns.js +1 -0
  155. package/build/components/sidebar-navigation-screen-patterns/use-theme-patterns.js.map +1 -1
  156. package/build/components/sidebar-navigation-screen-templates-browse/content.js +2 -0
  157. package/build/components/sidebar-navigation-screen-templates-browse/content.js.map +1 -1
  158. package/build/components/site-editor-routes/home.js +4 -2
  159. package/build/components/site-editor-routes/home.js.map +1 -1
  160. package/build/components/site-editor-routes/index.js +3 -1
  161. package/build/components/site-editor-routes/index.js.map +1 -1
  162. package/build/components/site-editor-routes/stylebook.js +33 -0
  163. package/build/components/site-editor-routes/stylebook.js.map +1 -0
  164. package/build/components/site-editor-routes/template-item.js +3 -3
  165. package/build/components/site-editor-routes/template-item.js.map +1 -1
  166. package/build/components/site-editor-routes/template-part-item.js +3 -3
  167. package/build/components/site-editor-routes/template-part-item.js.map +1 -1
  168. package/build/components/style-book/categories.js +1 -0
  169. package/build/components/style-book/categories.js.map +1 -1
  170. package/build/components/style-book/color-examples.js +9 -3
  171. package/build/components/style-book/color-examples.js.map +1 -1
  172. package/build/components/style-book/constants.js +0 -1
  173. package/build/components/style-book/constants.js.map +1 -1
  174. package/build/components/style-book/duotone-examples.js +1 -0
  175. package/build/components/style-book/duotone-examples.js.map +1 -1
  176. package/build/components/style-book/examples.js +48 -30
  177. package/build/components/style-book/examples.js.map +1 -1
  178. package/build/components/style-book/index.js +103 -24
  179. package/build/components/style-book/index.js.map +1 -1
  180. package/build/components/style-book/types.js.map +1 -1
  181. package/build/index.js +1 -0
  182. package/build/index.js.map +1 -1
  183. package/build/posts.js +1 -0
  184. package/build/posts.js.map +1 -1
  185. package/build/store/reducer.js +1 -0
  186. package/build/store/reducer.js.map +1 -1
  187. package/build/utils/get-filtered-template-parts.js +1 -0
  188. package/build/utils/get-filtered-template-parts.js.map +1 -1
  189. package/build/utils/set-nested-value.js +1 -0
  190. package/build/utils/set-nested-value.js.map +1 -1
  191. package/build-module/components/add-new-pattern/index.js +1 -0
  192. package/build-module/components/add-new-pattern/index.js.map +1 -1
  193. package/build-module/components/add-new-post/index.js +1 -1
  194. package/build-module/components/add-new-post/index.js.map +1 -1
  195. package/build-module/components/add-new-template/add-custom-template-modal-content.js +1 -0
  196. package/build-module/components/add-new-template/add-custom-template-modal-content.js.map +1 -1
  197. package/build-module/components/add-new-template/index.js +1 -0
  198. package/build-module/components/add-new-template/index.js.map +1 -1
  199. package/build-module/components/add-new-template/utils.js +1 -0
  200. package/build-module/components/add-new-template/utils.js.map +1 -1
  201. package/build-module/components/editor-canvas-container/index.js +1 -0
  202. package/build-module/components/editor-canvas-container/index.js.map +1 -1
  203. package/build-module/components/global-styles/font-families.js +1 -0
  204. package/build-module/components/global-styles/font-families.js.map +1 -1
  205. package/build-module/components/global-styles/font-library-modal/context.js +1 -0
  206. package/build-module/components/global-styles/font-library-modal/context.js.map +1 -1
  207. package/build-module/components/global-styles/font-library-modal/font-collection.js +1 -0
  208. package/build-module/components/global-styles/font-library-modal/font-collection.js.map +1 -1
  209. package/build-module/components/global-styles/font-library-modal/font-demo.js +1 -0
  210. package/build-module/components/global-styles/font-library-modal/font-demo.js.map +1 -1
  211. package/build-module/components/global-styles/font-library-modal/index.js +1 -0
  212. package/build-module/components/global-styles/font-library-modal/index.js.map +1 -1
  213. package/build-module/components/global-styles/font-library-modal/installed-fonts.js +1 -0
  214. package/build-module/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
  215. package/build-module/components/global-styles/font-library-modal/library-font-details.js +1 -0
  216. package/build-module/components/global-styles/font-library-modal/library-font-details.js.map +1 -1
  217. package/build-module/components/global-styles/font-library-modal/upload-fonts.js +1 -0
  218. package/build-module/components/global-styles/font-library-modal/upload-fonts.js.map +1 -1
  219. package/build-module/components/global-styles/font-library-modal/utils/filter-fonts.js +1 -0
  220. package/build-module/components/global-styles/font-library-modal/utils/filter-fonts.js.map +1 -1
  221. package/build-module/components/global-styles/font-library-modal/utils/fonts-outline.js +1 -0
  222. package/build-module/components/global-styles/font-library-modal/utils/fonts-outline.js.map +1 -1
  223. package/build-module/components/global-styles/font-library-modal/utils/index.js +1 -0
  224. package/build-module/components/global-styles/font-library-modal/utils/index.js.map +1 -1
  225. package/build-module/components/global-styles/font-library-modal/utils/make-families-from-faces.js +1 -0
  226. package/build-module/components/global-styles/font-library-modal/utils/make-families-from-faces.js.map +1 -1
  227. package/build-module/components/global-styles/font-library-modal/utils/preview-styles.js +1 -0
  228. package/build-module/components/global-styles/font-library-modal/utils/preview-styles.js.map +1 -1
  229. package/build-module/components/global-styles/font-library-modal/utils/toggleFont.js +1 -0
  230. package/build-module/components/global-styles/font-library-modal/utils/toggleFont.js.map +1 -1
  231. package/build-module/components/global-styles/font-sizes/font-size.js +1 -0
  232. package/build-module/components/global-styles/font-sizes/font-size.js.map +1 -1
  233. package/build-module/components/global-styles/font-sizes/font-sizes.js +1 -0
  234. package/build-module/components/global-styles/font-sizes/font-sizes.js.map +1 -1
  235. package/build-module/components/global-styles/highlighted-colors.js +1 -0
  236. package/build-module/components/global-styles/highlighted-colors.js.map +1 -1
  237. package/build-module/components/global-styles/hooks.js +1 -0
  238. package/build-module/components/global-styles/hooks.js.map +1 -1
  239. package/build-module/components/global-styles/palette.js +1 -0
  240. package/build-module/components/global-styles/palette.js.map +1 -1
  241. package/build-module/components/global-styles/preset-colors.js +1 -0
  242. package/build-module/components/global-styles/preset-colors.js.map +1 -1
  243. package/build-module/components/global-styles/preview-colors.js +2 -2
  244. package/build-module/components/global-styles/preview-colors.js.map +1 -1
  245. package/build-module/components/global-styles/preview-styles.js +3 -2
  246. package/build-module/components/global-styles/preview-styles.js.map +1 -1
  247. package/build-module/components/global-styles/preview-typography.js +2 -2
  248. package/build-module/components/global-styles/preview-typography.js.map +1 -1
  249. package/build-module/components/global-styles/{preview-iframe.js → preview-wrapper.js} +13 -31
  250. package/build-module/components/global-styles/preview-wrapper.js.map +1 -0
  251. package/build-module/components/global-styles/screen-block-list.js +1 -0
  252. package/build-module/components/global-styles/screen-block-list.js.map +1 -1
  253. package/build-module/components/global-styles/screen-revisions/revisions-buttons.js +1 -0
  254. package/build-module/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
  255. package/build-module/components/global-styles/screen-revisions/use-global-styles-revisions.js +1 -0
  256. package/build-module/components/global-styles/screen-revisions/use-global-styles-revisions.js.map +1 -1
  257. package/build-module/components/global-styles/shadow-utils.js +1 -0
  258. package/build-module/components/global-styles/shadow-utils.js.map +1 -1
  259. package/build-module/components/global-styles/shadows-edit-panel.js +16 -22
  260. package/build-module/components/global-styles/shadows-edit-panel.js.map +1 -1
  261. package/build-module/components/global-styles/shadows-panel.js +1 -0
  262. package/build-module/components/global-styles/shadows-panel.js.map +1 -1
  263. package/build-module/components/global-styles/style-variations-container.js +1 -0
  264. package/build-module/components/global-styles/style-variations-container.js.map +1 -1
  265. package/build-module/components/global-styles/typeset.js +1 -0
  266. package/build-module/components/global-styles/typeset.js.map +1 -1
  267. package/build-module/components/global-styles/typography-example.js +8 -1
  268. package/build-module/components/global-styles/typography-example.js.map +1 -1
  269. package/build-module/components/global-styles/ui.js +1 -0
  270. package/build-module/components/global-styles/ui.js.map +1 -1
  271. package/build-module/components/global-styles/utils.js +1 -0
  272. package/build-module/components/global-styles/utils.js.map +1 -1
  273. package/build-module/components/global-styles/variations/variations-color.js +1 -0
  274. package/build-module/components/global-styles/variations/variations-color.js.map +1 -1
  275. package/build-module/components/global-styles/variations/variations-panel.js +1 -0
  276. package/build-module/components/global-styles/variations/variations-panel.js.map +1 -1
  277. package/build-module/components/global-styles/variations/variations-typography.js +1 -0
  278. package/build-module/components/global-styles/variations/variations-typography.js.map +1 -1
  279. package/build-module/components/global-styles-renderer/index.js +1 -0
  280. package/build-module/components/global-styles-renderer/index.js.map +1 -1
  281. package/build-module/components/layout/index.js +14 -7
  282. package/build-module/components/layout/index.js.map +1 -1
  283. package/build-module/components/maybe-editor/index.js +59 -0
  284. package/build-module/components/maybe-editor/index.js.map +1 -0
  285. package/build-module/components/media/index.js +1 -0
  286. package/build-module/components/media/index.js.map +1 -1
  287. package/build-module/components/page-patterns/fields.js +3 -48
  288. package/build-module/components/page-patterns/fields.js.map +1 -1
  289. package/build-module/components/page-patterns/header.js +1 -0
  290. package/build-module/components/page-patterns/header.js.map +1 -1
  291. package/build-module/components/page-patterns/index.js +16 -12
  292. package/build-module/components/page-patterns/index.js.map +1 -1
  293. package/build-module/components/page-patterns/search-items.js +1 -0
  294. package/build-module/components/page-patterns/search-items.js.map +1 -1
  295. package/build-module/components/page-patterns/use-pattern-settings.js +1 -0
  296. package/build-module/components/page-patterns/use-pattern-settings.js.map +1 -1
  297. package/build-module/components/page-patterns/use-patterns.js +1 -0
  298. package/build-module/components/page-patterns/use-patterns.js.map +1 -1
  299. package/build-module/components/page-templates/fields.js +1 -20
  300. package/build-module/components/page-templates/fields.js.map +1 -1
  301. package/build-module/components/page-templates/index.js +37 -40
  302. package/build-module/components/page-templates/index.js.map +1 -1
  303. package/build-module/components/post-edit/index.js +16 -8
  304. package/build-module/components/post-edit/index.js.map +1 -1
  305. package/build-module/components/post-list/index.js +31 -20
  306. package/build-module/components/post-list/index.js.map +1 -1
  307. package/build-module/components/posts-app-routes/index.js +1 -0
  308. package/build-module/components/posts-app-routes/index.js.map +1 -1
  309. package/build-module/components/resizable-frame/index.js +9 -1
  310. package/build-module/components/resizable-frame/index.js.map +1 -1
  311. package/build-module/components/save-button/index.js +1 -0
  312. package/build-module/components/save-button/index.js.map +1 -1
  313. package/build-module/components/save-hub/index.js +1 -0
  314. package/build-module/components/save-hub/index.js.map +1 -1
  315. package/build-module/components/save-keyboard-shortcut/index.js +1 -0
  316. package/build-module/components/save-keyboard-shortcut/index.js.map +1 -1
  317. package/build-module/components/save-panel/index.js +1 -0
  318. package/build-module/components/save-panel/index.js.map +1 -1
  319. package/build-module/components/sidebar/index.js +1 -0
  320. package/build-module/components/sidebar/index.js.map +1 -1
  321. package/build-module/components/sidebar-dataviews/custom-dataviews-list.js +1 -0
  322. package/build-module/components/sidebar-dataviews/custom-dataviews-list.js.map +1 -1
  323. package/build-module/components/sidebar-dataviews/dataview-item.js +1 -0
  324. package/build-module/components/sidebar-dataviews/dataview-item.js.map +1 -1
  325. package/build-module/components/sidebar-dataviews/default-views.js +7 -24
  326. package/build-module/components/sidebar-dataviews/default-views.js.map +1 -1
  327. package/build-module/components/sidebar-dataviews/index.js +2 -0
  328. package/build-module/components/sidebar-dataviews/index.js.map +1 -1
  329. package/build-module/components/sidebar-global-styles-wrapper/index.js +1 -0
  330. package/build-module/components/sidebar-global-styles-wrapper/index.js.map +1 -1
  331. package/build-module/components/sidebar-navigation-screen-global-styles/content.js +12 -38
  332. package/build-module/components/sidebar-navigation-screen-global-styles/content.js.map +1 -1
  333. package/build-module/components/sidebar-navigation-screen-main/index.js +39 -25
  334. package/build-module/components/sidebar-navigation-screen-main/index.js.map +1 -1
  335. package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js +1 -0
  336. package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
  337. package/build-module/components/sidebar-navigation-screen-patterns/index.js +1 -4
  338. package/build-module/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
  339. package/build-module/components/sidebar-navigation-screen-patterns/use-pattern-categories.js +1 -0
  340. package/build-module/components/sidebar-navigation-screen-patterns/use-pattern-categories.js.map +1 -1
  341. package/build-module/components/sidebar-navigation-screen-patterns/use-template-part-areas.js +1 -0
  342. package/build-module/components/sidebar-navigation-screen-patterns/use-template-part-areas.js.map +1 -1
  343. package/build-module/components/sidebar-navigation-screen-patterns/use-theme-patterns.js +1 -0
  344. package/build-module/components/sidebar-navigation-screen-patterns/use-theme-patterns.js.map +1 -1
  345. package/build-module/components/sidebar-navigation-screen-templates-browse/content.js +2 -0
  346. package/build-module/components/sidebar-navigation-screen-templates-browse/content.js.map +1 -1
  347. package/build-module/components/site-editor-routes/home.js +4 -2
  348. package/build-module/components/site-editor-routes/home.js.map +1 -1
  349. package/build-module/components/site-editor-routes/index.js +3 -1
  350. package/build-module/components/site-editor-routes/index.js.map +1 -1
  351. package/build-module/components/site-editor-routes/stylebook.js +25 -0
  352. package/build-module/components/site-editor-routes/stylebook.js.map +1 -0
  353. package/build-module/components/site-editor-routes/template-item.js +3 -3
  354. package/build-module/components/site-editor-routes/template-item.js.map +1 -1
  355. package/build-module/components/site-editor-routes/template-part-item.js +3 -3
  356. package/build-module/components/site-editor-routes/template-part-item.js.map +1 -1
  357. package/build-module/components/style-book/categories.js +1 -0
  358. package/build-module/components/style-book/categories.js.map +1 -1
  359. package/build-module/components/style-book/color-examples.js +9 -3
  360. package/build-module/components/style-book/color-examples.js.map +1 -1
  361. package/build-module/components/style-book/constants.js +0 -1
  362. package/build-module/components/style-book/constants.js.map +1 -1
  363. package/build-module/components/style-book/duotone-examples.js +1 -0
  364. package/build-module/components/style-book/duotone-examples.js.map +1 -1
  365. package/build-module/components/style-book/examples.js +48 -30
  366. package/build-module/components/style-book/examples.js.map +1 -1
  367. package/build-module/components/style-book/index.js +102 -26
  368. package/build-module/components/style-book/index.js.map +1 -1
  369. package/build-module/components/style-book/types.js.map +1 -1
  370. package/build-module/index.js +1 -0
  371. package/build-module/index.js.map +1 -1
  372. package/build-module/posts.js +1 -0
  373. package/build-module/posts.js.map +1 -1
  374. package/build-module/store/reducer.js +1 -0
  375. package/build-module/store/reducer.js.map +1 -1
  376. package/build-module/utils/get-filtered-template-parts.js +1 -0
  377. package/build-module/utils/get-filtered-template-parts.js.map +1 -1
  378. package/build-module/utils/set-nested-value.js +1 -0
  379. package/build-module/utils/set-nested-value.js.map +1 -1
  380. package/build-style/posts-rtl.css +92 -117
  381. package/build-style/posts.css +92 -117
  382. package/build-style/style-rtl.css +205 -195
  383. package/build-style/style.css +205 -195
  384. package/package.json +40 -40
  385. package/src/components/add-new-post/index.js +1 -1
  386. package/src/components/global-styles/preview-colors.js +3 -3
  387. package/src/components/global-styles/preview-styles.js +3 -3
  388. package/src/components/global-styles/preview-typography.js +3 -3
  389. package/src/components/global-styles/{preview-iframe.js → preview-wrapper.js} +9 -35
  390. package/src/components/global-styles/shadows-edit-panel.js +20 -21
  391. package/src/components/global-styles/style.scss +32 -18
  392. package/src/components/global-styles/typography-example.js +12 -1
  393. package/src/components/layout/index.js +8 -6
  394. package/src/components/maybe-editor/index.js +58 -0
  395. package/src/components/page-patterns/fields.js +2 -59
  396. package/src/components/page-patterns/index.js +23 -11
  397. package/src/components/page-patterns/style.scss +0 -28
  398. package/src/components/page-templates/fields.js +1 -18
  399. package/src/components/page-templates/index.js +38 -55
  400. package/src/components/post-edit/index.js +22 -18
  401. package/src/components/post-list/index.js +49 -43
  402. package/src/components/post-list/style.scss +0 -36
  403. package/src/components/resizable-frame/index.js +10 -1
  404. package/src/components/sidebar-dataviews/default-views.js +7 -24
  405. package/src/components/sidebar-dataviews/index.js +1 -1
  406. package/src/components/sidebar-dataviews/style.scss +5 -0
  407. package/src/components/sidebar-navigation-screen/style.scss +0 -5
  408. package/src/components/sidebar-navigation-screen-global-styles/content.js +7 -35
  409. package/src/components/sidebar-navigation-screen-main/index.js +66 -37
  410. package/src/components/sidebar-navigation-screen-main/style.scss +4 -0
  411. package/src/components/sidebar-navigation-screen-navigation-menus/index.js +1 -1
  412. package/src/components/sidebar-navigation-screen-navigation-menus/style.scss +5 -0
  413. package/src/components/sidebar-navigation-screen-patterns/index.js +0 -7
  414. package/src/components/sidebar-navigation-screen-patterns/style.scss +2 -0
  415. package/src/components/sidebar-navigation-screen-templates-browse/content.js +1 -1
  416. package/src/components/sidebar-navigation-screen-templates-browse/style.scss +4 -0
  417. package/src/components/site-editor-routes/home.js +2 -2
  418. package/src/components/site-editor-routes/index.js +2 -0
  419. package/src/components/site-editor-routes/stylebook.js +28 -0
  420. package/src/components/site-editor-routes/template-item.js +3 -3
  421. package/src/components/site-editor-routes/template-part-item.js +3 -3
  422. package/src/components/style-book/color-examples.tsx +21 -3
  423. package/src/components/style-book/constants.ts +0 -1
  424. package/src/components/style-book/examples.tsx +55 -31
  425. package/src/components/style-book/index.js +145 -38
  426. package/src/components/style-book/style.scss +4 -0
  427. package/src/components/style-book/types.ts +1 -1
  428. package/src/style.scss +4 -1
  429. package/build/components/error-boundary/index.js +0 -47
  430. package/build/components/error-boundary/index.js.map +0 -1
  431. package/build/components/error-boundary/warning.js +0 -42
  432. package/build/components/error-boundary/warning.js.map +0 -1
  433. package/build/components/global-styles/preview-iframe.js.map +0 -1
  434. package/build-module/components/error-boundary/index.js +0 -38
  435. package/build-module/components/error-boundary/index.js.map +0 -1
  436. package/build-module/components/error-boundary/warning.js +0 -35
  437. package/build-module/components/error-boundary/warning.js.map +0 -1
  438. package/build-module/components/global-styles/preview-iframe.js.map +0 -1
  439. package/src/components/error-boundary/index.js +0 -44
  440. package/src/components/error-boundary/test/error-boundary.js +0 -40
  441. package/src/components/error-boundary/warning.js +0 -30
@@ -1,3 +1,4 @@
1
+ /* wp:polyfill */
1
2
  "use strict";
2
3
 
3
4
  Object.defineProperty(exports, "__esModule", {
@@ -19,6 +20,7 @@ var _templates = require("./templates");
19
20
  var _templateItem = require("./template-item");
20
21
  var _pages = require("./pages");
21
22
  var _pageItem = require("./page-item");
23
+ var _stylebook = require("./stylebook");
22
24
  /**
23
25
  * WordPress dependencies
24
26
  */
@@ -27,7 +29,7 @@ var _pageItem = require("./page-item");
27
29
  * Internal dependencies
28
30
  */
29
31
 
30
- const routes = [_pageItem.pageItemRoute, _pages.pagesRoute, _templateItem.templateItemRoute, _templates.templatesRoute, _templatePartItem.templatePartItemRoute, _patternItem.patternItemRoute, _patterns.patternsRoute, _navigationItem.navigationItemRoute, _navigation.navigationRoute, _styles.stylesRoute, _home.homeRoute];
32
+ const routes = [_pageItem.pageItemRoute, _pages.pagesRoute, _templateItem.templateItemRoute, _templates.templatesRoute, _templatePartItem.templatePartItemRoute, _patternItem.patternItemRoute, _patterns.patternsRoute, _navigationItem.navigationItemRoute, _navigation.navigationRoute, _styles.stylesRoute, _home.homeRoute, _stylebook.stylebookRoute];
31
33
  function useRegisterSiteEditorRoutes() {
32
34
  const registry = (0, _data.useRegistry)();
33
35
  const {
@@ -1 +1 @@
1
- {"version":3,"names":["_data","require","_element","_lockUnlock","_store","_home","_styles","_navigation","_navigationItem","_patterns","_patternItem","_templatePartItem","_templates","_templateItem","_pages","_pageItem","routes","pageItemRoute","pagesRoute","templateItemRoute","templatesRoute","templatePartItemRoute","patternItemRoute","patternsRoute","navigationItemRoute","navigationRoute","stylesRoute","homeRoute","useRegisterSiteEditorRoutes","registry","useRegistry","registerRoute","unlock","useDispatch","siteEditorStore","useEffect","batch","forEach"],"sources":["@wordpress/edit-site/src/components/site-editor-routes/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useRegistry, useDispatch } from '@wordpress/data';\nimport { useEffect } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { store as siteEditorStore } from '../../store';\nimport { homeRoute } from './home';\nimport { stylesRoute } from './styles';\nimport { navigationRoute } from './navigation';\nimport { navigationItemRoute } from './navigation-item';\nimport { patternsRoute } from './patterns';\nimport { patternItemRoute } from './pattern-item';\nimport { templatePartItemRoute } from './template-part-item';\nimport { templatesRoute } from './templates';\nimport { templateItemRoute } from './template-item';\nimport { pagesRoute } from './pages';\nimport { pageItemRoute } from './page-item';\n\nconst routes = [\n\tpageItemRoute,\n\tpagesRoute,\n\ttemplateItemRoute,\n\ttemplatesRoute,\n\ttemplatePartItemRoute,\n\tpatternItemRoute,\n\tpatternsRoute,\n\tnavigationItemRoute,\n\tnavigationRoute,\n\tstylesRoute,\n\thomeRoute,\n];\n\nexport function useRegisterSiteEditorRoutes() {\n\tconst registry = useRegistry();\n\tconst { registerRoute } = unlock( useDispatch( siteEditorStore ) );\n\tuseEffect( () => {\n\t\tregistry.batch( () => {\n\t\t\troutes.forEach( registerRoute );\n\t\t} );\n\t}, [ registry, registerRoute ] );\n}\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AAKA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AACA,IAAAM,WAAA,GAAAN,OAAA;AACA,IAAAO,eAAA,GAAAP,OAAA;AACA,IAAAQ,SAAA,GAAAR,OAAA;AACA,IAAAS,YAAA,GAAAT,OAAA;AACA,IAAAU,iBAAA,GAAAV,OAAA;AACA,IAAAW,UAAA,GAAAX,OAAA;AACA,IAAAY,aAAA,GAAAZ,OAAA;AACA,IAAAa,MAAA,GAAAb,OAAA;AACA,IAAAc,SAAA,GAAAd,OAAA;AArBA;AACA;AACA;;AAIA;AACA;AACA;;AAeA,MAAMe,MAAM,GAAG,CACdC,uBAAa,EACbC,iBAAU,EACVC,+BAAiB,EACjBC,yBAAc,EACdC,uCAAqB,EACrBC,6BAAgB,EAChBC,uBAAa,EACbC,mCAAmB,EACnBC,2BAAe,EACfC,mBAAW,EACXC,eAAS,CACT;AAEM,SAASC,2BAA2BA,CAAA,EAAG;EAC7C,MAAMC,QAAQ,GAAG,IAAAC,iBAAW,EAAC,CAAC;EAC9B,MAAM;IAAEC;EAAc,CAAC,GAAG,IAAAC,kBAAM,EAAE,IAAAC,iBAAW,EAAEC,YAAgB,CAAE,CAAC;EAClE,IAAAC,kBAAS,EAAE,MAAM;IAChBN,QAAQ,CAACO,KAAK,CAAE,MAAM;MACrBpB,MAAM,CAACqB,OAAO,CAAEN,aAAc,CAAC;IAChC,CAAE,CAAC;EACJ,CAAC,EAAE,CAAEF,QAAQ,EAAEE,aAAa,CAAG,CAAC;AACjC","ignoreList":[]}
1
+ {"version":3,"names":["_data","require","_element","_lockUnlock","_store","_home","_styles","_navigation","_navigationItem","_patterns","_patternItem","_templatePartItem","_templates","_templateItem","_pages","_pageItem","_stylebook","routes","pageItemRoute","pagesRoute","templateItemRoute","templatesRoute","templatePartItemRoute","patternItemRoute","patternsRoute","navigationItemRoute","navigationRoute","stylesRoute","homeRoute","stylebookRoute","useRegisterSiteEditorRoutes","registry","useRegistry","registerRoute","unlock","useDispatch","siteEditorStore","useEffect","batch","forEach"],"sources":["@wordpress/edit-site/src/components/site-editor-routes/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useRegistry, useDispatch } from '@wordpress/data';\nimport { useEffect } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { store as siteEditorStore } from '../../store';\nimport { homeRoute } from './home';\nimport { stylesRoute } from './styles';\nimport { navigationRoute } from './navigation';\nimport { navigationItemRoute } from './navigation-item';\nimport { patternsRoute } from './patterns';\nimport { patternItemRoute } from './pattern-item';\nimport { templatePartItemRoute } from './template-part-item';\nimport { templatesRoute } from './templates';\nimport { templateItemRoute } from './template-item';\nimport { pagesRoute } from './pages';\nimport { pageItemRoute } from './page-item';\nimport { stylebookRoute } from './stylebook';\n\nconst routes = [\n\tpageItemRoute,\n\tpagesRoute,\n\ttemplateItemRoute,\n\ttemplatesRoute,\n\ttemplatePartItemRoute,\n\tpatternItemRoute,\n\tpatternsRoute,\n\tnavigationItemRoute,\n\tnavigationRoute,\n\tstylesRoute,\n\thomeRoute,\n\tstylebookRoute,\n];\n\nexport function useRegisterSiteEditorRoutes() {\n\tconst registry = useRegistry();\n\tconst { registerRoute } = unlock( useDispatch( siteEditorStore ) );\n\tuseEffect( () => {\n\t\tregistry.batch( () => {\n\t\t\troutes.forEach( registerRoute );\n\t\t} );\n\t}, [ registry, registerRoute ] );\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AAKA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AACA,IAAAM,WAAA,GAAAN,OAAA;AACA,IAAAO,eAAA,GAAAP,OAAA;AACA,IAAAQ,SAAA,GAAAR,OAAA;AACA,IAAAS,YAAA,GAAAT,OAAA;AACA,IAAAU,iBAAA,GAAAV,OAAA;AACA,IAAAW,UAAA,GAAAX,OAAA;AACA,IAAAY,aAAA,GAAAZ,OAAA;AACA,IAAAa,MAAA,GAAAb,OAAA;AACA,IAAAc,SAAA,GAAAd,OAAA;AACA,IAAAe,UAAA,GAAAf,OAAA;AAtBA;AACA;AACA;;AAIA;AACA;AACA;;AAgBA,MAAMgB,MAAM,GAAG,CACdC,uBAAa,EACbC,iBAAU,EACVC,+BAAiB,EACjBC,yBAAc,EACdC,uCAAqB,EACrBC,6BAAgB,EAChBC,uBAAa,EACbC,mCAAmB,EACnBC,2BAAe,EACfC,mBAAW,EACXC,eAAS,EACTC,yBAAc,CACd;AAEM,SAASC,2BAA2BA,CAAA,EAAG;EAC7C,MAAMC,QAAQ,GAAG,IAAAC,iBAAW,EAAC,CAAC;EAC9B,MAAM;IAAEC;EAAc,CAAC,GAAG,IAAAC,kBAAM,EAAE,IAAAC,iBAAW,EAAEC,YAAgB,CAAE,CAAC;EAClE,IAAAC,kBAAS,EAAE,MAAM;IAChBN,QAAQ,CAACO,KAAK,CAAE,MAAM;MACrBrB,MAAM,CAACsB,OAAO,CAAEN,aAAc,CAAC;IAChC,CAAE,CAAC;EACJ,CAAC,EAAE,CAAEF,QAAQ,EAAEE,aAAa,CAAG,CAAC;AACjC","ignoreList":[]}
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.stylebookRoute = void 0;
8
+ var _i18n = require("@wordpress/i18n");
9
+ var _sidebarNavigationScreen = _interopRequireDefault(require("../sidebar-navigation-screen"));
10
+ var _styleBook = require("../style-book");
11
+ var _jsxRuntime = require("react/jsx-runtime");
12
+ /**
13
+ * WordPress dependencies
14
+ */
15
+
16
+ /**
17
+ * Internal dependencies
18
+ */
19
+
20
+ const stylebookRoute = exports.stylebookRoute = {
21
+ name: 'stylebook',
22
+ path: '/stylebook',
23
+ areas: {
24
+ sidebar: /*#__PURE__*/(0, _jsxRuntime.jsx)(_sidebarNavigationScreen.default, {
25
+ title: (0, _i18n.__)('Styles'),
26
+ backPath: "/",
27
+ description: (0, _i18n.__)(`Preview your website's visual identity: colors, typography, and blocks.`)
28
+ }),
29
+ preview: /*#__PURE__*/(0, _jsxRuntime.jsx)(_styleBook.StyleBookPreview, {}),
30
+ mobile: /*#__PURE__*/(0, _jsxRuntime.jsx)(_styleBook.StyleBookPreview, {})
31
+ }
32
+ };
33
+ //# sourceMappingURL=stylebook.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_i18n","require","_sidebarNavigationScreen","_interopRequireDefault","_styleBook","_jsxRuntime","stylebookRoute","exports","name","path","areas","sidebar","jsx","default","title","__","backPath","description","preview","StyleBookPreview","mobile"],"sources":["@wordpress/edit-site/src/components/site-editor-routes/stylebook.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport { StyleBookPreview } from '../style-book';\n\nexport const stylebookRoute = {\n\tname: 'stylebook',\n\tpath: '/stylebook',\n\tareas: {\n\t\tsidebar: (\n\t\t\t<SidebarNavigationScreen\n\t\t\t\ttitle={ __( 'Styles' ) }\n\t\t\t\tbackPath=\"/\"\n\t\t\t\tdescription={ __(\n\t\t\t\t\t`Preview your website's visual identity: colors, typography, and blocks.`\n\t\t\t\t) }\n\t\t\t/>\n\t\t),\n\t\tpreview: <StyleBookPreview />,\n\t\tmobile: <StyleBookPreview />,\n\t},\n};\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AAKA,IAAAC,wBAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AAAiD,IAAAI,WAAA,GAAAJ,OAAA;AATjD;AACA;AACA;;AAGA;AACA;AACA;;AAIO,MAAMK,cAAc,GAAAC,OAAA,CAAAD,cAAA,GAAG;EAC7BE,IAAI,EAAE,WAAW;EACjBC,IAAI,EAAE,YAAY;EAClBC,KAAK,EAAE;IACNC,OAAO,eACN,IAAAN,WAAA,CAAAO,GAAA,EAACV,wBAAA,CAAAW,OAAuB;MACvBC,KAAK,EAAG,IAAAC,QAAE,EAAE,QAAS,CAAG;MACxBC,QAAQ,EAAC,GAAG;MACZC,WAAW,EAAG,IAAAF,QAAE,EACf,yEACD;IAAG,CACH,CACD;IACDG,OAAO,eAAE,IAAAb,WAAA,CAAAO,GAAA,EAACR,UAAA,CAAAe,gBAAgB,IAAE,CAAC;IAC7BC,MAAM,eAAE,IAAAf,WAAA,CAAAO,GAAA,EAACR,UAAA,CAAAe,gBAAgB,IAAE;EAC5B;AACD,CAAC","ignoreList":[]}
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.templateItemRoute = void 0;
8
- var _editor = _interopRequireDefault(require("../editor"));
8
+ var _maybeEditor = require("../maybe-editor");
9
9
  var _sidebarNavigationScreenTemplatesBrowse = _interopRequireDefault(require("../sidebar-navigation-screen-templates-browse"));
10
10
  var _jsxRuntime = require("react/jsx-runtime");
11
11
  /**
@@ -19,8 +19,8 @@ const templateItemRoute = exports.templateItemRoute = {
19
19
  sidebar: /*#__PURE__*/(0, _jsxRuntime.jsx)(_sidebarNavigationScreenTemplatesBrowse.default, {
20
20
  backPath: "/"
21
21
  }),
22
- mobile: /*#__PURE__*/(0, _jsxRuntime.jsx)(_editor.default, {}),
23
- preview: /*#__PURE__*/(0, _jsxRuntime.jsx)(_editor.default, {})
22
+ mobile: /*#__PURE__*/(0, _jsxRuntime.jsx)(_maybeEditor.MaybeEditor, {}),
23
+ preview: /*#__PURE__*/(0, _jsxRuntime.jsx)(_maybeEditor.MaybeEditor, {})
24
24
  }
25
25
  };
26
26
  //# sourceMappingURL=template-item.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_editor","_interopRequireDefault","require","_sidebarNavigationScreenTemplatesBrowse","_jsxRuntime","templateItemRoute","exports","name","path","areas","sidebar","jsx","default","backPath","mobile","preview"],"sources":["@wordpress/edit-site/src/components/site-editor-routes/template-item.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport Editor from '../editor';\nimport SidebarNavigationScreenTemplatesBrowse from '../sidebar-navigation-screen-templates-browse';\n\nexport const templateItemRoute = {\n\tname: 'template-item',\n\tpath: '/wp_template/*postId',\n\tareas: {\n\t\tsidebar: <SidebarNavigationScreenTemplatesBrowse backPath=\"/\" />,\n\t\tmobile: <Editor />,\n\t\tpreview: <Editor />,\n\t},\n};\n"],"mappings":";;;;;;;AAGA,IAAAA,OAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,uCAAA,GAAAF,sBAAA,CAAAC,OAAA;AAAmG,IAAAE,WAAA,GAAAF,OAAA;AAJnG;AACA;AACA;;AAIO,MAAMG,iBAAiB,GAAAC,OAAA,CAAAD,iBAAA,GAAG;EAChCE,IAAI,EAAE,eAAe;EACrBC,IAAI,EAAE,sBAAsB;EAC5BC,KAAK,EAAE;IACNC,OAAO,eAAE,IAAAN,WAAA,CAAAO,GAAA,EAACR,uCAAA,CAAAS,OAAsC;MAACC,QAAQ,EAAC;IAAG,CAAE,CAAC;IAChEC,MAAM,eAAE,IAAAV,WAAA,CAAAO,GAAA,EAACX,OAAA,CAAAY,OAAM,IAAE,CAAC;IAClBG,OAAO,eAAE,IAAAX,WAAA,CAAAO,GAAA,EAACX,OAAA,CAAAY,OAAM,IAAE;EACnB;AACD,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_maybeEditor","require","_sidebarNavigationScreenTemplatesBrowse","_interopRequireDefault","_jsxRuntime","templateItemRoute","exports","name","path","areas","sidebar","jsx","default","backPath","mobile","MaybeEditor","preview"],"sources":["@wordpress/edit-site/src/components/site-editor-routes/template-item.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport { MaybeEditor } from '../maybe-editor';\nimport SidebarNavigationScreenTemplatesBrowse from '../sidebar-navigation-screen-templates-browse';\n\nexport const templateItemRoute = {\n\tname: 'template-item',\n\tpath: '/wp_template/*postId',\n\tareas: {\n\t\tsidebar: <SidebarNavigationScreenTemplatesBrowse backPath=\"/\" />,\n\t\tmobile: <MaybeEditor />,\n\t\tpreview: <MaybeEditor />,\n\t},\n};\n"],"mappings":";;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,uCAAA,GAAAC,sBAAA,CAAAF,OAAA;AAAmG,IAAAG,WAAA,GAAAH,OAAA;AAJnG;AACA;AACA;;AAIO,MAAMI,iBAAiB,GAAAC,OAAA,CAAAD,iBAAA,GAAG;EAChCE,IAAI,EAAE,eAAe;EACrBC,IAAI,EAAE,sBAAsB;EAC5BC,KAAK,EAAE;IACNC,OAAO,eAAE,IAAAN,WAAA,CAAAO,GAAA,EAACT,uCAAA,CAAAU,OAAsC;MAACC,QAAQ,EAAC;IAAG,CAAE,CAAC;IAChEC,MAAM,eAAE,IAAAV,WAAA,CAAAO,GAAA,EAACX,YAAA,CAAAe,WAAW,IAAE,CAAC;IACvBC,OAAO,eAAE,IAAAZ,WAAA,CAAAO,GAAA,EAACX,YAAA,CAAAe,WAAW,IAAE;EACxB;AACD,CAAC","ignoreList":[]}
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.templatePartItemRoute = void 0;
8
- var _editor = _interopRequireDefault(require("../editor"));
8
+ var _maybeEditor = require("../maybe-editor");
9
9
  var _sidebarNavigationScreenPatterns = _interopRequireDefault(require("../sidebar-navigation-screen-patterns"));
10
10
  var _jsxRuntime = require("react/jsx-runtime");
11
11
  /**
@@ -19,8 +19,8 @@ const templatePartItemRoute = exports.templatePartItemRoute = {
19
19
  sidebar: /*#__PURE__*/(0, _jsxRuntime.jsx)(_sidebarNavigationScreenPatterns.default, {
20
20
  backPath: "/"
21
21
  }),
22
- mobile: /*#__PURE__*/(0, _jsxRuntime.jsx)(_editor.default, {}),
23
- preview: /*#__PURE__*/(0, _jsxRuntime.jsx)(_editor.default, {})
22
+ mobile: /*#__PURE__*/(0, _jsxRuntime.jsx)(_maybeEditor.MaybeEditor, {}),
23
+ preview: /*#__PURE__*/(0, _jsxRuntime.jsx)(_maybeEditor.MaybeEditor, {})
24
24
  }
25
25
  };
26
26
  //# sourceMappingURL=template-part-item.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_editor","_interopRequireDefault","require","_sidebarNavigationScreenPatterns","_jsxRuntime","templatePartItemRoute","exports","name","path","areas","sidebar","jsx","default","backPath","mobile","preview"],"sources":["@wordpress/edit-site/src/components/site-editor-routes/template-part-item.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport Editor from '../editor';\nimport SidebarNavigationScreenPatterns from '../sidebar-navigation-screen-patterns';\n\nexport const templatePartItemRoute = {\n\tname: 'template-part-item',\n\tpath: '/wp_template_part/*postId',\n\tareas: {\n\t\tsidebar: <SidebarNavigationScreenPatterns backPath=\"/\" />,\n\t\tmobile: <Editor />,\n\t\tpreview: <Editor />,\n\t},\n};\n"],"mappings":";;;;;;;AAGA,IAAAA,OAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,gCAAA,GAAAF,sBAAA,CAAAC,OAAA;AAAoF,IAAAE,WAAA,GAAAF,OAAA;AAJpF;AACA;AACA;;AAIO,MAAMG,qBAAqB,GAAAC,OAAA,CAAAD,qBAAA,GAAG;EACpCE,IAAI,EAAE,oBAAoB;EAC1BC,IAAI,EAAE,2BAA2B;EACjCC,KAAK,EAAE;IACNC,OAAO,eAAE,IAAAN,WAAA,CAAAO,GAAA,EAACR,gCAAA,CAAAS,OAA+B;MAACC,QAAQ,EAAC;IAAG,CAAE,CAAC;IACzDC,MAAM,eAAE,IAAAV,WAAA,CAAAO,GAAA,EAACX,OAAA,CAAAY,OAAM,IAAE,CAAC;IAClBG,OAAO,eAAE,IAAAX,WAAA,CAAAO,GAAA,EAACX,OAAA,CAAAY,OAAM,IAAE;EACnB;AACD,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_maybeEditor","require","_sidebarNavigationScreenPatterns","_interopRequireDefault","_jsxRuntime","templatePartItemRoute","exports","name","path","areas","sidebar","jsx","default","backPath","mobile","MaybeEditor","preview"],"sources":["@wordpress/edit-site/src/components/site-editor-routes/template-part-item.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport { MaybeEditor } from '../maybe-editor';\nimport SidebarNavigationScreenPatterns from '../sidebar-navigation-screen-patterns';\n\nexport const templatePartItemRoute = {\n\tname: 'template-part-item',\n\tpath: '/wp_template_part/*postId',\n\tareas: {\n\t\tsidebar: <SidebarNavigationScreenPatterns backPath=\"/\" />,\n\t\tmobile: <MaybeEditor />,\n\t\tpreview: <MaybeEditor />,\n\t},\n};\n"],"mappings":";;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,gCAAA,GAAAC,sBAAA,CAAAF,OAAA;AAAoF,IAAAG,WAAA,GAAAH,OAAA;AAJpF;AACA;AACA;;AAIO,MAAMI,qBAAqB,GAAAC,OAAA,CAAAD,qBAAA,GAAG;EACpCE,IAAI,EAAE,oBAAoB;EAC1BC,IAAI,EAAE,2BAA2B;EACjCC,KAAK,EAAE;IACNC,OAAO,eAAE,IAAAN,WAAA,CAAAO,GAAA,EAACT,gCAAA,CAAAU,OAA+B;MAACC,QAAQ,EAAC;IAAG,CAAE,CAAC;IACzDC,MAAM,eAAE,IAAAV,WAAA,CAAAO,GAAA,EAACX,YAAA,CAAAe,WAAW,IAAE,CAAC;IACvBC,OAAO,eAAE,IAAAZ,WAAA,CAAAO,GAAA,EAACX,YAAA,CAAAe,WAAW,IAAE;EACxB;AACD,CAAC","ignoreList":[]}
@@ -1,3 +1,4 @@
1
+ /* wp:polyfill */
1
2
  "use strict";
2
3
 
3
4
  Object.defineProperty(exports, "__esModule", {
@@ -1 +1 @@
1
- {"version":3,"names":["_blocks","require","_constants","getExamplesByCategory","categoryDefinition","examples","slug","length","subcategories","reduce","acc","subcategoryDefinition","subcategoryExamples","title","blocksToInclude","blocks","blocksToExclude","exclude","categoryExamples","filter","example","includes","name","category","getTopLevelStyleBookCategories","reservedCategories","STYLE_BOOK_THEME_SUBCATEGORIES","STYLE_BOOK_CATEGORIES","map","extraCategories","getCategories"],"sources":["@wordpress/edit-site/src/components/style-book/categories.ts"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { getCategories } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport type {\n\tBlockExample,\n\tStyleBookCategory,\n\tCategoryExamples,\n} from './types';\nimport {\n\tSTYLE_BOOK_CATEGORIES,\n\tSTYLE_BOOK_THEME_SUBCATEGORIES,\n} from './constants';\n\n/**\n * Returns category examples for a given category definition and list of examples.\n * @param {StyleBookCategory} categoryDefinition The category definition.\n * @param {BlockExample[]} examples An array of block examples.\n * @return {CategoryExamples|undefined} An object containing the category examples.\n */\nexport function getExamplesByCategory(\n\tcategoryDefinition: StyleBookCategory,\n\texamples: BlockExample[]\n): CategoryExamples | undefined {\n\tif ( ! categoryDefinition?.slug || ! examples?.length ) {\n\t\treturn;\n\t}\n\n\tif ( categoryDefinition?.subcategories?.length ) {\n\t\treturn categoryDefinition.subcategories.reduce(\n\t\t\t( acc, subcategoryDefinition ) => {\n\t\t\t\tconst subcategoryExamples = getExamplesByCategory(\n\t\t\t\t\tsubcategoryDefinition,\n\t\t\t\t\texamples\n\t\t\t\t);\n\t\t\t\tif ( subcategoryExamples ) {\n\t\t\t\t\tacc.subcategories = [\n\t\t\t\t\t\t...acc.subcategories,\n\t\t\t\t\t\tsubcategoryExamples,\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\t\treturn acc;\n\t\t\t},\n\t\t\t{\n\t\t\t\ttitle: categoryDefinition.title,\n\t\t\t\tslug: categoryDefinition.slug,\n\t\t\t\tsubcategories: [],\n\t\t\t}\n\t\t);\n\t}\n\n\tconst blocksToInclude = categoryDefinition?.blocks || [];\n\tconst blocksToExclude = categoryDefinition?.exclude || [];\n\tconst categoryExamples = examples.filter( ( example ) => {\n\t\treturn (\n\t\t\t! blocksToExclude.includes( example.name ) &&\n\t\t\t( example.category === categoryDefinition.slug ||\n\t\t\t\tblocksToInclude.includes( example.name ) )\n\t\t);\n\t} );\n\n\tif ( ! categoryExamples.length ) {\n\t\treturn;\n\t}\n\n\treturn {\n\t\ttitle: categoryDefinition.title,\n\t\tslug: categoryDefinition.slug,\n\t\texamples: categoryExamples,\n\t};\n}\n\n/**\n * Returns category examples for a given category definition and list of examples.\n *\n * @return {StyleBookCategory[]} An array of top-level category definitions.\n */\nexport function getTopLevelStyleBookCategories(): StyleBookCategory[] {\n\tconst reservedCategories = [\n\t\t...STYLE_BOOK_THEME_SUBCATEGORIES,\n\t\t...STYLE_BOOK_CATEGORIES,\n\t].map( ( { slug } ) => slug );\n\tconst extraCategories = getCategories().filter(\n\t\t( { slug } ) => ! reservedCategories.includes( slug )\n\t);\n\treturn [ ...STYLE_BOOK_CATEGORIES, ...extraCategories ];\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AAUA,IAAAC,UAAA,GAAAD,OAAA;AAbA;AACA;AACA;;AAGA;AACA;AACA;;AAWA;AACA;AACA;AACA;AACA;AACA;AACO,SAASE,qBAAqBA,CACpCC,kBAAqC,EACrCC,QAAwB,EACO;EAC/B,IAAK,CAAED,kBAAkB,EAAEE,IAAI,IAAI,CAAED,QAAQ,EAAEE,MAAM,EAAG;IACvD;EACD;EAEA,IAAKH,kBAAkB,EAAEI,aAAa,EAAED,MAAM,EAAG;IAChD,OAAOH,kBAAkB,CAACI,aAAa,CAACC,MAAM,CAC7C,CAAEC,GAAG,EAAEC,qBAAqB,KAAM;MACjC,MAAMC,mBAAmB,GAAGT,qBAAqB,CAChDQ,qBAAqB,EACrBN,QACD,CAAC;MACD,IAAKO,mBAAmB,EAAG;QAC1BF,GAAG,CAACF,aAAa,GAAG,CACnB,GAAGE,GAAG,CAACF,aAAa,EACpBI,mBAAmB,CACnB;MACF;MACA,OAAOF,GAAG;IACX,CAAC,EACD;MACCG,KAAK,EAAET,kBAAkB,CAACS,KAAK;MAC/BP,IAAI,EAAEF,kBAAkB,CAACE,IAAI;MAC7BE,aAAa,EAAE;IAChB,CACD,CAAC;EACF;EAEA,MAAMM,eAAe,GAAGV,kBAAkB,EAAEW,MAAM,IAAI,EAAE;EACxD,MAAMC,eAAe,GAAGZ,kBAAkB,EAAEa,OAAO,IAAI,EAAE;EACzD,MAAMC,gBAAgB,GAAGb,QAAQ,CAACc,MAAM,CAAIC,OAAO,IAAM;IACxD,OACC,CAAEJ,eAAe,CAACK,QAAQ,CAAED,OAAO,CAACE,IAAK,CAAC,KACxCF,OAAO,CAACG,QAAQ,KAAKnB,kBAAkB,CAACE,IAAI,IAC7CQ,eAAe,CAACO,QAAQ,CAAED,OAAO,CAACE,IAAK,CAAC,CAAE;EAE7C,CAAE,CAAC;EAEH,IAAK,CAAEJ,gBAAgB,CAACX,MAAM,EAAG;IAChC;EACD;EAEA,OAAO;IACNM,KAAK,EAAET,kBAAkB,CAACS,KAAK;IAC/BP,IAAI,EAAEF,kBAAkB,CAACE,IAAI;IAC7BD,QAAQ,EAAEa;EACX,CAAC;AACF;;AAEA;AACA;AACA;AACA;AACA;AACO,SAASM,8BAA8BA,CAAA,EAAwB;EACrE,MAAMC,kBAAkB,GAAG,CAC1B,GAAGC,yCAA8B,EACjC,GAAGC,gCAAqB,CACxB,CAACC,GAAG,CAAE,CAAE;IAAEtB;EAAK,CAAC,KAAMA,IAAK,CAAC;EAC7B,MAAMuB,eAAe,GAAG,IAAAC,qBAAa,EAAC,CAAC,CAACX,MAAM,CAC7C,CAAE;IAAEb;EAAK,CAAC,KAAM,CAAEmB,kBAAkB,CAACJ,QAAQ,CAAEf,IAAK,CACrD,CAAC;EACD,OAAO,CAAE,GAAGqB,gCAAqB,EAAE,GAAGE,eAAe,CAAE;AACxD","ignoreList":[]}
1
+ {"version":3,"names":["_blocks","require","_constants","getExamplesByCategory","categoryDefinition","examples","slug","length","subcategories","reduce","acc","subcategoryDefinition","subcategoryExamples","title","blocksToInclude","blocks","blocksToExclude","exclude","categoryExamples","filter","example","includes","name","category","getTopLevelStyleBookCategories","reservedCategories","STYLE_BOOK_THEME_SUBCATEGORIES","STYLE_BOOK_CATEGORIES","map","extraCategories","getCategories"],"sources":["@wordpress/edit-site/src/components/style-book/categories.ts"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { getCategories } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport type {\n\tBlockExample,\n\tStyleBookCategory,\n\tCategoryExamples,\n} from './types';\nimport {\n\tSTYLE_BOOK_CATEGORIES,\n\tSTYLE_BOOK_THEME_SUBCATEGORIES,\n} from './constants';\n\n/**\n * Returns category examples for a given category definition and list of examples.\n * @param {StyleBookCategory} categoryDefinition The category definition.\n * @param {BlockExample[]} examples An array of block examples.\n * @return {CategoryExamples|undefined} An object containing the category examples.\n */\nexport function getExamplesByCategory(\n\tcategoryDefinition: StyleBookCategory,\n\texamples: BlockExample[]\n): CategoryExamples | undefined {\n\tif ( ! categoryDefinition?.slug || ! examples?.length ) {\n\t\treturn;\n\t}\n\n\tif ( categoryDefinition?.subcategories?.length ) {\n\t\treturn categoryDefinition.subcategories.reduce(\n\t\t\t( acc, subcategoryDefinition ) => {\n\t\t\t\tconst subcategoryExamples = getExamplesByCategory(\n\t\t\t\t\tsubcategoryDefinition,\n\t\t\t\t\texamples\n\t\t\t\t);\n\t\t\t\tif ( subcategoryExamples ) {\n\t\t\t\t\tacc.subcategories = [\n\t\t\t\t\t\t...acc.subcategories,\n\t\t\t\t\t\tsubcategoryExamples,\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\t\treturn acc;\n\t\t\t},\n\t\t\t{\n\t\t\t\ttitle: categoryDefinition.title,\n\t\t\t\tslug: categoryDefinition.slug,\n\t\t\t\tsubcategories: [],\n\t\t\t}\n\t\t);\n\t}\n\n\tconst blocksToInclude = categoryDefinition?.blocks || [];\n\tconst blocksToExclude = categoryDefinition?.exclude || [];\n\tconst categoryExamples = examples.filter( ( example ) => {\n\t\treturn (\n\t\t\t! blocksToExclude.includes( example.name ) &&\n\t\t\t( example.category === categoryDefinition.slug ||\n\t\t\t\tblocksToInclude.includes( example.name ) )\n\t\t);\n\t} );\n\n\tif ( ! categoryExamples.length ) {\n\t\treturn;\n\t}\n\n\treturn {\n\t\ttitle: categoryDefinition.title,\n\t\tslug: categoryDefinition.slug,\n\t\texamples: categoryExamples,\n\t};\n}\n\n/**\n * Returns category examples for a given category definition and list of examples.\n *\n * @return {StyleBookCategory[]} An array of top-level category definitions.\n */\nexport function getTopLevelStyleBookCategories(): StyleBookCategory[] {\n\tconst reservedCategories = [\n\t\t...STYLE_BOOK_THEME_SUBCATEGORIES,\n\t\t...STYLE_BOOK_CATEGORIES,\n\t].map( ( { slug } ) => slug );\n\tconst extraCategories = getCategories().filter(\n\t\t( { slug } ) => ! reservedCategories.includes( slug )\n\t);\n\treturn [ ...STYLE_BOOK_CATEGORIES, ...extraCategories ];\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AAUA,IAAAC,UAAA,GAAAD,OAAA;AAbA;AACA;AACA;;AAGA;AACA;AACA;;AAWA;AACA;AACA;AACA;AACA;AACA;AACO,SAASE,qBAAqBA,CACpCC,kBAAqC,EACrCC,QAAwB,EACO;EAC/B,IAAK,CAAED,kBAAkB,EAAEE,IAAI,IAAI,CAAED,QAAQ,EAAEE,MAAM,EAAG;IACvD;EACD;EAEA,IAAKH,kBAAkB,EAAEI,aAAa,EAAED,MAAM,EAAG;IAChD,OAAOH,kBAAkB,CAACI,aAAa,CAACC,MAAM,CAC7C,CAAEC,GAAG,EAAEC,qBAAqB,KAAM;MACjC,MAAMC,mBAAmB,GAAGT,qBAAqB,CAChDQ,qBAAqB,EACrBN,QACD,CAAC;MACD,IAAKO,mBAAmB,EAAG;QAC1BF,GAAG,CAACF,aAAa,GAAG,CACnB,GAAGE,GAAG,CAACF,aAAa,EACpBI,mBAAmB,CACnB;MACF;MACA,OAAOF,GAAG;IACX,CAAC,EACD;MACCG,KAAK,EAAET,kBAAkB,CAACS,KAAK;MAC/BP,IAAI,EAAEF,kBAAkB,CAACE,IAAI;MAC7BE,aAAa,EAAE;IAChB,CACD,CAAC;EACF;EAEA,MAAMM,eAAe,GAAGV,kBAAkB,EAAEW,MAAM,IAAI,EAAE;EACxD,MAAMC,eAAe,GAAGZ,kBAAkB,EAAEa,OAAO,IAAI,EAAE;EACzD,MAAMC,gBAAgB,GAAGb,QAAQ,CAACc,MAAM,CAAIC,OAAO,IAAM;IACxD,OACC,CAAEJ,eAAe,CAACK,QAAQ,CAAED,OAAO,CAACE,IAAK,CAAC,KACxCF,OAAO,CAACG,QAAQ,KAAKnB,kBAAkB,CAACE,IAAI,IAC7CQ,eAAe,CAACO,QAAQ,CAAED,OAAO,CAACE,IAAK,CAAC,CAAE;EAE7C,CAAE,CAAC;EAEH,IAAK,CAAEJ,gBAAgB,CAACX,MAAM,EAAG;IAChC;EACD;EAEA,OAAO;IACNM,KAAK,EAAET,kBAAkB,CAACS,KAAK;IAC/BP,IAAI,EAAEF,kBAAkB,CAACE,IAAI;IAC7BD,QAAQ,EAAEa;EACX,CAAC;AACF;;AAEA;AACA;AACA;AACA;AACA;AACO,SAASM,8BAA8BA,CAAA,EAAwB;EACrE,MAAMC,kBAAkB,GAAG,CAC1B,GAAGC,yCAA8B,EACjC,GAAGC,gCAAqB,CACxB,CAACC,GAAG,CAAE,CAAE;IAAEtB;EAAK,CAAC,KAAMA,IAAK,CAAC;EAC7B,MAAMuB,eAAe,GAAG,IAAAC,qBAAa,EAAC,CAAC,CAACX,MAAM,CAC7C,CAAE;IAAEb;EAAK,CAAC,KAAM,CAAEmB,kBAAkB,CAACJ,QAAQ,CAAEf,IAAK,CACrD,CAAC;EACD,OAAO,CAAE,GAAGqB,gCAAqB,EAAE,GAAGE,eAAe,CAAE;AACxD","ignoreList":[]}
@@ -1,3 +1,4 @@
1
+ /* wp:polyfill */
1
2
  "use strict";
2
3
 
3
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -24,20 +25,25 @@ var _jsxRuntime = require("react/jsx-runtime");
24
25
 
25
26
  const ColorExamples = ({
26
27
  colors,
27
- type
28
+ type,
29
+ templateColumns = '1fr 1fr',
30
+ itemHeight = '52px'
28
31
  }) => {
29
32
  if (!colors) {
30
33
  return null;
31
34
  }
32
35
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.__experimentalGrid, {
33
- columns: 2,
36
+ templateColumns: templateColumns,
34
37
  rowGap: 8,
35
38
  columnGap: 16,
36
39
  children: colors.map(color => {
37
40
  const className = type === 'gradients' ? (0, _blockEditor.__experimentalGetGradientClass)(color.slug) : (0, _blockEditor.getColorClassName)('background-color', color.slug);
38
41
  const classes = (0, _clsx.default)('edit-site-style-book__color-example', className);
39
42
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_primitives.View, {
40
- className: classes
43
+ className: classes,
44
+ style: {
45
+ height: itemHeight
46
+ }
41
47
  }, color.slug);
42
48
  })
43
49
  });
@@ -1 +1 @@
1
- {"version":3,"names":["_clsx","_interopRequireDefault","require","_components","_primitives","_blockEditor","_jsxRuntime","ColorExamples","colors","type","jsx","__experimentalGrid","columns","rowGap","columnGap","children","map","color","className","__experimentalGetGradientClass","slug","getColorClassName","classes","clsx","View","_default","exports","default"],"sources":["@wordpress/edit-site/src/components/style-book/color-examples.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __experimentalGrid as Grid } from '@wordpress/components';\nimport { View } from '@wordpress/primitives';\nimport {\n\tgetColorClassName,\n\t__experimentalGetGradientClass,\n} from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport type { Color, Gradient } from './types';\n\nconst ColorExamples = ( { colors, type } ): JSX.Element | null => {\n\tif ( ! colors ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Grid columns={ 2 } rowGap={ 8 } columnGap={ 16 }>\n\t\t\t{ colors.map( ( color: Color | Gradient ) => {\n\t\t\t\tconst className =\n\t\t\t\t\ttype === 'gradients'\n\t\t\t\t\t\t? __experimentalGetGradientClass( color.slug )\n\t\t\t\t\t\t: getColorClassName( 'background-color', color.slug );\n\t\t\t\tconst classes = clsx(\n\t\t\t\t\t'edit-site-style-book__color-example',\n\t\t\t\t\tclassName\n\t\t\t\t);\n\n\t\t\t\treturn <View key={ color.slug } className={ classes } />;\n\t\t\t} ) }\n\t\t</Grid>\n\t);\n};\n\nexport default ColorExamples;\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AAGiC,IAAAI,WAAA,GAAAJ,OAAA;AAbjC;AACA;AACA;;AAGA;AACA;AACA;;AAQA;AACA;AACA;;AAGA,MAAMK,aAAa,GAAGA,CAAE;EAAEC,MAAM;EAAEC;AAAK,CAAC,KAA0B;EACjE,IAAK,CAAED,MAAM,EAAG;IACf,OAAO,IAAI;EACZ;EAEA,oBACC,IAAAF,WAAA,CAAAI,GAAA,EAACP,WAAA,CAAAQ,kBAAI;IAACC,OAAO,EAAG,CAAG;IAACC,MAAM,EAAG,CAAG;IAACC,SAAS,EAAG,EAAI;IAAAC,QAAA,EAC9CP,MAAM,CAACQ,GAAG,CAAIC,KAAuB,IAAM;MAC5C,MAAMC,SAAS,GACdT,IAAI,KAAK,WAAW,GACjB,IAAAU,2CAA8B,EAAEF,KAAK,CAACG,IAAK,CAAC,GAC5C,IAAAC,8BAAiB,EAAE,kBAAkB,EAAEJ,KAAK,CAACG,IAAK,CAAC;MACvD,MAAME,OAAO,GAAG,IAAAC,aAAI,EACnB,qCAAqC,EACrCL,SACD,CAAC;MAED,oBAAO,IAAAZ,WAAA,CAAAI,GAAA,EAACN,WAAA,CAAAoB,IAAI;QAAoBN,SAAS,EAAGI;MAAS,GAAlCL,KAAK,CAACG,IAA8B,CAAC;IACzD,CAAE;EAAC,CACE,CAAC;AAET,CAAC;AAAC,IAAAK,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEapB,aAAa","ignoreList":[]}
1
+ {"version":3,"names":["_clsx","_interopRequireDefault","require","_components","_primitives","_blockEditor","_jsxRuntime","ColorExamples","colors","type","templateColumns","itemHeight","jsx","__experimentalGrid","rowGap","columnGap","children","map","color","className","__experimentalGetGradientClass","slug","getColorClassName","classes","clsx","View","style","height","_default","exports","default"],"sources":["@wordpress/edit-site/src/components/style-book/color-examples.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __experimentalGrid as Grid } from '@wordpress/components';\nimport { View } from '@wordpress/primitives';\nimport {\n\tgetColorClassName,\n\t__experimentalGetGradientClass,\n} from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport type { Color, Gradient } from './types';\n\ntype Props = {\n\tcolors: Color[] | Gradient[];\n\ttype: 'colors' | 'gradients';\n\ttemplateColumns?: string | number;\n\titemHeight?: string;\n};\n\nconst ColorExamples = ( {\n\tcolors,\n\ttype,\n\ttemplateColumns = '1fr 1fr',\n\titemHeight = '52px',\n}: Props ): JSX.Element | null => {\n\tif ( ! colors ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Grid templateColumns={ templateColumns } rowGap={ 8 } columnGap={ 16 }>\n\t\t\t{ colors.map( ( color: Color | Gradient ) => {\n\t\t\t\tconst className =\n\t\t\t\t\ttype === 'gradients'\n\t\t\t\t\t\t? __experimentalGetGradientClass( color.slug )\n\t\t\t\t\t\t: getColorClassName( 'background-color', color.slug );\n\t\t\t\tconst classes = clsx(\n\t\t\t\t\t'edit-site-style-book__color-example',\n\t\t\t\t\tclassName\n\t\t\t\t);\n\n\t\t\t\treturn (\n\t\t\t\t\t<View\n\t\t\t\t\t\tkey={ color.slug }\n\t\t\t\t\t\tclassName={ classes }\n\t\t\t\t\t\tstyle={ { height: itemHeight } }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</Grid>\n\t);\n};\n\nexport default ColorExamples;\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AAGiC,IAAAI,WAAA,GAAAJ,OAAA;AAbjC;AACA;AACA;;AAGA;AACA;AACA;;AAQA;AACA;AACA;;AAUA,MAAMK,aAAa,GAAGA,CAAE;EACvBC,MAAM;EACNC,IAAI;EACJC,eAAe,GAAG,SAAS;EAC3BC,UAAU,GAAG;AACP,CAAC,KAA0B;EACjC,IAAK,CAAEH,MAAM,EAAG;IACf,OAAO,IAAI;EACZ;EAEA,oBACC,IAAAF,WAAA,CAAAM,GAAA,EAACT,WAAA,CAAAU,kBAAI;IAACH,eAAe,EAAGA,eAAiB;IAACI,MAAM,EAAG,CAAG;IAACC,SAAS,EAAG,EAAI;IAAAC,QAAA,EACpER,MAAM,CAACS,GAAG,CAAIC,KAAuB,IAAM;MAC5C,MAAMC,SAAS,GACdV,IAAI,KAAK,WAAW,GACjB,IAAAW,2CAA8B,EAAEF,KAAK,CAACG,IAAK,CAAC,GAC5C,IAAAC,8BAAiB,EAAE,kBAAkB,EAAEJ,KAAK,CAACG,IAAK,CAAC;MACvD,MAAME,OAAO,GAAG,IAAAC,aAAI,EACnB,qCAAqC,EACrCL,SACD,CAAC;MAED,oBACC,IAAAb,WAAA,CAAAM,GAAA,EAACR,WAAA,CAAAqB,IAAI;QAEJN,SAAS,EAAGI,OAAS;QACrBG,KAAK,EAAG;UAAEC,MAAM,EAAEhB;QAAW;MAAG,GAF1BO,KAAK,CAACG,IAGZ,CAAC;IAEJ,CAAE;EAAC,CACE,CAAC;AAET,CAAC;AAAC,IAAAO,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEavB,aAAa","ignoreList":[]}
@@ -170,7 +170,6 @@ const STYLE_BOOK_IFRAME_STYLES = exports.STYLE_BOOK_IFRAME_STYLES = `
170
170
  }
171
171
 
172
172
  .edit-site-style-book__color-example {
173
- height: 32px;
174
173
  border: 1px solid color-mix( in srgb, currentColor 10%, transparent );
175
174
  }
176
175
 
@@ -1 +1 @@
1
- {"version":3,"names":["_i18n","require","STYLE_BOOK_COLOR_GROUPS","exports","slug","title","__","origin","type","STYLE_BOOK_THEME_SUBCATEGORIES","blocks","exclude","STYLE_BOOK_CATEGORIES","subcategories","include","ROOT_CONTAINER","STYLE_BOOK_IFRAME_STYLES"],"sources":["@wordpress/edit-site/src/components/style-book/constants.ts"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport type { StyleBookCategory, StyleBookColorGroup } from './types';\n\nexport const STYLE_BOOK_COLOR_GROUPS: StyleBookColorGroup[] = [\n\t{\n\t\tslug: 'theme-colors',\n\t\ttitle: __( 'Theme Colors' ),\n\t\torigin: 'theme',\n\t\ttype: 'colors',\n\t},\n\t{\n\t\tslug: 'theme-gradients',\n\t\ttitle: __( 'Theme Gradients' ),\n\t\torigin: 'theme',\n\t\ttype: 'gradients',\n\t},\n\t{\n\t\tslug: 'custom-colors',\n\t\ttitle: __( 'Custom Colors' ),\n\t\torigin: 'custom',\n\t\ttype: 'colors',\n\t},\n\t{\n\t\tslug: 'custom-gradients',\n\t\ttitle: __( 'Custom Gradients' ),\n\t\torigin: 'custom', // User.\n\t\ttype: 'gradients',\n\t},\n\t{\n\t\tslug: 'duotones',\n\t\ttitle: __( 'Duotones' ),\n\t\torigin: 'theme',\n\t\ttype: 'duotones',\n\t},\n\t{\n\t\tslug: 'default-colors',\n\t\ttitle: __( 'Default Colors' ),\n\t\torigin: 'default',\n\t\ttype: 'colors',\n\t},\n\t{\n\t\tslug: 'default-gradients',\n\t\ttitle: __( 'Default Gradients' ),\n\t\torigin: 'default',\n\t\ttype: 'gradients',\n\t},\n];\n\nexport const STYLE_BOOK_THEME_SUBCATEGORIES: Omit<\n\tStyleBookCategory,\n\t'subcategories'\n>[] = [\n\t{\n\t\tslug: 'site-identity',\n\t\ttitle: __( 'Site Identity' ),\n\t\tblocks: [ 'core/site-logo', 'core/site-title', 'core/site-tagline' ],\n\t},\n\t{\n\t\tslug: 'design',\n\t\ttitle: __( 'Design' ),\n\t\tblocks: [ 'core/navigation', 'core/avatar', 'core/post-time-to-read' ],\n\t\texclude: [ 'core/home-link', 'core/navigation-link' ],\n\t},\n\t{\n\t\tslug: 'posts',\n\t\ttitle: __( 'Posts' ),\n\t\tblocks: [\n\t\t\t'core/post-title',\n\t\t\t'core/post-excerpt',\n\t\t\t'core/post-author',\n\t\t\t'core/post-author-name',\n\t\t\t'core/post-author-biography',\n\t\t\t'core/post-date',\n\t\t\t'core/post-terms',\n\t\t\t'core/term-description',\n\t\t\t'core/query-title',\n\t\t\t'core/query-no-results',\n\t\t\t'core/query-pagination',\n\t\t\t'core/query-numbers',\n\t\t],\n\t},\n\t{\n\t\tslug: 'comments',\n\t\ttitle: __( 'Comments' ),\n\t\tblocks: [\n\t\t\t'core/comments-title',\n\t\t\t'core/comments-pagination',\n\t\t\t'core/comments-pagination-numbers',\n\t\t\t'core/comments',\n\t\t\t'core/comments-author-name',\n\t\t\t'core/comment-content',\n\t\t\t'core/comment-date',\n\t\t\t'core/comment-edit-link',\n\t\t\t'core/comment-reply-link',\n\t\t\t'core/comment-template',\n\t\t\t'core/post-comments-count',\n\t\t\t'core/post-comments-link',\n\t\t],\n\t},\n];\n\nexport const STYLE_BOOK_CATEGORIES: StyleBookCategory[] = [\n\t{\n\t\tslug: 'overview',\n\t\ttitle: __( 'Overview' ),\n\t\tblocks: [],\n\t},\n\t{\n\t\tslug: 'text',\n\t\ttitle: __( 'Text' ),\n\t\tblocks: [\n\t\t\t'core/post-content',\n\t\t\t'core/home-link',\n\t\t\t'core/navigation-link',\n\t\t],\n\t},\n\t{\n\t\tslug: 'colors',\n\t\ttitle: __( 'Colors' ),\n\t\tblocks: [],\n\t},\n\t{\n\t\tslug: 'theme',\n\t\ttitle: __( 'Theme' ),\n\t\tsubcategories: STYLE_BOOK_THEME_SUBCATEGORIES,\n\t},\n\t{\n\t\tslug: 'media',\n\t\ttitle: __( 'Media' ),\n\t\tblocks: [ 'core/post-featured-image' ],\n\t},\n\t{\n\t\tslug: 'widgets',\n\t\ttitle: __( 'Widgets' ),\n\t\tblocks: [],\n\t},\n\t{\n\t\tslug: 'embed',\n\t\ttitle: __( 'Embeds' ),\n\t\tinclude: [],\n\t},\n];\n\n// Forming a \"block formatting context\" to prevent margin collapsing.\n// @see https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Block_formatting_context\nconst ROOT_CONTAINER = `\n\t.is-root-container {\n\t\tdisplay: flow-root;\n\t}\n`;\n// The content area of the Style Book is rendered within an iframe so that global styles\n// are applied to elements within the entire content area. To support elements that are\n// not part of the block previews, such as headings and layout for the block previews,\n// additional CSS rules need to be passed into the iframe. These are hard-coded below.\n// Note that button styles are unset, and then focus rules from the `Button` component are\n// applied to the `button` element, targeted via `.edit-site-style-book__example`.\n// This is to ensure that browser default styles for buttons are not applied to the previews.\nexport const STYLE_BOOK_IFRAME_STYLES = `\n\tbody {\n\t\tposition: relative;\n\t\tpadding: 32px !important;\n\t}\n\n\t${ ROOT_CONTAINER }\n\n\t.edit-site-style-book__examples {\n\t\tmax-width: 1200px;\n\t\tmargin: 0 auto;\n\t}\n\n\t.edit-site-style-book__example {\n\t max-width: 900px;\n\t\tborder-radius: 2px;\n\t\tcursor: pointer;\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tgap: 40px;\n\t\tpadding: 16px;\n\t\twidth: 100%;\n\t\tbox-sizing: border-box;\n\t\tscroll-margin-top: 32px;\n\t\tscroll-margin-bottom: 32px;\n\t\tmargin: 0 auto 40px auto;\n\t}\n\n\t.edit-site-style-book__example.is-selected {\n\t\tbox-shadow: 0 0 0 1px var(--wp-components-color-accent, var(--wp-admin-theme-color, #007cba));\n\t}\n\n\t.edit-site-style-book__example.is-disabled-example {\n\t\tpointer-events: none;\n\t}\n\n\t.edit-site-style-book__example:focus:not(:disabled) {\n\t\tbox-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-components-color-accent, var(--wp-admin-theme-color, #007cba));\n\t\toutline: 3px solid transparent;\n\t}\n\n\t.edit-site-style-book__duotone-example > div:first-child {\n\t\tdisplay: flex;\n\t\taspect-ratio: 16 / 9;\n\t\tgrid-row: span 1;\n\t\tgrid-column: span 2;\n\t}\n\t.edit-site-style-book__duotone-example img {\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tobject-fit: cover;\n\t}\n\t.edit-site-style-book__duotone-example > div:not(:first-child) {\n\t\theight: 20px;\n\t\tborder: 1px solid color-mix( in srgb, currentColor 10%, transparent );\n\t}\n\n\t.edit-site-style-book__color-example {\n\t\theight: 32px;\n\t\tborder: 1px solid color-mix( in srgb, currentColor 10%, transparent );\n\t}\n\n\t.edit-site-style-book__subcategory-title,\n\t.edit-site-style-book__example-title {\n\t\tfont-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Oxygen-Sans, Ubuntu, Cantarell, \"Helvetica Neue\", sans-serif;\n\t\tfont-size: 13px;\n\t\tfont-weight: normal;\n\t\tline-height: normal;\n\t\tmargin: 0;\n\t\ttext-align: left;\n\t\tpadding-top: 8px;\n\t\tborder-top: 1px solid color-mix( in srgb, currentColor 10%, transparent );\n\t\tcolor: color-mix( in srgb, currentColor 60%, transparent );\n\t}\n\n\t.edit-site-style-book__subcategory-title {\n\t\tfont-size: 16px;\n\t\tmargin-bottom: 40px;\n \tborder-bottom: 1px solid #ddd;\n \tpadding-bottom: 8px;\n\t}\n\n\t.edit-site-style-book__example-preview {\n\t\twidth: 100%;\n\t}\n\n\t.edit-site-style-book__example-preview .block-editor-block-list__insertion-point,\n\t.edit-site-style-book__example-preview .block-list-appender {\n\t\tdisplay: none;\n\t}\n\t:where(.is-root-container > .wp-block:first-child) {\n\t\tmargin-top: 0;\n\t}\n\t:where(.is-root-container > .wp-block:last-child) {\n\t\tmargin-bottom: 0;\n\t}\n`;\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGA;AACA;AACA;;AAGO,MAAMC,uBAA8C,GAAAC,OAAA,CAAAD,uBAAA,GAA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AE,EAAE,OAAQ,CAAC;EACpBO,aAAa,EAAEJ;AAChB,CAAC,EACD;EACCL,IAAI,EAAE,OAAO;EACbC,KAAK,EAAE,IAAAC,QAAE,EAAE,OAAQ,CAAC;EACpBI,MAAM,EAAE,CAAE,0BAA0B;AACrC,CAAC,EACD;EACCN,IAAI,EAAE,SAAS;EACfC,KAAK,EAAE,IAAAC,QAAE,EAAE,SAAU,CAAC;EACtBI,MAAM,EAAE;AACT,CAAC,EACD;EACCN,IAAI,EAAE,OAAO;EACbC,KAAK,EAAE,IAAAC,QAAE,EAAE,QAAS,CAAC;EACrBQ,OAAO,EAAE;AACV,CAAC,CACD;;AAED;AACA;AACA,MAAMC,cAAc,GAAG;AACvB;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,wBAAwB,GAAAb,OAAA,CAAAa,wBAAA,GAAG;AACxC;AACA;AACA;AACA;AACA;AACA,GAAID,cAAc;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_i18n","require","STYLE_BOOK_COLOR_GROUPS","exports","slug","title","__","origin","type","STYLE_BOOK_THEME_SUBCATEGORIES","blocks","exclude","STYLE_BOOK_CATEGORIES","subcategories","include","ROOT_CONTAINER","STYLE_BOOK_IFRAME_STYLES"],"sources":["@wordpress/edit-site/src/components/style-book/constants.ts"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport type { StyleBookCategory, StyleBookColorGroup } from './types';\n\nexport const STYLE_BOOK_COLOR_GROUPS: StyleBookColorGroup[] = [\n\t{\n\t\tslug: 'theme-colors',\n\t\ttitle: __( 'Theme Colors' ),\n\t\torigin: 'theme',\n\t\ttype: 'colors',\n\t},\n\t{\n\t\tslug: 'theme-gradients',\n\t\ttitle: __( 'Theme Gradients' ),\n\t\torigin: 'theme',\n\t\ttype: 'gradients',\n\t},\n\t{\n\t\tslug: 'custom-colors',\n\t\ttitle: __( 'Custom Colors' ),\n\t\torigin: 'custom',\n\t\ttype: 'colors',\n\t},\n\t{\n\t\tslug: 'custom-gradients',\n\t\ttitle: __( 'Custom Gradients' ),\n\t\torigin: 'custom', // User.\n\t\ttype: 'gradients',\n\t},\n\t{\n\t\tslug: 'duotones',\n\t\ttitle: __( 'Duotones' ),\n\t\torigin: 'theme',\n\t\ttype: 'duotones',\n\t},\n\t{\n\t\tslug: 'default-colors',\n\t\ttitle: __( 'Default Colors' ),\n\t\torigin: 'default',\n\t\ttype: 'colors',\n\t},\n\t{\n\t\tslug: 'default-gradients',\n\t\ttitle: __( 'Default Gradients' ),\n\t\torigin: 'default',\n\t\ttype: 'gradients',\n\t},\n];\n\nexport const STYLE_BOOK_THEME_SUBCATEGORIES: Omit<\n\tStyleBookCategory,\n\t'subcategories'\n>[] = [\n\t{\n\t\tslug: 'site-identity',\n\t\ttitle: __( 'Site Identity' ),\n\t\tblocks: [ 'core/site-logo', 'core/site-title', 'core/site-tagline' ],\n\t},\n\t{\n\t\tslug: 'design',\n\t\ttitle: __( 'Design' ),\n\t\tblocks: [ 'core/navigation', 'core/avatar', 'core/post-time-to-read' ],\n\t\texclude: [ 'core/home-link', 'core/navigation-link' ],\n\t},\n\t{\n\t\tslug: 'posts',\n\t\ttitle: __( 'Posts' ),\n\t\tblocks: [\n\t\t\t'core/post-title',\n\t\t\t'core/post-excerpt',\n\t\t\t'core/post-author',\n\t\t\t'core/post-author-name',\n\t\t\t'core/post-author-biography',\n\t\t\t'core/post-date',\n\t\t\t'core/post-terms',\n\t\t\t'core/term-description',\n\t\t\t'core/query-title',\n\t\t\t'core/query-no-results',\n\t\t\t'core/query-pagination',\n\t\t\t'core/query-numbers',\n\t\t],\n\t},\n\t{\n\t\tslug: 'comments',\n\t\ttitle: __( 'Comments' ),\n\t\tblocks: [\n\t\t\t'core/comments-title',\n\t\t\t'core/comments-pagination',\n\t\t\t'core/comments-pagination-numbers',\n\t\t\t'core/comments',\n\t\t\t'core/comments-author-name',\n\t\t\t'core/comment-content',\n\t\t\t'core/comment-date',\n\t\t\t'core/comment-edit-link',\n\t\t\t'core/comment-reply-link',\n\t\t\t'core/comment-template',\n\t\t\t'core/post-comments-count',\n\t\t\t'core/post-comments-link',\n\t\t],\n\t},\n];\n\nexport const STYLE_BOOK_CATEGORIES: StyleBookCategory[] = [\n\t{\n\t\tslug: 'overview',\n\t\ttitle: __( 'Overview' ),\n\t\tblocks: [],\n\t},\n\t{\n\t\tslug: 'text',\n\t\ttitle: __( 'Text' ),\n\t\tblocks: [\n\t\t\t'core/post-content',\n\t\t\t'core/home-link',\n\t\t\t'core/navigation-link',\n\t\t],\n\t},\n\t{\n\t\tslug: 'colors',\n\t\ttitle: __( 'Colors' ),\n\t\tblocks: [],\n\t},\n\t{\n\t\tslug: 'theme',\n\t\ttitle: __( 'Theme' ),\n\t\tsubcategories: STYLE_BOOK_THEME_SUBCATEGORIES,\n\t},\n\t{\n\t\tslug: 'media',\n\t\ttitle: __( 'Media' ),\n\t\tblocks: [ 'core/post-featured-image' ],\n\t},\n\t{\n\t\tslug: 'widgets',\n\t\ttitle: __( 'Widgets' ),\n\t\tblocks: [],\n\t},\n\t{\n\t\tslug: 'embed',\n\t\ttitle: __( 'Embeds' ),\n\t\tinclude: [],\n\t},\n];\n\n// Forming a \"block formatting context\" to prevent margin collapsing.\n// @see https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Block_formatting_context\nconst ROOT_CONTAINER = `\n\t.is-root-container {\n\t\tdisplay: flow-root;\n\t}\n`;\n// The content area of the Style Book is rendered within an iframe so that global styles\n// are applied to elements within the entire content area. To support elements that are\n// not part of the block previews, such as headings and layout for the block previews,\n// additional CSS rules need to be passed into the iframe. These are hard-coded below.\n// Note that button styles are unset, and then focus rules from the `Button` component are\n// applied to the `button` element, targeted via `.edit-site-style-book__example`.\n// This is to ensure that browser default styles for buttons are not applied to the previews.\nexport const STYLE_BOOK_IFRAME_STYLES = `\n\tbody {\n\t\tposition: relative;\n\t\tpadding: 32px !important;\n\t}\n\n\t${ ROOT_CONTAINER }\n\n\t.edit-site-style-book__examples {\n\t\tmax-width: 1200px;\n\t\tmargin: 0 auto;\n\t}\n\n\t.edit-site-style-book__example {\n\t max-width: 900px;\n\t\tborder-radius: 2px;\n\t\tcursor: pointer;\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tgap: 40px;\n\t\tpadding: 16px;\n\t\twidth: 100%;\n\t\tbox-sizing: border-box;\n\t\tscroll-margin-top: 32px;\n\t\tscroll-margin-bottom: 32px;\n\t\tmargin: 0 auto 40px auto;\n\t}\n\n\t.edit-site-style-book__example.is-selected {\n\t\tbox-shadow: 0 0 0 1px var(--wp-components-color-accent, var(--wp-admin-theme-color, #007cba));\n\t}\n\n\t.edit-site-style-book__example.is-disabled-example {\n\t\tpointer-events: none;\n\t}\n\n\t.edit-site-style-book__example:focus:not(:disabled) {\n\t\tbox-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-components-color-accent, var(--wp-admin-theme-color, #007cba));\n\t\toutline: 3px solid transparent;\n\t}\n\n\t.edit-site-style-book__duotone-example > div:first-child {\n\t\tdisplay: flex;\n\t\taspect-ratio: 16 / 9;\n\t\tgrid-row: span 1;\n\t\tgrid-column: span 2;\n\t}\n\t.edit-site-style-book__duotone-example img {\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tobject-fit: cover;\n\t}\n\t.edit-site-style-book__duotone-example > div:not(:first-child) {\n\t\theight: 20px;\n\t\tborder: 1px solid color-mix( in srgb, currentColor 10%, transparent );\n\t}\n\n\t.edit-site-style-book__color-example {\n\t\tborder: 1px solid color-mix( in srgb, currentColor 10%, transparent );\n\t}\n\n\t.edit-site-style-book__subcategory-title,\n\t.edit-site-style-book__example-title {\n\t\tfont-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Oxygen-Sans, Ubuntu, Cantarell, \"Helvetica Neue\", sans-serif;\n\t\tfont-size: 13px;\n\t\tfont-weight: normal;\n\t\tline-height: normal;\n\t\tmargin: 0;\n\t\ttext-align: left;\n\t\tpadding-top: 8px;\n\t\tborder-top: 1px solid color-mix( in srgb, currentColor 10%, transparent );\n\t\tcolor: color-mix( in srgb, currentColor 60%, transparent );\n\t}\n\n\t.edit-site-style-book__subcategory-title {\n\t\tfont-size: 16px;\n\t\tmargin-bottom: 40px;\n \tborder-bottom: 1px solid #ddd;\n \tpadding-bottom: 8px;\n\t}\n\n\t.edit-site-style-book__example-preview {\n\t\twidth: 100%;\n\t}\n\n\t.edit-site-style-book__example-preview .block-editor-block-list__insertion-point,\n\t.edit-site-style-book__example-preview .block-list-appender {\n\t\tdisplay: none;\n\t}\n\t:where(.is-root-container > .wp-block:first-child) {\n\t\tmargin-top: 0;\n\t}\n\t:where(.is-root-container > .wp-block:last-child) {\n\t\tmargin-bottom: 0;\n\t}\n`;\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGA;AACA;AACA;;AAGO,MAAMC,uBAA8C,GAAAC,OAAA,CAAAD,uBAAA,GAAG,CAC7D;EACCE,IAAI,EAAE,cAAc;EACpBC,KAAK,EAAE,IAAAC,QAAE,EAAE,cAAe,CAAC;EAC3BC,MAAM,EAAE,OAAO;EACfC,IAAI,EAAE;AACP,CAAC,EACD;EAC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M,EAAE,CAAE,0BAA0B;AACrC,CAAC,EACD;EACCN,IAAI,EAAE,SAAS;EACfC,KAAK,EAAE,IAAAC,QAAE,EAAE,SAAU,CAAC;EACtBI,MAAM,EAAE;AACT,CAAC,EACD;EACCN,IAAI,EAAE,OAAO;EACbC,KAAK,EAAE,IAAAC,QAAE,EAAE,QAAS,CAAC;EACrBQ,OAAO,EAAE;AACV,CAAC,CACD;;AAED;AACA;AACA,MAAMC,cAAc,GAAG;AACvB;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,wBAAwB,GAAAb,OAAA,CAAAa,wBAAA,GAAG;AACxC;AACA;AACA;AACA;AACA;AACA,GAAID,cAAc;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC","ignoreList":[]}
@@ -1,3 +1,4 @@
1
+ /* wp:polyfill */
1
2
  "use strict";
2
3
 
3
4
  Object.defineProperty(exports, "__esModule", {
@@ -1 +1 @@
1
- {"version":3,"names":["_components","require","_primitives","_jsxRuntime","DuotoneExamples","duotones","jsx","__experimentalGrid","columns","rowGap","columnGap","children","map","duotone","jsxs","className","View","alt","slug","src","style","filter","colors","color","backgroundColor","_default","exports","default"],"sources":["@wordpress/edit-site/src/components/style-book/duotone-examples.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __experimentalGrid as Grid } from '@wordpress/components';\nimport { View } from '@wordpress/primitives';\n\n/**\n * Internal dependencies\n */\nimport type { Duotone } from './types';\n\nconst DuotoneExamples = ( { duotones } ): JSX.Element | null => {\n\tif ( ! duotones ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Grid columns={ 2 } rowGap={ 16 } columnGap={ 16 }>\n\t\t\t{ duotones.map( ( duotone: Duotone ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<Grid\n\t\t\t\t\t\tkey={ duotone.slug }\n\t\t\t\t\t\tclassName=\"edit-site-style-book__duotone-example\"\n\t\t\t\t\t\tcolumns={ 2 }\n\t\t\t\t\t\trowGap={ 8 }\n\t\t\t\t\t\tcolumnGap={ 8 }\n\t\t\t\t\t>\n\t\t\t\t\t\t<View>\n\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\talt={ `Duotone example: ${ duotone.slug }` }\n\t\t\t\t\t\t\t\tsrc=\"https://s.w.org/images/core/5.3/MtBlanc1.jpg\"\n\t\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\t\tfilter: `url(#wp-duotone-${ duotone.slug })`,\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</View>\n\t\t\t\t\t\t{ duotone.colors.map( ( color ) => {\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<View\n\t\t\t\t\t\t\t\t\tkey={ color }\n\t\t\t\t\t\t\t\t\tclassName=\"edit-site-style-book__color-example\"\n\t\t\t\t\t\t\t\t\tstyle={ { backgroundColor: color } }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} ) }\n\t\t\t\t\t</Grid>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</Grid>\n\t);\n};\n\nexport default DuotoneExamples;\n"],"mappings":";;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAA6C,IAAAE,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"version":3,"names":["_components","require","_primitives","_jsxRuntime","DuotoneExamples","duotones","jsx","__experimentalGrid","columns","rowGap","columnGap","children","map","duotone","jsxs","className","View","alt","slug","src","style","filter","colors","color","backgroundColor","_default","exports","default"],"sources":["@wordpress/edit-site/src/components/style-book/duotone-examples.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __experimentalGrid as Grid } from '@wordpress/components';\nimport { View } from '@wordpress/primitives';\n\n/**\n * Internal dependencies\n */\nimport type { Duotone } from './types';\n\nconst DuotoneExamples = ( { duotones } ): JSX.Element | null => {\n\tif ( ! duotones ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Grid columns={ 2 } rowGap={ 16 } columnGap={ 16 }>\n\t\t\t{ duotones.map( ( duotone: Duotone ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<Grid\n\t\t\t\t\t\tkey={ duotone.slug }\n\t\t\t\t\t\tclassName=\"edit-site-style-book__duotone-example\"\n\t\t\t\t\t\tcolumns={ 2 }\n\t\t\t\t\t\trowGap={ 8 }\n\t\t\t\t\t\tcolumnGap={ 8 }\n\t\t\t\t\t>\n\t\t\t\t\t\t<View>\n\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\talt={ `Duotone example: ${ duotone.slug }` }\n\t\t\t\t\t\t\t\tsrc=\"https://s.w.org/images/core/5.3/MtBlanc1.jpg\"\n\t\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\t\tfilter: `url(#wp-duotone-${ duotone.slug })`,\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</View>\n\t\t\t\t\t\t{ duotone.colors.map( ( color ) => {\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<View\n\t\t\t\t\t\t\t\t\tkey={ color }\n\t\t\t\t\t\t\t\t\tclassName=\"edit-site-style-book__color-example\"\n\t\t\t\t\t\t\t\t\tstyle={ { backgroundColor: color } }\n\t\t\t\t\t\t\t\t/>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AG;cAAEI,eAAe,EAAED;YAAM;UAAG,GAF9BA,KAGN,CAAC;QAEJ,CAAE,CAAC;MAAA,GAvBGV,OAAO,CAACK,IAwBT,CAAC;IAET,CAAE;EAAC,CACE,CAAC;AAET,CAAC;AAAC,IAAAO,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEavB,eAAe","ignoreList":[]}
@@ -1,3 +1,4 @@
1
+ /* wp:polyfill */
1
2
  "use strict";
2
3
 
3
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -64,8 +65,8 @@ var _jsxRuntime = require("react/jsx-runtime");
64
65
  function getOverviewBlockExamples(colors) {
65
66
  const examples = [];
66
67
 
67
- // Get theme palette from colors.
68
- const themePalette = colors.colors.find(origin => origin.slug === 'theme');
68
+ // Get theme palette from colors if they exist.
69
+ const themePalette = colors?.colors.find(origin => origin.slug === 'theme');
69
70
  if (themePalette) {
70
71
  const themeColorexample = {
71
72
  name: 'theme-colors',
@@ -73,39 +74,56 @@ function getOverviewBlockExamples(colors) {
73
74
  category: 'overview',
74
75
  content: /*#__PURE__*/(0, _jsxRuntime.jsx)(_colorExamples.default, {
75
76
  colors: themePalette.colors,
76
- type: colors
77
+ type: colors,
78
+ templateColumns: "repeat(auto-fill, minmax( 200px, 1fr ))",
79
+ itemHeight: "32px"
77
80
  })
78
81
  };
79
82
  examples.push(themeColorexample);
80
83
  }
81
- const headingBlock = (0, _blocks.createBlock)('core/heading', {
82
- content: (0, _i18n.__)(`AaBbCcDdEeFfGgHhiiJjKkLIMmNnOoPpQakRrssTtUuVVWwXxxYyZzOl23356789X{(…)},2!*&:/A@HELFO™`),
83
- level: 1
84
- });
85
- const firstParagraphBlock = (0, _blocks.createBlock)('core/paragraph', {
86
- content: (0, _i18n.__)(`A paragraph in a website refers to a distinct block of text that is used to present and organize information. It is a fundamental unit of content in web design and is typically composed of a group of related sentences or thoughts focused on a particular topic or idea. Paragraphs play a crucial role in improving the readability and user experience of a website. They break down the text into smaller, manageable chunks, allowing readers to scan the content more easily.`)
87
- });
88
- const secondParagraphBlock = (0, _blocks.createBlock)('core/paragraph', {
89
- content: (0, _i18n.__)(`Additionally, paragraphs help structure the flow of information and provide logical breaks between different concepts or pieces of information. In terms of formatting, paragraphs in websites are commonly denoted by a vertical gap or indentation between each block of text. This visual separation helps visually distinguish one paragraph from another, creating a clear and organized layout that guides the reader through the content smoothly.`)
90
- });
91
- const textExample = {
92
- name: 'typography',
93
- title: (0, _i18n.__)('Typography'),
94
- category: 'overview',
95
- blocks: [headingBlock, (0, _blocks.createBlock)('core/group', {
96
- layout: {
97
- type: 'grid',
98
- columnCount: 2,
99
- minimumColumnWidth: '12rem'
100
- },
101
- style: {
102
- spacing: {
103
- blockGap: '1.5rem'
84
+
85
+ // Get examples for typography blocks.
86
+ const typographyBlockExamples = [];
87
+ if ((0, _blocks.getBlockType)('core/heading')) {
88
+ const headingBlock = (0, _blocks.createBlock)('core/heading', {
89
+ content: (0, _i18n.__)(`AaBbCcDdEeFfGgHhiiJjKkLIMmNnOoPpQakRrssTtUuVVWwXxxYyZzOl23356789X{(…)},2!*&:/A@HELFO™`),
90
+ level: 1
91
+ });
92
+ typographyBlockExamples.push(headingBlock);
93
+ }
94
+ if ((0, _blocks.getBlockType)('core/paragraph')) {
95
+ const firstParagraphBlock = (0, _blocks.createBlock)('core/paragraph', {
96
+ content: (0, _i18n.__)(`A paragraph in a website refers to a distinct block of text that is used to present and organize information. It is a fundamental unit of content in web design and is typically composed of a group of related sentences or thoughts focused on a particular topic or idea. Paragraphs play a crucial role in improving the readability and user experience of a website. They break down the text into smaller, manageable chunks, allowing readers to scan the content more easily.`)
97
+ });
98
+ const secondParagraphBlock = (0, _blocks.createBlock)('core/paragraph', {
99
+ content: (0, _i18n.__)(`Additionally, paragraphs help structure the flow of information and provide logical breaks between different concepts or pieces of information. In terms of formatting, paragraphs in websites are commonly denoted by a vertical gap or indentation between each block of text. This visual separation helps visually distinguish one paragraph from another, creating a clear and organized layout that guides the reader through the content smoothly.`)
100
+ });
101
+ if ((0, _blocks.getBlockType)('core/group')) {
102
+ const groupBlock = (0, _blocks.createBlock)('core/group', {
103
+ layout: {
104
+ type: 'grid',
105
+ columnCount: 2,
106
+ minimumColumnWidth: '12rem'
107
+ },
108
+ style: {
109
+ spacing: {
110
+ blockGap: '1.5rem'
111
+ }
104
112
  }
105
- }
106
- }, [firstParagraphBlock, secondParagraphBlock])]
107
- };
108
- examples.push(textExample);
113
+ }, [firstParagraphBlock, secondParagraphBlock]);
114
+ typographyBlockExamples.push(groupBlock);
115
+ } else {
116
+ typographyBlockExamples.push(firstParagraphBlock);
117
+ }
118
+ }
119
+ if (!!typographyBlockExamples.length) {
120
+ examples.push({
121
+ name: 'typography',
122
+ title: (0, _i18n.__)('Typography'),
123
+ category: 'overview',
124
+ blocks: typographyBlockExamples
125
+ });
126
+ }
109
127
  const otherBlockExamples = ['core/image', 'core/separator', 'core/buttons', 'core/pullquote', 'core/search'];
110
128
 
111
129
  // Get examples for other blocks and put them in order of above array.
@@ -1 +1 @@
1
- {"version":3,"names":["_i18n","require","_blocks","_colorExamples","_interopRequireDefault","_duotoneExamples","_constants","_jsxRuntime","getColorExamples","colors","examples","STYLE_BOOK_COLOR_GROUPS","forEach","group","palette","type","find","origin","slug","example","name","title","category","content","jsx","default","duotones","push","getOverviewBlockExamples","themePalette","themeColorexample","__","headingBlock","createBlock","level","firstParagraphBlock","secondParagraphBlock","textExample","blocks","layout","columnCount","minimumColumnWidth","style","spacing","blockGap","otherBlockExamples","blockName","blockType","getBlockType","blockExample","getBlockFromExample","attributes","undefined","getExamples","nonHeadingBlockExamples","getBlockTypes","filter","supports","inserter","map","isHeadingBlockRegistered","headingsExample","sprintf","colorExamples","overviewBlockExamples"],"sources":["@wordpress/edit-site/src/components/style-book/examples.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport {\n\tgetBlockType,\n\tgetBlockTypes,\n\tgetBlockFromExample,\n\tcreateBlock,\n} from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport type { BlockExample, ColorOrigin, MultiOriginPalettes } from './types';\nimport ColorExamples from './color-examples';\nimport DuotoneExamples from './duotone-examples';\nimport { STYLE_BOOK_COLOR_GROUPS } from './constants';\n\n/**\n * Returns examples color examples for each origin\n * e.g. Core (Default), Theme, and User.\n *\n * @param {MultiOriginPalettes} colors Global Styles color palettes per origin.\n * @return {BlockExample[]} An array of color block examples.\n */\nfunction getColorExamples( colors: MultiOriginPalettes ): BlockExample[] {\n\tif ( ! colors ) {\n\t\treturn [];\n\t}\n\n\tconst examples: BlockExample[] = [];\n\n\tSTYLE_BOOK_COLOR_GROUPS.forEach( ( group ) => {\n\t\tconst palette = colors[ group.type ].find(\n\t\t\t( origin: ColorOrigin ) => origin.slug === group.origin\n\t\t);\n\n\t\tif ( palette?.[ group.type ] ) {\n\t\t\tconst example: BlockExample = {\n\t\t\t\tname: group.slug,\n\t\t\t\ttitle: group.title,\n\t\t\t\tcategory: 'colors',\n\t\t\t};\n\t\t\tif ( group.type === 'duotones' ) {\n\t\t\t\texample.content = (\n\t\t\t\t\t<DuotoneExamples duotones={ palette[ group.type ] } />\n\t\t\t\t);\n\t\t\t\texamples.push( example );\n\t\t\t} else {\n\t\t\t\texample.content = (\n\t\t\t\t\t<ColorExamples\n\t\t\t\t\t\tcolors={ palette[ group.type ] }\n\t\t\t\t\t\ttype={ group.type }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t\texamples.push( example );\n\t\t\t}\n\t\t}\n\t} );\n\n\treturn examples;\n}\n\n/**\n * Returns examples for the overview page.\n *\n * @param {MultiOriginPalettes} colors Global Styles color palettes per origin.\n * @return {BlockExample[]} An array of block examples.\n */\nfunction getOverviewBlockExamples(\n\tcolors: MultiOriginPalettes\n): BlockExample[] {\n\tconst examples: BlockExample[] = [];\n\n\t// Get theme palette from colors.\n\tconst themePalette = colors.colors.find(\n\t\t( origin: ColorOrigin ) => origin.slug === 'theme'\n\t);\n\n\tif ( themePalette ) {\n\t\tconst themeColorexample: BlockExample = {\n\t\t\tname: 'theme-colors',\n\t\t\ttitle: __( 'Colors' ),\n\t\t\tcategory: 'overview',\n\t\t\tcontent: (\n\t\t\t\t<ColorExamples colors={ themePalette.colors } type={ colors } />\n\t\t\t),\n\t\t};\n\n\t\texamples.push( themeColorexample );\n\t}\n\n\tconst headingBlock = createBlock( 'core/heading', {\n\t\tcontent: __(\n\t\t\t`AaBbCcDdEeFfGgHhiiJjKkLIMmNnOoPpQakRrssTtUuVVWwXxxYyZzOl23356789X{(…)},2!*&:/A@HELFO™`\n\t\t),\n\t\tlevel: 1,\n\t} );\n\tconst firstParagraphBlock = createBlock( 'core/paragraph', {\n\t\tcontent: __(\n\t\t\t`A paragraph in a website refers to a distinct block of text that is used to present and organize information. It is a fundamental unit of content in web design and is typically composed of a group of related sentences or thoughts focused on a particular topic or idea. Paragraphs play a crucial role in improving the readability and user experience of a website. They break down the text into smaller, manageable chunks, allowing readers to scan the content more easily.`\n\t\t),\n\t} );\n\tconst secondParagraphBlock = createBlock( 'core/paragraph', {\n\t\tcontent: __(\n\t\t\t`Additionally, paragraphs help structure the flow of information and provide logical breaks between different concepts or pieces of information. In terms of formatting, paragraphs in websites are commonly denoted by a vertical gap or indentation between each block of text. This visual separation helps visually distinguish one paragraph from another, creating a clear and organized layout that guides the reader through the content smoothly.`\n\t\t),\n\t} );\n\n\tconst textExample = {\n\t\tname: 'typography',\n\t\ttitle: __( 'Typography' ),\n\t\tcategory: 'overview',\n\t\tblocks: [\n\t\t\theadingBlock,\n\t\t\tcreateBlock(\n\t\t\t\t'core/group',\n\t\t\t\t{\n\t\t\t\t\tlayout: {\n\t\t\t\t\t\ttype: 'grid',\n\t\t\t\t\t\tcolumnCount: 2,\n\t\t\t\t\t\tminimumColumnWidth: '12rem',\n\t\t\t\t\t},\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\tspacing: {\n\t\t\t\t\t\t\tblockGap: '1.5rem',\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t[ firstParagraphBlock, secondParagraphBlock ]\n\t\t\t),\n\t\t],\n\t};\n\texamples.push( textExample );\n\n\tconst otherBlockExamples = [\n\t\t'core/image',\n\t\t'core/separator',\n\t\t'core/buttons',\n\t\t'core/pullquote',\n\t\t'core/search',\n\t];\n\n\t// Get examples for other blocks and put them in order of above array.\n\totherBlockExamples.forEach( ( blockName ) => {\n\t\tconst blockType = getBlockType( blockName );\n\t\tif ( blockType && blockType.example ) {\n\t\t\tconst blockExample: BlockExample = {\n\t\t\t\tname: blockName,\n\t\t\t\ttitle: blockType.title,\n\t\t\t\tcategory: 'overview',\n\t\t\t\t/*\n\t\t\t\t * CSS generated from style attributes will take precedence over global styles CSS,\n\t\t\t\t * so remove the style attribute from the example to ensure the example\n\t\t\t\t * demonstrates changes to global styles.\n\t\t\t\t */\n\t\t\t\tblocks: getBlockFromExample( blockName, {\n\t\t\t\t\t...blockType.example,\n\t\t\t\t\tattributes: {\n\t\t\t\t\t\t...blockType.example.attributes,\n\t\t\t\t\t\tstyle: undefined,\n\t\t\t\t\t},\n\t\t\t\t} ),\n\t\t\t};\n\t\t\texamples.push( blockExample );\n\t\t}\n\t} );\n\n\treturn examples;\n}\n\n/**\n * Returns a list of examples for registered block types.\n *\n * @param {MultiOriginPalettes} colors Global styles colors grouped by origin e.g. Core, Theme, and User.\n * @return {BlockExample[]} An array of block examples.\n */\nexport function getExamples( colors: MultiOriginPalettes ): BlockExample[] {\n\tconst nonHeadingBlockExamples = getBlockTypes()\n\t\t.filter( ( blockType ) => {\n\t\t\tconst { name, example, supports } = blockType;\n\t\t\treturn (\n\t\t\t\tname !== 'core/heading' &&\n\t\t\t\t!! example &&\n\t\t\t\tsupports?.inserter !== false\n\t\t\t);\n\t\t} )\n\t\t.map( ( blockType ) => ( {\n\t\t\tname: blockType.name,\n\t\t\ttitle: blockType.title,\n\t\t\tcategory: blockType.category,\n\t\t\t/*\n\t\t\t * CSS generated from style attributes will take precedence over global styles CSS,\n\t\t\t * so remove the style attribute from the example to ensure the example\n\t\t\t * demonstrates changes to global styles.\n\t\t\t */\n\t\t\tblocks: getBlockFromExample( blockType.name, {\n\t\t\t\t...blockType.example,\n\t\t\t\tattributes: {\n\t\t\t\t\t...blockType.example.attributes,\n\t\t\t\t\tstyle: undefined,\n\t\t\t\t},\n\t\t\t} ),\n\t\t} ) );\n\tconst isHeadingBlockRegistered = !! getBlockType( 'core/heading' );\n\n\tif ( ! isHeadingBlockRegistered ) {\n\t\treturn nonHeadingBlockExamples;\n\t}\n\n\t// Use our own example for the Heading block so that we can show multiple\n\t// heading levels.\n\tconst headingsExample = {\n\t\tname: 'core/heading',\n\t\ttitle: __( 'Headings' ),\n\t\tcategory: 'text',\n\t\tblocks: [ 1, 2, 3, 4, 5, 6 ].map( ( level ) => {\n\t\t\treturn createBlock( 'core/heading', {\n\t\t\t\tcontent: sprintf(\n\t\t\t\t\t// translators: %d: heading level e.g: \"1\", \"2\", \"3\"\n\t\t\t\t\t__( 'Heading %d' ),\n\t\t\t\t\tlevel\n\t\t\t\t),\n\t\t\t\tlevel,\n\t\t\t} );\n\t\t} ),\n\t};\n\tconst colorExamples = getColorExamples( colors );\n\n\tconst overviewBlockExamples = getOverviewBlockExamples( colors );\n\n\treturn [\n\t\theadingsExample,\n\t\t...colorExamples,\n\t\t...nonHeadingBlockExamples,\n\t\t...overviewBlockExamples,\n\t];\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AAWA,IAAAE,cAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,gBAAA,GAAAD,sBAAA,CAAAH,OAAA;AACA,IAAAK,UAAA,GAAAL,OAAA;AAAsD,IAAAM,WAAA,GAAAN,OAAA;AAjBtD;AACA;AACA;;AASA;AACA;AACA;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA,GACA,SAASO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I;IACpBC,KAAK,EAAE0B,SAAS,CAAC1B,KAAK;IACtBC,QAAQ,EAAEyB,SAAS,CAACzB,QAAQ;IAC5B;AACH;AACA;AACA;AACA;IACGgB,MAAM,EAAE,IAAAY,2BAAmB,EAAEH,SAAS,CAAC3B,IAAI,EAAE;MAC5C,GAAG2B,SAAS,CAAC5B,OAAO;MACpBgC,UAAU,EAAE;QACX,GAAGJ,SAAS,CAAC5B,OAAO,CAACgC,UAAU;QAC/BT,KAAK,EAAEU;MACR;IACD,CAAE;EACH,CAAC,CAAG,CAAC;EACN,MAAMQ,wBAAwB,GAAG,CAAC,CAAE,IAAAZ,oBAAY,EAAE,cAAe,CAAC;EAElE,IAAK,CAAEY,wBAAwB,EAAG;IACjC,OAAON,uBAAuB;EAC/B;;EAEA;EACA;EACA,MAAMO,eAAe,GAAG;IACvBzC,IAAI,EAAE,cAAc;IACpBC,KAAK,EAAE,IAAAU,QAAE,EAAE,UAAW,CAAC;IACvBT,QAAQ,EAAE,MAAM;IAChBgB,MAAM,EAAE,CAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAE,CAACqB,GAAG,CAAIzB,KAAK,IAAM;MAC9C,OAAO,IAAAD,mBAAW,EAAE,cAAc,EAAE;QACnCV,OAAO,EAAE,IAAAuC,aAAO;QACf;QACA,IAAA/B,QAAE,EAAE,YAAa,CAAC,EAClBG,KACD,CAAC;QACDA;MACD,CAAE,CAAC;IACJ,CAAE;EACH,CAAC;EACD,MAAM6B,aAAa,GAAGvD,gBAAgB,CAAEC,MAAO,CAAC;EAEhD,MAAMuD,qBAAqB,GAAGpC,wBAAwB,CAAEnB,MAAO,CAAC;EAEhE,OAAO,CACNoD,eAAe,EACf,GAAGE,aAAa,EAChB,GAAGT,uBAAuB,EAC1B,GAAGU,qBAAqB,CACxB;AACF","ignoreList":[]}
1
+ {"version":3,"names":["_i18n","require","_blocks","_colorExamples","_interopRequireDefault","_duotoneExamples","_constants","_jsxRuntime","getColorExamples","colors","examples","STYLE_BOOK_COLOR_GROUPS","forEach","group","palette","type","find","origin","slug","example","name","title","category","content","jsx","default","duotones","push","getOverviewBlockExamples","themePalette","themeColorexample","__","templateColumns","itemHeight","typographyBlockExamples","getBlockType","headingBlock","createBlock","level","firstParagraphBlock","secondParagraphBlock","groupBlock","layout","columnCount","minimumColumnWidth","style","spacing","blockGap","length","blocks","otherBlockExamples","blockName","blockType","blockExample","getBlockFromExample","attributes","undefined","getExamples","nonHeadingBlockExamples","getBlockTypes","filter","supports","inserter","map","isHeadingBlockRegistered","headingsExample","sprintf","colorExamples","overviewBlockExamples"],"sources":["@wordpress/edit-site/src/components/style-book/examples.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport {\n\tgetBlockType,\n\tgetBlockTypes,\n\tgetBlockFromExample,\n\tcreateBlock,\n} from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport type {\n\tBlock,\n\tBlockExample,\n\tColorOrigin,\n\tMultiOriginPalettes,\n} from './types';\nimport ColorExamples from './color-examples';\nimport DuotoneExamples from './duotone-examples';\nimport { STYLE_BOOK_COLOR_GROUPS } from './constants';\n\n/**\n * Returns examples color examples for each origin\n * e.g. Core (Default), Theme, and User.\n *\n * @param {MultiOriginPalettes} colors Global Styles color palettes per origin.\n * @return {BlockExample[]} An array of color block examples.\n */\nfunction getColorExamples( colors: MultiOriginPalettes ): BlockExample[] {\n\tif ( ! colors ) {\n\t\treturn [];\n\t}\n\n\tconst examples: BlockExample[] = [];\n\n\tSTYLE_BOOK_COLOR_GROUPS.forEach( ( group ) => {\n\t\tconst palette = colors[ group.type ].find(\n\t\t\t( origin: ColorOrigin ) => origin.slug === group.origin\n\t\t);\n\n\t\tif ( palette?.[ group.type ] ) {\n\t\t\tconst example: BlockExample = {\n\t\t\t\tname: group.slug,\n\t\t\t\ttitle: group.title,\n\t\t\t\tcategory: 'colors',\n\t\t\t};\n\t\t\tif ( group.type === 'duotones' ) {\n\t\t\t\texample.content = (\n\t\t\t\t\t<DuotoneExamples duotones={ palette[ group.type ] } />\n\t\t\t\t);\n\t\t\t\texamples.push( example );\n\t\t\t} else {\n\t\t\t\texample.content = (\n\t\t\t\t\t<ColorExamples\n\t\t\t\t\t\tcolors={ palette[ group.type ] }\n\t\t\t\t\t\ttype={ group.type }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t\texamples.push( example );\n\t\t\t}\n\t\t}\n\t} );\n\n\treturn examples;\n}\n\n/**\n * Returns examples for the overview page.\n *\n * @param {MultiOriginPalettes} colors Global Styles color palettes per origin.\n * @return {BlockExample[]} An array of block examples.\n */\nfunction getOverviewBlockExamples(\n\tcolors: MultiOriginPalettes\n): BlockExample[] {\n\tconst examples: BlockExample[] = [];\n\n\t// Get theme palette from colors if they exist.\n\tconst themePalette = colors?.colors.find(\n\t\t( origin: ColorOrigin ) => origin.slug === 'theme'\n\t);\n\n\tif ( themePalette ) {\n\t\tconst themeColorexample: BlockExample = {\n\t\t\tname: 'theme-colors',\n\t\t\ttitle: __( 'Colors' ),\n\t\t\tcategory: 'overview',\n\t\t\tcontent: (\n\t\t\t\t<ColorExamples\n\t\t\t\t\tcolors={ themePalette.colors }\n\t\t\t\t\ttype={ colors }\n\t\t\t\t\ttemplateColumns=\"repeat(auto-fill, minmax( 200px, 1fr ))\"\n\t\t\t\t\titemHeight=\"32px\"\n\t\t\t\t/>\n\t\t\t),\n\t\t};\n\n\t\texamples.push( themeColorexample );\n\t}\n\n\t// Get examples for typography blocks.\n\tconst typographyBlockExamples: Block[] = [];\n\n\tif ( getBlockType( 'core/heading' ) ) {\n\t\tconst headingBlock = createBlock( 'core/heading', {\n\t\t\tcontent: __(\n\t\t\t\t`AaBbCcDdEeFfGgHhiiJjKkLIMmNnOoPpQakRrssTtUuVVWwXxxYyZzOl23356789X{(…)},2!*&:/A@HELFO™`\n\t\t\t),\n\t\t\tlevel: 1,\n\t\t} );\n\t\ttypographyBlockExamples.push( headingBlock );\n\t}\n\n\tif ( getBlockType( 'core/paragraph' ) ) {\n\t\tconst firstParagraphBlock = createBlock( 'core/paragraph', {\n\t\t\tcontent: __(\n\t\t\t\t`A paragraph in a website refers to a distinct block of text that is used to present and organize information. It is a fundamental unit of content in web design and is typically composed of a group of related sentences or thoughts focused on a particular topic or idea. Paragraphs play a crucial role in improving the readability and user experience of a website. They break down the text into smaller, manageable chunks, allowing readers to scan the content more easily.`\n\t\t\t),\n\t\t} );\n\t\tconst secondParagraphBlock = createBlock( 'core/paragraph', {\n\t\t\tcontent: __(\n\t\t\t\t`Additionally, paragraphs help structure the flow of information and provide logical breaks between different concepts or pieces of information. In terms of formatting, paragraphs in websites are commonly denoted by a vertical gap or indentation between each block of text. This visual separation helps visually distinguish one paragraph from another, creating a clear and organized layout that guides the reader through the content smoothly.`\n\t\t\t),\n\t\t} );\n\n\t\tif ( getBlockType( 'core/group' ) ) {\n\t\t\tconst groupBlock = createBlock(\n\t\t\t\t'core/group',\n\t\t\t\t{\n\t\t\t\t\tlayout: {\n\t\t\t\t\t\ttype: 'grid',\n\t\t\t\t\t\tcolumnCount: 2,\n\t\t\t\t\t\tminimumColumnWidth: '12rem',\n\t\t\t\t\t},\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\tspacing: {\n\t\t\t\t\t\t\tblockGap: '1.5rem',\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t[ firstParagraphBlock, secondParagraphBlock ]\n\t\t\t);\n\t\t\ttypographyBlockExamples.push( groupBlock );\n\t\t} else {\n\t\t\ttypographyBlockExamples.push( firstParagraphBlock );\n\t\t}\n\t}\n\n\tif ( !! typographyBlockExamples.length ) {\n\t\texamples.push( {\n\t\t\tname: 'typography',\n\t\t\ttitle: __( 'Typography' ),\n\t\t\tcategory: 'overview',\n\t\t\tblocks: typographyBlockExamples,\n\t\t} );\n\t}\n\n\tconst otherBlockExamples = [\n\t\t'core/image',\n\t\t'core/separator',\n\t\t'core/buttons',\n\t\t'core/pullquote',\n\t\t'core/search',\n\t];\n\n\t// Get examples for other blocks and put them in order of above array.\n\totherBlockExamples.forEach( ( blockName ) => {\n\t\tconst blockType = getBlockType( blockName );\n\t\tif ( blockType && blockType.example ) {\n\t\t\tconst blockExample: BlockExample = {\n\t\t\t\tname: blockName,\n\t\t\t\ttitle: blockType.title,\n\t\t\t\tcategory: 'overview',\n\t\t\t\t/*\n\t\t\t\t * CSS generated from style attributes will take precedence over global styles CSS,\n\t\t\t\t * so remove the style attribute from the example to ensure the example\n\t\t\t\t * demonstrates changes to global styles.\n\t\t\t\t */\n\t\t\t\tblocks: getBlockFromExample( blockName, {\n\t\t\t\t\t...blockType.example,\n\t\t\t\t\tattributes: {\n\t\t\t\t\t\t...blockType.example.attributes,\n\t\t\t\t\t\tstyle: undefined,\n\t\t\t\t\t},\n\t\t\t\t} ),\n\t\t\t};\n\t\t\texamples.push( blockExample );\n\t\t}\n\t} );\n\n\treturn examples;\n}\n\n/**\n * Returns a list of examples for registered block types.\n *\n * @param {MultiOriginPalettes} colors Global styles colors grouped by origin e.g. Core, Theme, and User.\n * @return {BlockExample[]} An array of block examples.\n */\nexport function getExamples( colors: MultiOriginPalettes ): BlockExample[] {\n\tconst nonHeadingBlockExamples = getBlockTypes()\n\t\t.filter( ( blockType ) => {\n\t\t\tconst { name, example, supports } = blockType;\n\t\t\treturn (\n\t\t\t\tname !== 'core/heading' &&\n\t\t\t\t!! example &&\n\t\t\t\tsupports?.inserter !== false\n\t\t\t);\n\t\t} )\n\t\t.map( ( blockType ) => ( {\n\t\t\tname: blockType.name,\n\t\t\ttitle: blockType.title,\n\t\t\tcategory: blockType.category,\n\t\t\t/*\n\t\t\t * CSS generated from style attributes will take precedence over global styles CSS,\n\t\t\t * so remove the style attribute from the example to ensure the example\n\t\t\t * demonstrates changes to global styles.\n\t\t\t */\n\t\t\tblocks: getBlockFromExample( blockType.name, {\n\t\t\t\t...blockType.example,\n\t\t\t\tattributes: {\n\t\t\t\t\t...blockType.example.attributes,\n\t\t\t\t\tstyle: undefined,\n\t\t\t\t},\n\t\t\t} ),\n\t\t} ) );\n\tconst isHeadingBlockRegistered = !! getBlockType( 'core/heading' );\n\n\tif ( ! isHeadingBlockRegistered ) {\n\t\treturn nonHeadingBlockExamples;\n\t}\n\n\t// Use our own example for the Heading block so that we can show multiple\n\t// heading levels.\n\tconst headingsExample = {\n\t\tname: 'core/heading',\n\t\ttitle: __( 'Headings' ),\n\t\tcategory: 'text',\n\t\tblocks: [ 1, 2, 3, 4, 5, 6 ].map( ( level ) => {\n\t\t\treturn createBlock( 'core/heading', {\n\t\t\t\tcontent: sprintf(\n\t\t\t\t\t// translators: %d: heading level e.g: \"1\", \"2\", \"3\"\n\t\t\t\t\t__( 'Heading %d' ),\n\t\t\t\t\tlevel\n\t\t\t\t),\n\t\t\t\tlevel,\n\t\t\t} );\n\t\t} ),\n\t};\n\tconst colorExamples = getColorExamples( colors );\n\n\tconst overviewBlockExamples = getOverviewBlockExamples( colors );\n\n\treturn [\n\t\theadingsExample,\n\t\t...colorExamples,\n\t\t...nonHeadingBlockExamples,\n\t\t...overviewBlockExamples,\n\t];\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AAgBA,IAAAE,cAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,gBAAA,GAAAD,sBAAA,CAAAH,OAAA;AACA,IAAAK,UAAA,GAAAL,OAAA;AAAsD,IAAAM,WAAA,GAAAN,OAAA;AAtBtD;AACA;AACA;;AASA;AACA;AACA;;AAWA;AACA;AACA;AACA;AACA;AACA;AACA,GACA,SAASO,gBAAgBA,CAAEC,MAA2B,EAAmB;EACxE,IAAK,CAAEA,MAAM,EAAG;IACf,OAAO,EAAE;EACV;EAEA,MAAMC,QAAwB,GAAG,EAAE;EAEnCC,kCAAuB,CAACC,OAAO,CAAIC,KAAK,IAAM;IAC7C,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