@wordpress/block-editor 14.12.0 → 14.13.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 (940) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/autocompleters/block.js +0 -1
  3. package/build/autocompleters/block.js.map +1 -1
  4. package/build/autocompleters/link.js +0 -1
  5. package/build/autocompleters/link.js.map +1 -1
  6. package/build/components/alignment-control/ui.js +0 -1
  7. package/build/components/alignment-control/ui.js.map +1 -1
  8. package/build/components/autocomplete/index.js +0 -1
  9. package/build/components/autocomplete/index.js.map +1 -1
  10. package/build/components/background-image-control/index.js +0 -1
  11. package/build/components/background-image-control/index.js.map +1 -1
  12. package/build/components/block-actions/index.js +0 -1
  13. package/build/components/block-actions/index.js.map +1 -1
  14. package/build/components/block-alignment-control/ui.js +0 -1
  15. package/build/components/block-alignment-control/ui.js.map +1 -1
  16. package/build/components/block-alignment-control/ui.native.js +0 -1
  17. package/build/components/block-alignment-control/ui.native.js.map +1 -1
  18. package/build/components/block-alignment-control/use-available-alignments.js +0 -1
  19. package/build/components/block-alignment-control/use-available-alignments.js.map +1 -1
  20. package/build/components/block-breadcrumb/index.js +0 -1
  21. package/build/components/block-breadcrumb/index.js.map +1 -1
  22. package/build/components/block-compare/index.js +0 -1
  23. package/build/components/block-compare/index.js.map +1 -1
  24. package/build/components/block-controls/fill.js +0 -1
  25. package/build/components/block-controls/fill.js.map +1 -1
  26. package/build/components/block-edit/edit.js +0 -1
  27. package/build/components/block-edit/edit.js.map +1 -1
  28. package/build/components/block-edit/edit.native.js +0 -1
  29. package/build/components/block-edit/edit.native.js.map +1 -1
  30. package/build/components/block-heading-level-dropdown/index.js +0 -1
  31. package/build/components/block-heading-level-dropdown/index.js.map +1 -1
  32. package/build/components/block-heading-level-dropdown/index.native.js +0 -1
  33. package/build/components/block-heading-level-dropdown/index.native.js.map +1 -1
  34. package/build/components/block-inspector/index.js +0 -1
  35. package/build/components/block-inspector/index.js.map +1 -1
  36. package/build/components/block-list/block-invalid-warning.js +0 -1
  37. package/build/components/block-list/block-invalid-warning.js.map +1 -1
  38. package/build/components/block-list/block-list-context.native.js +0 -1
  39. package/build/components/block-list/block-list-context.native.js.map +1 -1
  40. package/build/components/block-list/block.js +0 -1
  41. package/build/components/block-list/block.js.map +1 -1
  42. package/build/components/block-list/block.native.js +0 -1
  43. package/build/components/block-list/block.native.js.map +1 -1
  44. package/build/components/block-list/index.js +9 -6
  45. package/build/components/block-list/index.js.map +1 -1
  46. package/build/components/block-list/index.native.js +0 -1
  47. package/build/components/block-list/index.native.js.map +1 -1
  48. package/build/components/block-list/use-block-props/use-focus-first-element.js +0 -1
  49. package/build/components/block-list/use-block-props/use-focus-first-element.js.map +1 -1
  50. package/build/components/block-list/use-in-between-inserter.js +0 -1
  51. package/build/components/block-list/use-in-between-inserter.js.map +1 -1
  52. package/build/components/block-lock/modal.js +0 -1
  53. package/build/components/block-lock/modal.js.map +1 -1
  54. package/build/components/block-manager/category.js +0 -1
  55. package/build/components/block-manager/category.js.map +1 -1
  56. package/build/components/block-manager/checklist.js +0 -1
  57. package/build/components/block-manager/checklist.js.map +1 -1
  58. package/build/components/block-manager/index.js +0 -1
  59. package/build/components/block-manager/index.js.map +1 -1
  60. package/build/components/block-media-update-progress/index.native.js +0 -1
  61. package/build/components/block-media-update-progress/index.native.js.map +1 -1
  62. package/build/components/block-mover/index.native.js +0 -1
  63. package/build/components/block-mover/index.native.js.map +1 -1
  64. package/build/components/block-mover/mover-description.native.js +0 -1
  65. package/build/components/block-mover/mover-description.native.js.map +1 -1
  66. package/build/components/block-pattern-setup/index.js +0 -1
  67. package/build/components/block-pattern-setup/index.js.map +1 -1
  68. package/build/components/block-pattern-setup/use-patterns-setup.js +0 -1
  69. package/build/components/block-pattern-setup/use-patterns-setup.js.map +1 -1
  70. package/build/components/block-patterns-list/index.js +0 -1
  71. package/build/components/block-patterns-list/index.js.map +1 -1
  72. package/build/components/block-popover/use-popover-scroll.js +13 -7
  73. package/build/components/block-popover/use-popover-scroll.js.map +1 -1
  74. package/build/components/block-quick-navigation/index.js +0 -1
  75. package/build/components/block-quick-navigation/index.js.map +1 -1
  76. package/build/components/block-rename/modal.js +0 -1
  77. package/build/components/block-rename/modal.js.map +1 -1
  78. package/build/components/block-settings-menu/block-settings-dropdown.js +0 -1
  79. package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  80. package/build/components/block-styles/index.js +0 -1
  81. package/build/components/block-styles/index.js.map +1 -1
  82. package/build/components/block-styles/index.native.js +0 -1
  83. package/build/components/block-styles/index.native.js.map +1 -1
  84. package/build/components/block-styles/menu-items.js +0 -1
  85. package/build/components/block-styles/menu-items.js.map +1 -1
  86. package/build/components/block-styles/preview.native.js +0 -1
  87. package/build/components/block-styles/preview.native.js.map +1 -1
  88. package/build/components/block-switcher/block-transformations-menu.js +0 -1
  89. package/build/components/block-switcher/block-transformations-menu.js.map +1 -1
  90. package/build/components/block-switcher/block-transformations-menu.native.js +0 -1
  91. package/build/components/block-switcher/block-transformations-menu.native.js.map +1 -1
  92. package/build/components/block-switcher/block-variation-transformations.js +0 -1
  93. package/build/components/block-switcher/block-variation-transformations.js.map +1 -1
  94. package/build/components/block-switcher/index.js +0 -1
  95. package/build/components/block-switcher/index.js.map +1 -1
  96. package/build/components/block-switcher/pattern-transformations-menu.js +0 -1
  97. package/build/components/block-switcher/pattern-transformations-menu.js.map +1 -1
  98. package/build/components/block-switcher/use-transformed-patterns.js +0 -1
  99. package/build/components/block-switcher/use-transformed-patterns.js.map +1 -1
  100. package/build/components/block-switcher/utils.js +0 -1
  101. package/build/components/block-switcher/utils.js.map +1 -1
  102. package/build/components/block-toolbar/block-toolbar-menu.native.js +0 -1
  103. package/build/components/block-toolbar/block-toolbar-menu.native.js.map +1 -1
  104. package/build/components/block-toolbar/change-design.js +0 -1
  105. package/build/components/block-toolbar/change-design.js.map +1 -1
  106. package/build/components/block-toolbar/index.js +0 -1
  107. package/build/components/block-toolbar/index.js.map +1 -1
  108. package/build/components/block-tools/block-toolbar-popover.js +3 -2
  109. package/build/components/block-tools/block-toolbar-popover.js.map +1 -1
  110. package/build/components/block-tools/use-selected-block-tool-props.js +0 -1
  111. package/build/components/block-tools/use-selected-block-tool-props.js.map +1 -1
  112. package/build/components/block-types-list/index.js +0 -1
  113. package/build/components/block-types-list/index.js.map +1 -1
  114. package/build/components/block-variation-picker/index.js +0 -1
  115. package/build/components/block-variation-picker/index.js.map +1 -1
  116. package/build/components/block-variation-picker/index.native.js +0 -1
  117. package/build/components/block-variation-picker/index.native.js.map +1 -1
  118. package/build/components/block-variation-transforms/index.js +0 -1
  119. package/build/components/block-variation-transforms/index.js.map +1 -1
  120. package/build/components/block-vertical-alignment-control/ui.js +0 -1
  121. package/build/components/block-vertical-alignment-control/ui.js.map +1 -1
  122. package/build/components/border-radius-control/index.js +0 -1
  123. package/build/components/border-radius-control/index.js.map +1 -1
  124. package/build/components/border-radius-control/input-controls.js +0 -1
  125. package/build/components/border-radius-control/input-controls.js.map +1 -1
  126. package/build/components/border-radius-control/utils.js +0 -1
  127. package/build/components/border-radius-control/utils.js.map +1 -1
  128. package/build/components/colors/utils.js +0 -1
  129. package/build/components/colors/utils.js.map +1 -1
  130. package/build/components/colors/with-colors.js +0 -1
  131. package/build/components/colors/with-colors.js.map +1 -1
  132. package/build/components/colors-gradients/dropdown.js +0 -1
  133. package/build/components/colors-gradients/dropdown.js.map +1 -1
  134. package/build/components/colors-gradients/panel-color-gradient-settings.js +0 -1
  135. package/build/components/colors-gradients/panel-color-gradient-settings.js.map +1 -1
  136. package/build/components/colors-gradients/panel-color-gradient-settings.native.js +0 -1
  137. package/build/components/colors-gradients/panel-color-gradient-settings.native.js.map +1 -1
  138. package/build/components/convert-to-group-buttons/toolbar.js +0 -1
  139. package/build/components/convert-to-group-buttons/toolbar.js.map +1 -1
  140. package/build/components/date-format-picker/index.js +0 -1
  141. package/build/components/date-format-picker/index.js.map +1 -1
  142. package/build/components/dimensions-tool/scale-tool.js +0 -1
  143. package/build/components/dimensions-tool/scale-tool.js.map +1 -1
  144. package/build/components/duotone/utils.js +0 -1
  145. package/build/components/duotone/utils.js.map +1 -1
  146. package/build/components/editor-styles/index.js +0 -1
  147. package/build/components/editor-styles/index.js.map +1 -1
  148. package/build/components/font-appearance-control/index.js +0 -1
  149. package/build/components/font-appearance-control/index.js.map +1 -1
  150. package/build/components/font-family/index.js +0 -1
  151. package/build/components/font-family/index.js.map +1 -1
  152. package/build/components/font-sizes/with-font-sizes.js +0 -1
  153. package/build/components/font-sizes/with-font-sizes.js.map +1 -1
  154. package/build/components/global-styles/border-panel.js +0 -1
  155. package/build/components/global-styles/border-panel.js.map +1 -1
  156. package/build/components/global-styles/color-panel.js +0 -1
  157. package/build/components/global-styles/color-panel.js.map +1 -1
  158. package/build/components/global-styles/color-panel.native.js +0 -1
  159. package/build/components/global-styles/color-panel.native.js.map +1 -1
  160. package/build/components/global-styles/dimensions-panel.js +0 -1
  161. package/build/components/global-styles/dimensions-panel.js.map +1 -1
  162. package/build/components/global-styles/filters-panel.js +42 -25
  163. package/build/components/global-styles/filters-panel.js.map +1 -1
  164. package/build/components/global-styles/get-global-styles-changes.js +0 -1
  165. package/build/components/global-styles/get-global-styles-changes.js.map +1 -1
  166. package/build/components/global-styles/shadow-panel-components.js +41 -17
  167. package/build/components/global-styles/shadow-panel-components.js.map +1 -1
  168. package/build/components/global-styles/typography-utils.js +0 -1
  169. package/build/components/global-styles/typography-utils.js.map +1 -1
  170. package/build/components/global-styles/use-global-styles-context.native.js +0 -1
  171. package/build/components/global-styles/use-global-styles-context.native.js.map +1 -1
  172. package/build/components/global-styles/use-global-styles-output.js +0 -1
  173. package/build/components/global-styles/use-global-styles-output.js.map +1 -1
  174. package/build/components/global-styles/utils.js +0 -1
  175. package/build/components/global-styles/utils.js.map +1 -1
  176. package/build/components/grid/grid-visualizer.js +0 -1
  177. package/build/components/grid/grid-visualizer.js.map +1 -1
  178. package/build/components/grid/use-grid-layout-sync.js +0 -1
  179. package/build/components/grid/use-grid-layout-sync.js.map +1 -1
  180. package/build/components/grid/utils.js +0 -1
  181. package/build/components/grid/utils.js.map +1 -1
  182. package/build/components/iframe/get-compatibility-styles.js +0 -1
  183. package/build/components/iframe/get-compatibility-styles.js.map +1 -1
  184. package/build/components/image-editor/aspect-ratio-dropdown.js +1 -2
  185. package/build/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
  186. package/build/components/inner-blocks/index.js +2 -2
  187. package/build/components/inner-blocks/index.js.map +1 -1
  188. package/build/components/inner-blocks/index.native.js +2 -2
  189. package/build/components/inner-blocks/index.native.js.map +1 -1
  190. package/build/components/inner-blocks/use-block-context.js +0 -1
  191. package/build/components/inner-blocks/use-block-context.js.map +1 -1
  192. package/build/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js +0 -1
  193. package/build/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js.map +1 -1
  194. package/build/components/inserter/block-patterns-explorer/pattern-list.js +0 -1
  195. package/build/components/inserter/block-patterns-explorer/pattern-list.js.map +1 -1
  196. package/build/components/inserter/block-patterns-tab/pattern-category-previews.js +0 -1
  197. package/build/components/inserter/block-patterns-tab/pattern-category-previews.js.map +1 -1
  198. package/build/components/inserter/block-patterns-tab/use-pattern-categories.js +0 -1
  199. package/build/components/inserter/block-patterns-tab/use-pattern-categories.js.map +1 -1
  200. package/build/components/inserter/block-types-tab.js +0 -1
  201. package/build/components/inserter/block-types-tab.js.map +1 -1
  202. package/build/components/inserter/block-types-tab.native.js +0 -1
  203. package/build/components/inserter/block-types-tab.native.js.map +1 -1
  204. package/build/components/inserter/category-tabs/index.js +0 -1
  205. package/build/components/inserter/category-tabs/index.js.map +1 -1
  206. package/build/components/inserter/hooks/use-block-type-impressions.native.js +0 -1
  207. package/build/components/inserter/hooks/use-block-type-impressions.native.js.map +1 -1
  208. package/build/components/inserter/hooks/use-patterns-state.js +0 -1
  209. package/build/components/inserter/hooks/use-patterns-state.js.map +1 -1
  210. package/build/components/inserter/index.js +0 -1
  211. package/build/components/inserter/index.js.map +1 -1
  212. package/build/components/inserter/index.native.js +0 -1
  213. package/build/components/inserter/index.native.js.map +1 -1
  214. package/build/components/inserter/media-tab/hooks.js +0 -1
  215. package/build/components/inserter/media-tab/hooks.js.map +1 -1
  216. package/build/components/inserter/media-tab/media-list.js +0 -1
  217. package/build/components/inserter/media-tab/media-list.js.map +1 -1
  218. package/build/components/inserter/media-tab/media-tab.js +0 -1
  219. package/build/components/inserter/media-tab/media-tab.js.map +1 -1
  220. package/build/components/inserter/mobile-tab-navigation.js +0 -1
  221. package/build/components/inserter/mobile-tab-navigation.js.map +1 -1
  222. package/build/components/inserter/no-results.js +3 -7
  223. package/build/components/inserter/no-results.js.map +1 -1
  224. package/build/components/inserter/quick-inserter.js +2 -1
  225. package/build/components/inserter/quick-inserter.js.map +1 -1
  226. package/build/components/inserter/search-items.js +0 -1
  227. package/build/components/inserter/search-items.js.map +1 -1
  228. package/build/components/inserter/search-results.js +1 -2
  229. package/build/components/inserter/search-results.js.map +1 -1
  230. package/build/components/inserter/tabs.native.js +0 -1
  231. package/build/components/inserter/tabs.native.js.map +1 -1
  232. package/build/components/inserter/utils.native.js +0 -1
  233. package/build/components/inserter/utils.native.js.map +1 -1
  234. package/build/components/inspector-controls/block-support-tools-panel.js +0 -1
  235. package/build/components/inspector-controls/block-support-tools-panel.js.map +1 -1
  236. package/build/components/inspector-controls/fill.js +0 -1
  237. package/build/components/inspector-controls/fill.js.map +1 -1
  238. package/build/components/inspector-controls-tabs/index.js +0 -1
  239. package/build/components/inspector-controls-tabs/index.js.map +1 -1
  240. package/build/components/inspector-popover-header/index.js +0 -1
  241. package/build/components/inspector-popover-header/index.js.map +1 -1
  242. package/build/components/justify-content-control/ui.js +0 -1
  243. package/build/components/justify-content-control/ui.js.map +1 -1
  244. package/build/components/keyboard-shortcuts/index.js +1 -1
  245. package/build/components/keyboard-shortcuts/index.js.map +1 -1
  246. package/build/components/link-control/index.js +0 -1
  247. package/build/components/link-control/index.js.map +1 -1
  248. package/build/components/link-control/search-results.js +0 -1
  249. package/build/components/link-control/search-results.js.map +1 -1
  250. package/build/components/link-control/settings.js +0 -1
  251. package/build/components/link-control/settings.js.map +1 -1
  252. package/build/components/link-control/use-internal-value.js +0 -1
  253. package/build/components/link-control/use-internal-value.js.map +1 -1
  254. package/build/components/link-control/use-search-handler.js +0 -1
  255. package/build/components/link-control/use-search-handler.js.map +1 -1
  256. package/build/components/list-view/block-select-button.js +0 -1
  257. package/build/components/list-view/block-select-button.js.map +1 -1
  258. package/build/components/list-view/block.js +0 -1
  259. package/build/components/list-view/block.js.map +1 -1
  260. package/build/components/list-view/branch.js +0 -1
  261. package/build/components/list-view/branch.js.map +1 -1
  262. package/build/components/list-view/index.js +0 -1
  263. package/build/components/list-view/index.js.map +1 -1
  264. package/build/components/list-view/use-block-selection.js +0 -1
  265. package/build/components/list-view/use-block-selection.js.map +1 -1
  266. package/build/components/list-view/use-clipboard-handler.js +0 -1
  267. package/build/components/list-view/use-clipboard-handler.js.map +1 -1
  268. package/build/components/list-view/use-list-view-block-indexes.js +0 -1
  269. package/build/components/list-view/use-list-view-block-indexes.js.map +1 -1
  270. package/build/components/list-view/use-list-view-drop-zone.js +0 -1
  271. package/build/components/list-view/use-list-view-drop-zone.js.map +1 -1
  272. package/build/components/list-view/utils.js +0 -1
  273. package/build/components/list-view/utils.js.map +1 -1
  274. package/build/components/media-placeholder/index.js +0 -1
  275. package/build/components/media-placeholder/index.js.map +1 -1
  276. package/build/components/media-placeholder/index.native.js +0 -1
  277. package/build/components/media-placeholder/index.native.js.map +1 -1
  278. package/build/components/media-replace-flow/index.js +0 -1
  279. package/build/components/media-replace-flow/index.js.map +1 -1
  280. package/build/components/media-upload/index.native.js +0 -1
  281. package/build/components/media-upload/index.native.js.map +1 -1
  282. package/build/components/navigable-toolbar/index.js +0 -1
  283. package/build/components/navigable-toolbar/index.js.map +1 -1
  284. package/build/components/panel-color-settings/index.js +0 -1
  285. package/build/components/panel-color-settings/index.js.map +1 -1
  286. package/build/components/provider/use-block-sync.js +0 -1
  287. package/build/components/provider/use-block-sync.js.map +1 -1
  288. package/build/components/responsive-block-control/index.js +0 -1
  289. package/build/components/responsive-block-control/index.js.map +1 -1
  290. package/build/components/rich-text/embed-handler-picker.native.js +0 -1
  291. package/build/components/rich-text/embed-handler-picker.native.js.map +1 -1
  292. package/build/components/rich-text/event-listeners/before-input-rules.js +0 -1
  293. package/build/components/rich-text/event-listeners/before-input-rules.js.map +1 -1
  294. package/build/components/rich-text/event-listeners/delete.js +5 -3
  295. package/build/components/rich-text/event-listeners/delete.js.map +1 -1
  296. package/build/components/rich-text/event-listeners/index.js +0 -1
  297. package/build/components/rich-text/event-listeners/index.js.map +1 -1
  298. package/build/components/rich-text/event-listeners/input-rules.js +0 -1
  299. package/build/components/rich-text/event-listeners/input-rules.js.map +1 -1
  300. package/build/components/rich-text/event-listeners/paste-handler.js +0 -1
  301. package/build/components/rich-text/event-listeners/paste-handler.js.map +1 -1
  302. package/build/components/rich-text/file-paste-handler.native.js +0 -1
  303. package/build/components/rich-text/file-paste-handler.native.js.map +1 -1
  304. package/build/components/rich-text/format-edit.js +0 -1
  305. package/build/components/rich-text/format-edit.js.map +1 -1
  306. package/build/components/rich-text/format-toolbar/index.js +0 -1
  307. package/build/components/rich-text/format-toolbar/index.js.map +1 -1
  308. package/build/components/rich-text/index.js +0 -1
  309. package/build/components/rich-text/index.js.map +1 -1
  310. package/build/components/rich-text/index.native.js +0 -1
  311. package/build/components/rich-text/index.native.js.map +1 -1
  312. package/build/components/rich-text/multiline.js +0 -1
  313. package/build/components/rich-text/multiline.js.map +1 -1
  314. package/build/components/rich-text/native/format-edit.js +0 -1
  315. package/build/components/rich-text/native/format-edit.js.map +1 -1
  316. package/build/components/rich-text/native/get-format-colors.native.js +0 -1
  317. package/build/components/rich-text/native/get-format-colors.native.js.map +1 -1
  318. package/build/components/rich-text/native/index.native.js +0 -1
  319. package/build/components/rich-text/native/index.native.js.map +1 -1
  320. package/build/components/rich-text/native/toolbar-button-with-options.native.js +0 -1
  321. package/build/components/rich-text/native/toolbar-button-with-options.native.js.map +1 -1
  322. package/build/components/rich-text/native/use-format-types.js +0 -1
  323. package/build/components/rich-text/native/use-format-types.js.map +1 -1
  324. package/build/components/rich-text/use-format-types.js +0 -1
  325. package/build/components/rich-text/use-format-types.js.map +1 -1
  326. package/build/components/spacing-sizes-control/hooks/use-spacing-sizes.js +0 -1
  327. package/build/components/spacing-sizes-control/hooks/use-spacing-sizes.js.map +1 -1
  328. package/build/components/spacing-sizes-control/input-controls/axial.js +0 -1
  329. package/build/components/spacing-sizes-control/input-controls/axial.js.map +1 -1
  330. package/build/components/spacing-sizes-control/input-controls/separated.js +0 -1
  331. package/build/components/spacing-sizes-control/input-controls/separated.js.map +1 -1
  332. package/build/components/spacing-sizes-control/input-controls/single.js +0 -1
  333. package/build/components/spacing-sizes-control/input-controls/single.js.map +1 -1
  334. package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js +0 -1
  335. package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
  336. package/build/components/spacing-sizes-control/utils.js +0 -1
  337. package/build/components/spacing-sizes-control/utils.js.map +1 -1
  338. package/build/components/tabbed-sidebar/index.js +0 -1
  339. package/build/components/tabbed-sidebar/index.js.map +1 -1
  340. package/build/components/text-alignment-control/index.js +0 -1
  341. package/build/components/text-alignment-control/index.js.map +1 -1
  342. package/build/components/text-decoration-control/index.js +0 -1
  343. package/build/components/text-decoration-control/index.js.map +1 -1
  344. package/build/components/text-transform-control/index.js +0 -1
  345. package/build/components/text-transform-control/index.js.map +1 -1
  346. package/build/components/unsupported-block-details/index.native.js +0 -1
  347. package/build/components/unsupported-block-details/index.native.js.map +1 -1
  348. package/build/components/url-input/index.js +0 -1
  349. package/build/components/url-input/index.js.map +1 -1
  350. package/build/components/url-popover/image-url-input-ui.js +0 -1
  351. package/build/components/url-popover/image-url-input-ui.js.map +1 -1
  352. package/build/components/use-block-commands/index.js +0 -1
  353. package/build/components/use-block-commands/index.js.map +1 -1
  354. package/build/components/use-block-drop-zone/index.js +0 -1
  355. package/build/components/use-block-drop-zone/index.js.map +1 -1
  356. package/build/components/use-block-drop-zone/index.native.js +0 -1
  357. package/build/components/use-block-drop-zone/index.native.js.map +1 -1
  358. package/build/components/use-flash-editable-blocks/index.js +0 -1
  359. package/build/components/use-flash-editable-blocks/index.js.map +1 -1
  360. package/build/components/use-on-block-drop/index.js +0 -1
  361. package/build/components/use-on-block-drop/index.js.map +1 -1
  362. package/build/components/use-on-block-drop/index.native.js +0 -1
  363. package/build/components/use-on-block-drop/index.native.js.map +1 -1
  364. package/build/components/use-paste-styles/index.js +0 -1
  365. package/build/components/use-paste-styles/index.js.map +1 -1
  366. package/build/components/warning/index.js +0 -1
  367. package/build/components/warning/index.js.map +1 -1
  368. package/build/components/writing-flow/use-arrow-nav.js +0 -1
  369. package/build/components/writing-flow/use-arrow-nav.js.map +1 -1
  370. package/build/components/writing-flow/use-clipboard-handler.js +0 -1
  371. package/build/components/writing-flow/use-clipboard-handler.js.map +1 -1
  372. package/build/components/writing-flow/use-input.js +0 -1
  373. package/build/components/writing-flow/use-input.js.map +1 -1
  374. package/build/components/writing-flow/use-tab-nav.js +3 -1
  375. package/build/components/writing-flow/use-tab-nav.js.map +1 -1
  376. package/build/components/writing-flow/utils.js +0 -1
  377. package/build/components/writing-flow/utils.js.map +1 -1
  378. package/build/components/writing-mode-control/index.js +0 -1
  379. package/build/components/writing-mode-control/index.js.map +1 -1
  380. package/build/hooks/align.js +0 -1
  381. package/build/hooks/align.js.map +1 -1
  382. package/build/hooks/align.native.js +0 -1
  383. package/build/hooks/align.native.js.map +1 -1
  384. package/build/hooks/aria-label.js +3 -8
  385. package/build/hooks/aria-label.js.map +1 -1
  386. package/build/hooks/block-bindings.js +0 -1
  387. package/build/hooks/block-bindings.js.map +1 -1
  388. package/build/hooks/block-hooks.js +0 -1
  389. package/build/hooks/block-hooks.js.map +1 -1
  390. package/build/hooks/block-style-variation.js +0 -1
  391. package/build/hooks/block-style-variation.js.map +1 -1
  392. package/build/hooks/border.js +0 -1
  393. package/build/hooks/border.js.map +1 -1
  394. package/build/hooks/contrast-checker.js +0 -1
  395. package/build/hooks/contrast-checker.js.map +1 -1
  396. package/build/hooks/duotone.js +0 -1
  397. package/build/hooks/duotone.js.map +1 -1
  398. package/build/hooks/index.js +0 -1
  399. package/build/hooks/index.js.map +1 -1
  400. package/build/hooks/layout.js +0 -1
  401. package/build/hooks/layout.js.map +1 -1
  402. package/build/hooks/position.js +0 -1
  403. package/build/hooks/position.js.map +1 -1
  404. package/build/hooks/style.js +0 -1
  405. package/build/hooks/style.js.map +1 -1
  406. package/build/hooks/supports.js +0 -1
  407. package/build/hooks/supports.js.map +1 -1
  408. package/build/hooks/text-align.js +0 -1
  409. package/build/hooks/text-align.js.map +1 -1
  410. package/build/hooks/typography.js +0 -1
  411. package/build/hooks/typography.js.map +1 -1
  412. package/build/hooks/utils.js +0 -1
  413. package/build/hooks/utils.js.map +1 -1
  414. package/build/layouts/constrained.js +0 -1
  415. package/build/layouts/constrained.js.map +1 -1
  416. package/build/layouts/flex.js +0 -1
  417. package/build/layouts/flex.js.map +1 -1
  418. package/build/layouts/flow.js +0 -1
  419. package/build/layouts/flow.js.map +1 -1
  420. package/build/layouts/index.js +0 -1
  421. package/build/layouts/index.js.map +1 -1
  422. package/build/layouts/utils.js +0 -1
  423. package/build/layouts/utils.js.map +1 -1
  424. package/build/store/actions.js +0 -1
  425. package/build/store/actions.js.map +1 -1
  426. package/build/store/get-block-settings.js +0 -1
  427. package/build/store/get-block-settings.js.map +1 -1
  428. package/build/store/private-actions.js +0 -1
  429. package/build/store/private-actions.js.map +1 -1
  430. package/build/store/private-selectors.js +0 -1
  431. package/build/store/private-selectors.js.map +1 -1
  432. package/build/store/reducer.js +0 -1
  433. package/build/store/reducer.js.map +1 -1
  434. package/build/store/selectors.js +0 -1
  435. package/build/store/selectors.js.map +1 -1
  436. package/build/store/utils.js +0 -1
  437. package/build/store/utils.js.map +1 -1
  438. package/build/utils/block-bindings.js +0 -1
  439. package/build/utils/block-bindings.js.map +1 -1
  440. package/build/utils/get-editor-region.js +0 -1
  441. package/build/utils/get-editor-region.js.map +1 -1
  442. package/build/utils/get-font-styles-and-weights.js +0 -1
  443. package/build/utils/get-font-styles-and-weights.js.map +1 -1
  444. package/build/utils/math.js +0 -1
  445. package/build/utils/math.js.map +1 -1
  446. package/build/utils/object.js +0 -1
  447. package/build/utils/object.js.map +1 -1
  448. package/build/utils/selection.js +0 -1
  449. package/build/utils/selection.js.map +1 -1
  450. package/build/utils/transform-styles/index.js +0 -1
  451. package/build/utils/transform-styles/index.js.map +1 -1
  452. package/build-module/autocompleters/block.js +0 -1
  453. package/build-module/autocompleters/block.js.map +1 -1
  454. package/build-module/autocompleters/link.js +0 -1
  455. package/build-module/autocompleters/link.js.map +1 -1
  456. package/build-module/components/alignment-control/ui.js +0 -1
  457. package/build-module/components/alignment-control/ui.js.map +1 -1
  458. package/build-module/components/autocomplete/index.js +0 -1
  459. package/build-module/components/autocomplete/index.js.map +1 -1
  460. package/build-module/components/background-image-control/index.js +0 -1
  461. package/build-module/components/background-image-control/index.js.map +1 -1
  462. package/build-module/components/block-actions/index.js +0 -1
  463. package/build-module/components/block-actions/index.js.map +1 -1
  464. package/build-module/components/block-alignment-control/ui.js +0 -1
  465. package/build-module/components/block-alignment-control/ui.js.map +1 -1
  466. package/build-module/components/block-alignment-control/ui.native.js +0 -1
  467. package/build-module/components/block-alignment-control/ui.native.js.map +1 -1
  468. package/build-module/components/block-alignment-control/use-available-alignments.js +0 -1
  469. package/build-module/components/block-alignment-control/use-available-alignments.js.map +1 -1
  470. package/build-module/components/block-breadcrumb/index.js +0 -1
  471. package/build-module/components/block-breadcrumb/index.js.map +1 -1
  472. package/build-module/components/block-compare/index.js +0 -1
  473. package/build-module/components/block-compare/index.js.map +1 -1
  474. package/build-module/components/block-controls/fill.js +0 -1
  475. package/build-module/components/block-controls/fill.js.map +1 -1
  476. package/build-module/components/block-edit/edit.js +0 -1
  477. package/build-module/components/block-edit/edit.js.map +1 -1
  478. package/build-module/components/block-edit/edit.native.js +0 -1
  479. package/build-module/components/block-edit/edit.native.js.map +1 -1
  480. package/build-module/components/block-heading-level-dropdown/index.js +0 -1
  481. package/build-module/components/block-heading-level-dropdown/index.js.map +1 -1
  482. package/build-module/components/block-heading-level-dropdown/index.native.js +0 -1
  483. package/build-module/components/block-heading-level-dropdown/index.native.js.map +1 -1
  484. package/build-module/components/block-inspector/index.js +0 -1
  485. package/build-module/components/block-inspector/index.js.map +1 -1
  486. package/build-module/components/block-list/block-invalid-warning.js +0 -1
  487. package/build-module/components/block-list/block-invalid-warning.js.map +1 -1
  488. package/build-module/components/block-list/block-list-context.native.js +0 -1
  489. package/build-module/components/block-list/block-list-context.native.js.map +1 -1
  490. package/build-module/components/block-list/block.js +0 -1
  491. package/build-module/components/block-list/block.js.map +1 -1
  492. package/build-module/components/block-list/block.native.js +0 -1
  493. package/build-module/components/block-list/block.native.js.map +1 -1
  494. package/build-module/components/block-list/index.js +9 -6
  495. package/build-module/components/block-list/index.js.map +1 -1
  496. package/build-module/components/block-list/index.native.js +0 -1
  497. package/build-module/components/block-list/index.native.js.map +1 -1
  498. package/build-module/components/block-list/use-block-props/use-focus-first-element.js +0 -1
  499. package/build-module/components/block-list/use-block-props/use-focus-first-element.js.map +1 -1
  500. package/build-module/components/block-list/use-in-between-inserter.js +0 -1
  501. package/build-module/components/block-list/use-in-between-inserter.js.map +1 -1
  502. package/build-module/components/block-lock/modal.js +0 -1
  503. package/build-module/components/block-lock/modal.js.map +1 -1
  504. package/build-module/components/block-manager/category.js +0 -1
  505. package/build-module/components/block-manager/category.js.map +1 -1
  506. package/build-module/components/block-manager/checklist.js +0 -1
  507. package/build-module/components/block-manager/checklist.js.map +1 -1
  508. package/build-module/components/block-manager/index.js +0 -1
  509. package/build-module/components/block-manager/index.js.map +1 -1
  510. package/build-module/components/block-media-update-progress/index.native.js +0 -1
  511. package/build-module/components/block-media-update-progress/index.native.js.map +1 -1
  512. package/build-module/components/block-mover/index.native.js +0 -1
  513. package/build-module/components/block-mover/index.native.js.map +1 -1
  514. package/build-module/components/block-mover/mover-description.native.js +0 -1
  515. package/build-module/components/block-mover/mover-description.native.js.map +1 -1
  516. package/build-module/components/block-pattern-setup/index.js +0 -1
  517. package/build-module/components/block-pattern-setup/index.js.map +1 -1
  518. package/build-module/components/block-pattern-setup/use-patterns-setup.js +0 -1
  519. package/build-module/components/block-pattern-setup/use-patterns-setup.js.map +1 -1
  520. package/build-module/components/block-patterns-list/index.js +0 -1
  521. package/build-module/components/block-patterns-list/index.js.map +1 -1
  522. package/build-module/components/block-popover/use-popover-scroll.js +12 -7
  523. package/build-module/components/block-popover/use-popover-scroll.js.map +1 -1
  524. package/build-module/components/block-quick-navigation/index.js +0 -1
  525. package/build-module/components/block-quick-navigation/index.js.map +1 -1
  526. package/build-module/components/block-rename/modal.js +0 -1
  527. package/build-module/components/block-rename/modal.js.map +1 -1
  528. package/build-module/components/block-settings-menu/block-settings-dropdown.js +0 -1
  529. package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  530. package/build-module/components/block-styles/index.js +0 -1
  531. package/build-module/components/block-styles/index.js.map +1 -1
  532. package/build-module/components/block-styles/index.native.js +0 -1
  533. package/build-module/components/block-styles/index.native.js.map +1 -1
  534. package/build-module/components/block-styles/menu-items.js +0 -1
  535. package/build-module/components/block-styles/menu-items.js.map +1 -1
  536. package/build-module/components/block-styles/preview.native.js +0 -1
  537. package/build-module/components/block-styles/preview.native.js.map +1 -1
  538. package/build-module/components/block-switcher/block-transformations-menu.js +0 -1
  539. package/build-module/components/block-switcher/block-transformations-menu.js.map +1 -1
  540. package/build-module/components/block-switcher/block-transformations-menu.native.js +0 -1
  541. package/build-module/components/block-switcher/block-transformations-menu.native.js.map +1 -1
  542. package/build-module/components/block-switcher/block-variation-transformations.js +0 -1
  543. package/build-module/components/block-switcher/block-variation-transformations.js.map +1 -1
  544. package/build-module/components/block-switcher/index.js +0 -1
  545. package/build-module/components/block-switcher/index.js.map +1 -1
  546. package/build-module/components/block-switcher/pattern-transformations-menu.js +0 -1
  547. package/build-module/components/block-switcher/pattern-transformations-menu.js.map +1 -1
  548. package/build-module/components/block-switcher/use-transformed-patterns.js +0 -1
  549. package/build-module/components/block-switcher/use-transformed-patterns.js.map +1 -1
  550. package/build-module/components/block-switcher/utils.js +0 -1
  551. package/build-module/components/block-switcher/utils.js.map +1 -1
  552. package/build-module/components/block-toolbar/block-toolbar-menu.native.js +0 -1
  553. package/build-module/components/block-toolbar/block-toolbar-menu.native.js.map +1 -1
  554. package/build-module/components/block-toolbar/change-design.js +0 -1
  555. package/build-module/components/block-toolbar/change-design.js.map +1 -1
  556. package/build-module/components/block-toolbar/index.js +0 -1
  557. package/build-module/components/block-toolbar/index.js.map +1 -1
  558. package/build-module/components/block-tools/block-toolbar-popover.js +3 -2
  559. package/build-module/components/block-tools/block-toolbar-popover.js.map +1 -1
  560. package/build-module/components/block-tools/use-selected-block-tool-props.js +0 -1
  561. package/build-module/components/block-tools/use-selected-block-tool-props.js.map +1 -1
  562. package/build-module/components/block-types-list/index.js +0 -1
  563. package/build-module/components/block-types-list/index.js.map +1 -1
  564. package/build-module/components/block-variation-picker/index.js +0 -1
  565. package/build-module/components/block-variation-picker/index.js.map +1 -1
  566. package/build-module/components/block-variation-picker/index.native.js +0 -1
  567. package/build-module/components/block-variation-picker/index.native.js.map +1 -1
  568. package/build-module/components/block-variation-transforms/index.js +0 -1
  569. package/build-module/components/block-variation-transforms/index.js.map +1 -1
  570. package/build-module/components/block-vertical-alignment-control/ui.js +0 -1
  571. package/build-module/components/block-vertical-alignment-control/ui.js.map +1 -1
  572. package/build-module/components/border-radius-control/index.js +0 -1
  573. package/build-module/components/border-radius-control/index.js.map +1 -1
  574. package/build-module/components/border-radius-control/input-controls.js +0 -1
  575. package/build-module/components/border-radius-control/input-controls.js.map +1 -1
  576. package/build-module/components/border-radius-control/utils.js +0 -1
  577. package/build-module/components/border-radius-control/utils.js.map +1 -1
  578. package/build-module/components/colors/utils.js +0 -1
  579. package/build-module/components/colors/utils.js.map +1 -1
  580. package/build-module/components/colors/with-colors.js +0 -1
  581. package/build-module/components/colors/with-colors.js.map +1 -1
  582. package/build-module/components/colors-gradients/dropdown.js +0 -1
  583. package/build-module/components/colors-gradients/dropdown.js.map +1 -1
  584. package/build-module/components/colors-gradients/panel-color-gradient-settings.js +0 -1
  585. package/build-module/components/colors-gradients/panel-color-gradient-settings.js.map +1 -1
  586. package/build-module/components/colors-gradients/panel-color-gradient-settings.native.js +0 -1
  587. package/build-module/components/colors-gradients/panel-color-gradient-settings.native.js.map +1 -1
  588. package/build-module/components/convert-to-group-buttons/toolbar.js +0 -1
  589. package/build-module/components/convert-to-group-buttons/toolbar.js.map +1 -1
  590. package/build-module/components/date-format-picker/index.js +0 -1
  591. package/build-module/components/date-format-picker/index.js.map +1 -1
  592. package/build-module/components/dimensions-tool/scale-tool.js +0 -1
  593. package/build-module/components/dimensions-tool/scale-tool.js.map +1 -1
  594. package/build-module/components/duotone/utils.js +0 -1
  595. package/build-module/components/duotone/utils.js.map +1 -1
  596. package/build-module/components/editor-styles/index.js +0 -1
  597. package/build-module/components/editor-styles/index.js.map +1 -1
  598. package/build-module/components/font-appearance-control/index.js +0 -1
  599. package/build-module/components/font-appearance-control/index.js.map +1 -1
  600. package/build-module/components/font-family/index.js +0 -1
  601. package/build-module/components/font-family/index.js.map +1 -1
  602. package/build-module/components/font-sizes/with-font-sizes.js +0 -1
  603. package/build-module/components/font-sizes/with-font-sizes.js.map +1 -1
  604. package/build-module/components/global-styles/border-panel.js +0 -1
  605. package/build-module/components/global-styles/border-panel.js.map +1 -1
  606. package/build-module/components/global-styles/color-panel.js +0 -1
  607. package/build-module/components/global-styles/color-panel.js.map +1 -1
  608. package/build-module/components/global-styles/color-panel.native.js +0 -1
  609. package/build-module/components/global-styles/color-panel.native.js.map +1 -1
  610. package/build-module/components/global-styles/dimensions-panel.js +0 -1
  611. package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
  612. package/build-module/components/global-styles/filters-panel.js +45 -28
  613. package/build-module/components/global-styles/filters-panel.js.map +1 -1
  614. package/build-module/components/global-styles/get-global-styles-changes.js +0 -1
  615. package/build-module/components/global-styles/get-global-styles-changes.js.map +1 -1
  616. package/build-module/components/global-styles/shadow-panel-components.js +44 -20
  617. package/build-module/components/global-styles/shadow-panel-components.js.map +1 -1
  618. package/build-module/components/global-styles/typography-utils.js +0 -1
  619. package/build-module/components/global-styles/typography-utils.js.map +1 -1
  620. package/build-module/components/global-styles/use-global-styles-context.native.js +0 -1
  621. package/build-module/components/global-styles/use-global-styles-context.native.js.map +1 -1
  622. package/build-module/components/global-styles/use-global-styles-output.js +0 -1
  623. package/build-module/components/global-styles/use-global-styles-output.js.map +1 -1
  624. package/build-module/components/global-styles/utils.js +0 -1
  625. package/build-module/components/global-styles/utils.js.map +1 -1
  626. package/build-module/components/grid/grid-visualizer.js +0 -1
  627. package/build-module/components/grid/grid-visualizer.js.map +1 -1
  628. package/build-module/components/grid/use-grid-layout-sync.js +0 -1
  629. package/build-module/components/grid/use-grid-layout-sync.js.map +1 -1
  630. package/build-module/components/grid/utils.js +0 -1
  631. package/build-module/components/grid/utils.js.map +1 -1
  632. package/build-module/components/iframe/get-compatibility-styles.js +0 -1
  633. package/build-module/components/iframe/get-compatibility-styles.js.map +1 -1
  634. package/build-module/components/image-editor/aspect-ratio-dropdown.js +1 -2
  635. package/build-module/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
  636. package/build-module/components/inner-blocks/index.js +2 -2
  637. package/build-module/components/inner-blocks/index.js.map +1 -1
  638. package/build-module/components/inner-blocks/index.native.js +2 -2
  639. package/build-module/components/inner-blocks/index.native.js.map +1 -1
  640. package/build-module/components/inner-blocks/use-block-context.js +0 -1
  641. package/build-module/components/inner-blocks/use-block-context.js.map +1 -1
  642. package/build-module/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js +0 -1
  643. package/build-module/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js.map +1 -1
  644. package/build-module/components/inserter/block-patterns-explorer/pattern-list.js +0 -1
  645. package/build-module/components/inserter/block-patterns-explorer/pattern-list.js.map +1 -1
  646. package/build-module/components/inserter/block-patterns-tab/pattern-category-previews.js +0 -1
  647. package/build-module/components/inserter/block-patterns-tab/pattern-category-previews.js.map +1 -1
  648. package/build-module/components/inserter/block-patterns-tab/use-pattern-categories.js +0 -1
  649. package/build-module/components/inserter/block-patterns-tab/use-pattern-categories.js.map +1 -1
  650. package/build-module/components/inserter/block-types-tab.js +0 -1
  651. package/build-module/components/inserter/block-types-tab.js.map +1 -1
  652. package/build-module/components/inserter/block-types-tab.native.js +0 -1
  653. package/build-module/components/inserter/block-types-tab.native.js.map +1 -1
  654. package/build-module/components/inserter/category-tabs/index.js +0 -1
  655. package/build-module/components/inserter/category-tabs/index.js.map +1 -1
  656. package/build-module/components/inserter/hooks/use-block-type-impressions.native.js +0 -1
  657. package/build-module/components/inserter/hooks/use-block-type-impressions.native.js.map +1 -1
  658. package/build-module/components/inserter/hooks/use-patterns-state.js +0 -1
  659. package/build-module/components/inserter/hooks/use-patterns-state.js.map +1 -1
  660. package/build-module/components/inserter/index.js +0 -1
  661. package/build-module/components/inserter/index.js.map +1 -1
  662. package/build-module/components/inserter/index.native.js +0 -1
  663. package/build-module/components/inserter/index.native.js.map +1 -1
  664. package/build-module/components/inserter/media-tab/hooks.js +0 -1
  665. package/build-module/components/inserter/media-tab/hooks.js.map +1 -1
  666. package/build-module/components/inserter/media-tab/media-list.js +0 -1
  667. package/build-module/components/inserter/media-tab/media-list.js.map +1 -1
  668. package/build-module/components/inserter/media-tab/media-tab.js +0 -1
  669. package/build-module/components/inserter/media-tab/media-tab.js.map +1 -1
  670. package/build-module/components/inserter/mobile-tab-navigation.js +0 -1
  671. package/build-module/components/inserter/mobile-tab-navigation.js.map +1 -1
  672. package/build-module/components/inserter/no-results.js +4 -8
  673. package/build-module/components/inserter/no-results.js.map +1 -1
  674. package/build-module/components/inserter/quick-inserter.js +2 -1
  675. package/build-module/components/inserter/quick-inserter.js.map +1 -1
  676. package/build-module/components/inserter/search-items.js +0 -1
  677. package/build-module/components/inserter/search-items.js.map +1 -1
  678. package/build-module/components/inserter/search-results.js +1 -2
  679. package/build-module/components/inserter/search-results.js.map +1 -1
  680. package/build-module/components/inserter/tabs.native.js +0 -1
  681. package/build-module/components/inserter/tabs.native.js.map +1 -1
  682. package/build-module/components/inserter/utils.native.js +0 -1
  683. package/build-module/components/inserter/utils.native.js.map +1 -1
  684. package/build-module/components/inspector-controls/block-support-tools-panel.js +0 -1
  685. package/build-module/components/inspector-controls/block-support-tools-panel.js.map +1 -1
  686. package/build-module/components/inspector-controls/fill.js +0 -1
  687. package/build-module/components/inspector-controls/fill.js.map +1 -1
  688. package/build-module/components/inspector-controls-tabs/index.js +0 -1
  689. package/build-module/components/inspector-controls-tabs/index.js.map +1 -1
  690. package/build-module/components/inspector-popover-header/index.js +0 -1
  691. package/build-module/components/inspector-popover-header/index.js.map +1 -1
  692. package/build-module/components/justify-content-control/ui.js +0 -1
  693. package/build-module/components/justify-content-control/ui.js.map +1 -1
  694. package/build-module/components/keyboard-shortcuts/index.js +1 -1
  695. package/build-module/components/keyboard-shortcuts/index.js.map +1 -1
  696. package/build-module/components/link-control/index.js +0 -1
  697. package/build-module/components/link-control/index.js.map +1 -1
  698. package/build-module/components/link-control/search-results.js +0 -1
  699. package/build-module/components/link-control/search-results.js.map +1 -1
  700. package/build-module/components/link-control/settings.js +0 -1
  701. package/build-module/components/link-control/settings.js.map +1 -1
  702. package/build-module/components/link-control/use-internal-value.js +0 -1
  703. package/build-module/components/link-control/use-internal-value.js.map +1 -1
  704. package/build-module/components/link-control/use-search-handler.js +0 -1
  705. package/build-module/components/link-control/use-search-handler.js.map +1 -1
  706. package/build-module/components/list-view/block-select-button.js +0 -1
  707. package/build-module/components/list-view/block-select-button.js.map +1 -1
  708. package/build-module/components/list-view/block.js +0 -1
  709. package/build-module/components/list-view/block.js.map +1 -1
  710. package/build-module/components/list-view/branch.js +0 -1
  711. package/build-module/components/list-view/branch.js.map +1 -1
  712. package/build-module/components/list-view/index.js +0 -1
  713. package/build-module/components/list-view/index.js.map +1 -1
  714. package/build-module/components/list-view/use-block-selection.js +0 -1
  715. package/build-module/components/list-view/use-block-selection.js.map +1 -1
  716. package/build-module/components/list-view/use-clipboard-handler.js +0 -1
  717. package/build-module/components/list-view/use-clipboard-handler.js.map +1 -1
  718. package/build-module/components/list-view/use-list-view-block-indexes.js +0 -1
  719. package/build-module/components/list-view/use-list-view-block-indexes.js.map +1 -1
  720. package/build-module/components/list-view/use-list-view-drop-zone.js +0 -1
  721. package/build-module/components/list-view/use-list-view-drop-zone.js.map +1 -1
  722. package/build-module/components/list-view/utils.js +0 -1
  723. package/build-module/components/list-view/utils.js.map +1 -1
  724. package/build-module/components/media-placeholder/index.js +0 -1
  725. package/build-module/components/media-placeholder/index.js.map +1 -1
  726. package/build-module/components/media-placeholder/index.native.js +0 -1
  727. package/build-module/components/media-placeholder/index.native.js.map +1 -1
  728. package/build-module/components/media-replace-flow/index.js +0 -1
  729. package/build-module/components/media-replace-flow/index.js.map +1 -1
  730. package/build-module/components/media-upload/index.native.js +0 -1
  731. package/build-module/components/media-upload/index.native.js.map +1 -1
  732. package/build-module/components/navigable-toolbar/index.js +0 -1
  733. package/build-module/components/navigable-toolbar/index.js.map +1 -1
  734. package/build-module/components/panel-color-settings/index.js +0 -1
  735. package/build-module/components/panel-color-settings/index.js.map +1 -1
  736. package/build-module/components/provider/use-block-sync.js +0 -1
  737. package/build-module/components/provider/use-block-sync.js.map +1 -1
  738. package/build-module/components/responsive-block-control/index.js +0 -1
  739. package/build-module/components/responsive-block-control/index.js.map +1 -1
  740. package/build-module/components/rich-text/embed-handler-picker.native.js +0 -1
  741. package/build-module/components/rich-text/embed-handler-picker.native.js.map +1 -1
  742. package/build-module/components/rich-text/event-listeners/before-input-rules.js +0 -1
  743. package/build-module/components/rich-text/event-listeners/before-input-rules.js.map +1 -1
  744. package/build-module/components/rich-text/event-listeners/delete.js +5 -3
  745. package/build-module/components/rich-text/event-listeners/delete.js.map +1 -1
  746. package/build-module/components/rich-text/event-listeners/index.js +0 -1
  747. package/build-module/components/rich-text/event-listeners/index.js.map +1 -1
  748. package/build-module/components/rich-text/event-listeners/input-rules.js +0 -1
  749. package/build-module/components/rich-text/event-listeners/input-rules.js.map +1 -1
  750. package/build-module/components/rich-text/event-listeners/paste-handler.js +0 -1
  751. package/build-module/components/rich-text/event-listeners/paste-handler.js.map +1 -1
  752. package/build-module/components/rich-text/file-paste-handler.native.js +0 -1
  753. package/build-module/components/rich-text/file-paste-handler.native.js.map +1 -1
  754. package/build-module/components/rich-text/format-edit.js +0 -1
  755. package/build-module/components/rich-text/format-edit.js.map +1 -1
  756. package/build-module/components/rich-text/format-toolbar/index.js +0 -1
  757. package/build-module/components/rich-text/format-toolbar/index.js.map +1 -1
  758. package/build-module/components/rich-text/index.js +0 -1
  759. package/build-module/components/rich-text/index.js.map +1 -1
  760. package/build-module/components/rich-text/index.native.js +0 -1
  761. package/build-module/components/rich-text/index.native.js.map +1 -1
  762. package/build-module/components/rich-text/multiline.js +0 -1
  763. package/build-module/components/rich-text/multiline.js.map +1 -1
  764. package/build-module/components/rich-text/native/format-edit.js +0 -1
  765. package/build-module/components/rich-text/native/format-edit.js.map +1 -1
  766. package/build-module/components/rich-text/native/get-format-colors.native.js +0 -1
  767. package/build-module/components/rich-text/native/get-format-colors.native.js.map +1 -1
  768. package/build-module/components/rich-text/native/index.native.js +0 -1
  769. package/build-module/components/rich-text/native/index.native.js.map +1 -1
  770. package/build-module/components/rich-text/native/toolbar-button-with-options.native.js +0 -1
  771. package/build-module/components/rich-text/native/toolbar-button-with-options.native.js.map +1 -1
  772. package/build-module/components/rich-text/native/use-format-types.js +0 -1
  773. package/build-module/components/rich-text/native/use-format-types.js.map +1 -1
  774. package/build-module/components/rich-text/use-format-types.js +0 -1
  775. package/build-module/components/rich-text/use-format-types.js.map +1 -1
  776. package/build-module/components/spacing-sizes-control/hooks/use-spacing-sizes.js +0 -1
  777. package/build-module/components/spacing-sizes-control/hooks/use-spacing-sizes.js.map +1 -1
  778. package/build-module/components/spacing-sizes-control/input-controls/axial.js +0 -1
  779. package/build-module/components/spacing-sizes-control/input-controls/axial.js.map +1 -1
  780. package/build-module/components/spacing-sizes-control/input-controls/separated.js +0 -1
  781. package/build-module/components/spacing-sizes-control/input-controls/separated.js.map +1 -1
  782. package/build-module/components/spacing-sizes-control/input-controls/single.js +0 -1
  783. package/build-module/components/spacing-sizes-control/input-controls/single.js.map +1 -1
  784. package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js +0 -1
  785. package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
  786. package/build-module/components/spacing-sizes-control/utils.js +0 -1
  787. package/build-module/components/spacing-sizes-control/utils.js.map +1 -1
  788. package/build-module/components/tabbed-sidebar/index.js +0 -1
  789. package/build-module/components/tabbed-sidebar/index.js.map +1 -1
  790. package/build-module/components/text-alignment-control/index.js +0 -1
  791. package/build-module/components/text-alignment-control/index.js.map +1 -1
  792. package/build-module/components/text-decoration-control/index.js +0 -1
  793. package/build-module/components/text-decoration-control/index.js.map +1 -1
  794. package/build-module/components/text-transform-control/index.js +0 -1
  795. package/build-module/components/text-transform-control/index.js.map +1 -1
  796. package/build-module/components/unsupported-block-details/index.native.js +0 -1
  797. package/build-module/components/unsupported-block-details/index.native.js.map +1 -1
  798. package/build-module/components/url-input/index.js +0 -1
  799. package/build-module/components/url-input/index.js.map +1 -1
  800. package/build-module/components/url-popover/image-url-input-ui.js +0 -1
  801. package/build-module/components/url-popover/image-url-input-ui.js.map +1 -1
  802. package/build-module/components/use-block-commands/index.js +0 -1
  803. package/build-module/components/use-block-commands/index.js.map +1 -1
  804. package/build-module/components/use-block-drop-zone/index.js +0 -1
  805. package/build-module/components/use-block-drop-zone/index.js.map +1 -1
  806. package/build-module/components/use-block-drop-zone/index.native.js +0 -1
  807. package/build-module/components/use-block-drop-zone/index.native.js.map +1 -1
  808. package/build-module/components/use-flash-editable-blocks/index.js +0 -1
  809. package/build-module/components/use-flash-editable-blocks/index.js.map +1 -1
  810. package/build-module/components/use-on-block-drop/index.js +0 -1
  811. package/build-module/components/use-on-block-drop/index.js.map +1 -1
  812. package/build-module/components/use-on-block-drop/index.native.js +0 -1
  813. package/build-module/components/use-on-block-drop/index.native.js.map +1 -1
  814. package/build-module/components/use-paste-styles/index.js +0 -1
  815. package/build-module/components/use-paste-styles/index.js.map +1 -1
  816. package/build-module/components/warning/index.js +0 -1
  817. package/build-module/components/warning/index.js.map +1 -1
  818. package/build-module/components/writing-flow/use-arrow-nav.js +0 -1
  819. package/build-module/components/writing-flow/use-arrow-nav.js.map +1 -1
  820. package/build-module/components/writing-flow/use-clipboard-handler.js +0 -1
  821. package/build-module/components/writing-flow/use-clipboard-handler.js.map +1 -1
  822. package/build-module/components/writing-flow/use-input.js +0 -1
  823. package/build-module/components/writing-flow/use-input.js.map +1 -1
  824. package/build-module/components/writing-flow/use-tab-nav.js +3 -1
  825. package/build-module/components/writing-flow/use-tab-nav.js.map +1 -1
  826. package/build-module/components/writing-flow/utils.js +0 -1
  827. package/build-module/components/writing-flow/utils.js.map +1 -1
  828. package/build-module/components/writing-mode-control/index.js +0 -1
  829. package/build-module/components/writing-mode-control/index.js.map +1 -1
  830. package/build-module/hooks/align.js +0 -1
  831. package/build-module/hooks/align.js.map +1 -1
  832. package/build-module/hooks/align.native.js +0 -1
  833. package/build-module/hooks/align.native.js.map +1 -1
  834. package/build-module/hooks/aria-label.js +3 -7
  835. package/build-module/hooks/aria-label.js.map +1 -1
  836. package/build-module/hooks/block-bindings.js +0 -1
  837. package/build-module/hooks/block-bindings.js.map +1 -1
  838. package/build-module/hooks/block-hooks.js +0 -1
  839. package/build-module/hooks/block-hooks.js.map +1 -1
  840. package/build-module/hooks/block-style-variation.js +0 -1
  841. package/build-module/hooks/block-style-variation.js.map +1 -1
  842. package/build-module/hooks/border.js +0 -1
  843. package/build-module/hooks/border.js.map +1 -1
  844. package/build-module/hooks/contrast-checker.js +0 -1
  845. package/build-module/hooks/contrast-checker.js.map +1 -1
  846. package/build-module/hooks/duotone.js +0 -1
  847. package/build-module/hooks/duotone.js.map +1 -1
  848. package/build-module/hooks/index.js +0 -1
  849. package/build-module/hooks/index.js.map +1 -1
  850. package/build-module/hooks/layout.js +0 -1
  851. package/build-module/hooks/layout.js.map +1 -1
  852. package/build-module/hooks/position.js +0 -1
  853. package/build-module/hooks/position.js.map +1 -1
  854. package/build-module/hooks/style.js +0 -1
  855. package/build-module/hooks/style.js.map +1 -1
  856. package/build-module/hooks/supports.js +0 -1
  857. package/build-module/hooks/supports.js.map +1 -1
  858. package/build-module/hooks/text-align.js +0 -1
  859. package/build-module/hooks/text-align.js.map +1 -1
  860. package/build-module/hooks/typography.js +0 -1
  861. package/build-module/hooks/typography.js.map +1 -1
  862. package/build-module/hooks/utils.js +0 -1
  863. package/build-module/hooks/utils.js.map +1 -1
  864. package/build-module/layouts/constrained.js +0 -1
  865. package/build-module/layouts/constrained.js.map +1 -1
  866. package/build-module/layouts/flex.js +0 -1
  867. package/build-module/layouts/flex.js.map +1 -1
  868. package/build-module/layouts/flow.js +0 -1
  869. package/build-module/layouts/flow.js.map +1 -1
  870. package/build-module/layouts/index.js +0 -1
  871. package/build-module/layouts/index.js.map +1 -1
  872. package/build-module/layouts/utils.js +0 -1
  873. package/build-module/layouts/utils.js.map +1 -1
  874. package/build-module/store/actions.js +0 -1
  875. package/build-module/store/actions.js.map +1 -1
  876. package/build-module/store/get-block-settings.js +0 -1
  877. package/build-module/store/get-block-settings.js.map +1 -1
  878. package/build-module/store/private-actions.js +0 -1
  879. package/build-module/store/private-actions.js.map +1 -1
  880. package/build-module/store/private-selectors.js +0 -1
  881. package/build-module/store/private-selectors.js.map +1 -1
  882. package/build-module/store/reducer.js +0 -1
  883. package/build-module/store/reducer.js.map +1 -1
  884. package/build-module/store/selectors.js +0 -1
  885. package/build-module/store/selectors.js.map +1 -1
  886. package/build-module/store/utils.js +0 -1
  887. package/build-module/store/utils.js.map +1 -1
  888. package/build-module/utils/block-bindings.js +0 -1
  889. package/build-module/utils/block-bindings.js.map +1 -1
  890. package/build-module/utils/get-editor-region.js +0 -1
  891. package/build-module/utils/get-editor-region.js.map +1 -1
  892. package/build-module/utils/get-font-styles-and-weights.js +0 -1
  893. package/build-module/utils/get-font-styles-and-weights.js.map +1 -1
  894. package/build-module/utils/math.js +0 -1
  895. package/build-module/utils/math.js.map +1 -1
  896. package/build-module/utils/object.js +0 -1
  897. package/build-module/utils/object.js.map +1 -1
  898. package/build-module/utils/selection.js +0 -1
  899. package/build-module/utils/selection.js.map +1 -1
  900. package/build-module/utils/transform-styles/index.js +0 -1
  901. package/build-module/utils/transform-styles/index.js.map +1 -1
  902. package/build-style/content-rtl.css +22 -25
  903. package/build-style/content.css +22 -25
  904. package/build-style/style-rtl.css +130 -104
  905. package/build-style/style.css +130 -104
  906. package/package.json +34 -34
  907. package/src/components/block-canvas/style.scss +3 -2
  908. package/src/components/block-draggable/style.scss +3 -1
  909. package/src/components/block-list/content.scss +19 -12
  910. package/src/components/block-list/index.js +21 -7
  911. package/src/components/block-mover/style.scss +5 -4
  912. package/src/components/block-pattern-setup/style.scss +3 -1
  913. package/src/components/block-patterns-list/style.scss +3 -3
  914. package/src/components/block-popover/use-popover-scroll.js +13 -8
  915. package/src/components/block-switcher/style.scss +3 -1
  916. package/src/components/block-toolbar/style.scss +5 -3
  917. package/src/components/block-tools/block-toolbar-popover.js +4 -3
  918. package/src/components/block-tools/style.scss +6 -3
  919. package/src/components/button-block-appender/content.scss +2 -4
  920. package/src/components/colors-gradients/style.scss +3 -2
  921. package/src/components/global-styles/filters-panel.js +48 -21
  922. package/src/components/global-styles/shadow-panel-components.js +44 -13
  923. package/src/components/global-styles/style.scss +53 -1
  924. package/src/components/grid/style.scss +5 -4
  925. package/src/components/iframe/content.scss +5 -2
  926. package/src/components/image-editor/aspect-ratio-dropdown.js +1 -1
  927. package/src/components/inner-blocks/index.js +2 -2
  928. package/src/components/inner-blocks/index.native.js +2 -2
  929. package/src/components/inserter/no-results.js +0 -5
  930. package/src/components/inserter/quick-inserter.js +4 -1
  931. package/src/components/inserter/search-results.js +3 -1
  932. package/src/components/inserter/style.scss +6 -8
  933. package/src/components/inserter-list-item/style.scss +9 -6
  934. package/src/components/keyboard-shortcuts/index.js +1 -1
  935. package/src/components/link-control/style.scss +11 -6
  936. package/src/components/list-view/style.scss +34 -17
  937. package/src/components/rich-text/event-listeners/delete.js +3 -3
  938. package/src/components/url-input/style.scss +3 -2
  939. package/src/components/writing-flow/use-tab-nav.js +4 -0
  940. package/src/hooks/aria-label.js +3 -8
@@ -1 +1 @@
1
- {"version":3,"names":["createBlockEditFilter","createBlockListBlockFilter","createBlockSaveFilter","align","background","anchor","ariaLabel","customClassName","style","color","dimensions","duotone","fontFamily","fontSize","textAlign","border","position","blockStyleVariation","layout","childLayout","contentLockUI","blockHooks","blockBindingsPanel","filter","Boolean","useCustomSides","useLayoutClasses","useLayoutStyles","getBorderClassesAndStyles","useBorderProps","getShadowClassesAndStyles","getColorClassesAndStyles","useColorProps","getSpacingClassesAndStyles","getTypographyClassesAndStyles","getGapCSSValue","useCachedTruthy","setBackgroundStyleDefaults","useZoomOut","__unstableBlockStyleVariationOverridesWithConfig","useStyleOverride"],"sources":["@wordpress/block-editor/src/hooks/index.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport {\n\tcreateBlockEditFilter,\n\tcreateBlockListBlockFilter,\n\tcreateBlockSaveFilter,\n} from './utils';\nimport './compat';\nimport align from './align';\nimport background from './background';\nimport './lock';\nimport anchor from './anchor';\nimport ariaLabel from './aria-label';\nimport customClassName from './custom-class-name';\nimport './generated-class-name';\nimport style from './style';\nimport './settings';\nimport color from './color';\nimport dimensions from './dimensions';\nimport duotone from './duotone';\nimport fontFamily from './font-family';\nimport fontSize from './font-size';\nimport textAlign from './text-align';\nimport border from './border';\nimport position from './position';\nimport blockStyleVariation from './block-style-variation';\nimport layout from './layout';\nimport childLayout from './layout-child';\nimport contentLockUI from './content-lock-ui';\nimport './metadata';\nimport blockHooks from './block-hooks';\nimport blockBindingsPanel from './block-bindings';\nimport './block-renaming';\nimport './grid-visualizer';\n\ncreateBlockEditFilter(\n\t[\n\t\talign,\n\t\ttextAlign,\n\t\tanchor,\n\t\tcustomClassName,\n\t\tstyle,\n\t\tduotone,\n\t\tposition,\n\t\tlayout,\n\t\tcontentLockUI,\n\t\tblockHooks,\n\t\tblockBindingsPanel,\n\t\tchildLayout,\n\t].filter( Boolean )\n);\ncreateBlockListBlockFilter( [\n\talign,\n\ttextAlign,\n\tbackground,\n\tstyle,\n\tcolor,\n\tdimensions,\n\tduotone,\n\tfontFamily,\n\tfontSize,\n\tborder,\n\tposition,\n\tblockStyleVariation,\n\tchildLayout,\n] );\ncreateBlockSaveFilter( [\n\talign,\n\ttextAlign,\n\tanchor,\n\tariaLabel,\n\tcustomClassName,\n\tborder,\n\tcolor,\n\tstyle,\n\tfontFamily,\n\tfontSize,\n] );\n\nexport { useCustomSides } from './dimensions';\nexport { useLayoutClasses, useLayoutStyles } from './layout';\nexport { getBorderClassesAndStyles, useBorderProps } from './use-border-props';\nexport { getShadowClassesAndStyles } from './use-shadow-props';\nexport { getColorClassesAndStyles, useColorProps } from './use-color-props';\nexport { getSpacingClassesAndStyles } from './use-spacing-props';\nexport { getTypographyClassesAndStyles } from './use-typography-props';\nexport { getGapCSSValue } from './gap';\nexport { useCachedTruthy } from './use-cached-truthy';\nexport { setBackgroundStyleDefaults } from './background';\nexport { useZoomOut } from './use-zoom-out';\nexport { __unstableBlockStyleVariationOverridesWithConfig } from './block-style-variation';\nexport { useStyleOverride } from './utils';\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,qB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BE,WAAW,CACV,CAAC;AACHjB,qBAAqB,CAAE,CACtBC,KAAK,EACLW,SAAS,EACTT,MAAM,EACNC,SAAS,EACTC,eAAe,EACfQ,MAAM,EACNN,KAAK,EACLD,KAAK,EACLI,UAAU,EACVC,QAAQ,CACP,CAAC;AAEH,SAASY,cAAc,QAAQ,cAAc;AAC7C,SAASC,gBAAgB,EAAEC,eAAe,QAAQ,UAAU;AAC5D,SAASC,yBAAyB,EAAEC,cAAc,QAAQ,oBAAoB;AAC9E,SAASC,yBAAyB,QAAQ,oBAAoB;AAC9D,SAASC,wBAAwB,EAAEC,aAAa,QAAQ,mBAAmB;AAC3E,SAASC,0BAA0B,QAAQ,qBAAqB;AAChE,SAASC,6BAA6B,QAAQ,wBAAwB;AACtE,SAASC,cAAc,QAAQ,OAAO;AACtC,SAASC,eAAe,QAAQ,qBAAqB;AACrD,SAASC,0BAA0B,QAAQ,cAAc;AACzD,SAASC,UAAU,QAAQ,gBAAgB;AAC3C,SAASC,gDAAgD,QAAQ,yBAAyB;AAC1F,SAASC,gBAAgB,QAAQ,SAAS","ignoreList":[]}
1
+ {"version":3,"names":["createBlockEditFilter","createBlockListBlockFilter","createBlockSaveFilter","align","background","anchor","ariaLabel","customClassName","style","color","dimensions","duotone","fontFamily","fontSize","textAlign","border","position","blockStyleVariation","layout","childLayout","contentLockUI","blockHooks","blockBindingsPanel","filter","Boolean","useCustomSides","useLayoutClasses","useLayoutStyles","getBorderClassesAndStyles","useBorderProps","getShadowClassesAndStyles","getColorClassesAndStyles","useColorProps","getSpacingClassesAndStyles","getTypographyClassesAndStyles","getGapCSSValue","useCachedTruthy","setBackgroundStyleDefaults","useZoomOut","__unstableBlockStyleVariationOverridesWithConfig","useStyleOverride"],"sources":["@wordpress/block-editor/src/hooks/index.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport {\n\tcreateBlockEditFilter,\n\tcreateBlockListBlockFilter,\n\tcreateBlockSaveFilter,\n} from './utils';\nimport './compat';\nimport align from './align';\nimport background from './background';\nimport './lock';\nimport anchor from './anchor';\nimport ariaLabel from './aria-label';\nimport customClassName from './custom-class-name';\nimport './generated-class-name';\nimport style from './style';\nimport './settings';\nimport color from './color';\nimport dimensions from './dimensions';\nimport duotone from './duotone';\nimport fontFamily from './font-family';\nimport fontSize from './font-size';\nimport textAlign from './text-align';\nimport border from './border';\nimport position from './position';\nimport blockStyleVariation from './block-style-variation';\nimport layout from './layout';\nimport childLayout from './layout-child';\nimport contentLockUI from './content-lock-ui';\nimport './metadata';\nimport blockHooks from './block-hooks';\nimport blockBindingsPanel from './block-bindings';\nimport './block-renaming';\nimport './grid-visualizer';\n\ncreateBlockEditFilter(\n\t[\n\t\talign,\n\t\ttextAlign,\n\t\tanchor,\n\t\tcustomClassName,\n\t\tstyle,\n\t\tduotone,\n\t\tposition,\n\t\tlayout,\n\t\tcontentLockUI,\n\t\tblockHooks,\n\t\tblockBindingsPanel,\n\t\tchildLayout,\n\t].filter( Boolean )\n);\ncreateBlockListBlockFilter( [\n\talign,\n\ttextAlign,\n\tbackground,\n\tstyle,\n\tcolor,\n\tdimensions,\n\tduotone,\n\tfontFamily,\n\tfontSize,\n\tborder,\n\tposition,\n\tblockStyleVariation,\n\tchildLayout,\n] );\ncreateBlockSaveFilter( [\n\talign,\n\ttextAlign,\n\tanchor,\n\tariaLabel,\n\tcustomClassName,\n\tborder,\n\tcolor,\n\tstyle,\n\tfontFamily,\n\tfontSize,\n] );\n\nexport { useCustomSides } from './dimensions';\nexport { useLayoutClasses, useLayoutStyles } from './layout';\nexport { getBorderClassesAndStyles, useBorderProps } from './use-border-props';\nexport { getShadowClassesAndStyles } from './use-shadow-props';\nexport { getColorClassesAndStyles, useColorProps } from './use-color-props';\nexport { getSpacingClassesAndStyles } from './use-spacing-props';\nexport { getTypographyClassesAndStyles } from './use-typography-props';\nexport { getGapCSSValue } from './gap';\nexport { useCachedTruthy } from './use-cached-truthy';\nexport { setBackgroundStyleDefaults } from './background';\nexport { useZoomOut } from './use-zoom-out';\nexport { __unstableBlockStyleVariationOverridesWithConfig } from './block-style-variation';\nexport { useStyleOverride } from './utils';\n"],"mappings":"AAAA;AACA;AACA;AACA,SACCA,qBAAqB,EACrBC,0BAA0B,EAC1BC,qBAAqB,QACf,SAAS;AAChB,OAAO,UAAU;AACjB,OAAOC,KAAK,MAAM,SAAS;AAC3B,OAAOC,UAAU,MAAM,cAAc;AACrC,OAAO,QAAQ;AACf,OAAOC,MAAM,MAAM,UAAU;AAC7B,OAAOC,SAAS,MAAM,cAAc;AACpC,OAAOC,eAAe,MAAM,qBAAqB;AACjD,OAAO,wBAAwB;AAC/B,OAAOC,KAAK,MAAM,SAAS;AAC3B,OAAO,YAAY;AACnB,OAAOC,KAAK,MAAM,SAAS;AAC3B,OAAOC,UAAU,MAAM,cAAc;AACrC,OAAOC,OAAO,MAAM,WAAW;AAC/B,OAAOC,UAAU,MAAM,eAAe;AACtC,OAAOC,QAAQ,MAAM,aAAa;AAClC,OAAOC,SAAS,MAAM,cAAc;AACpC,OAAOC,MAAM,MAAM,UAAU;AAC7B,OAAOC,QAAQ,MAAM,YAAY;AACjC,OAAOC,mBAAmB,MAAM,yBAAyB;AACzD,OAAOC,MAAM,MAAM,UAAU;AAC7B,OAAOC,WAAW,MAAM,gBAAgB;AACxC,OAAOC,aAAa,MAAM,mBAAmB;AAC7C,OAAO,YAAY;AACnB,OAAOC,UAAU,MAAM,eAAe;AACtC,OAAOC,kBAAkB,MAAM,kBAAkB;AACjD,OAAO,kBAAkB;AACzB,OAAO,mBAAmB;AAE1BtB,qBAAqB,CACpB,CACCG,KAAK,EACLW,SAAS,EACTT,MAAM,EACNE,eAAe,EACfC,KAAK,EACLG,OAAO,EACPK,QAAQ,EACRE,MAAM,EACNE,aAAa,EACbC,UAAU,EACVC,kBAAkB,EAClBH,WAAW,CACX,CAACI,MAAM,CAAEC,OAAQ,CACnB,CAAC;AACDvB,0BAA0B,CAAE,CAC3BE,KAAK,EACLW,SAAS,EACTV,UAAU,EACVI,KAAK,EACLC,KAAK,EACLC,UAAU,EACVC,OAAO,EACPC,UAAU,EACVC,QAAQ,EACRE,MAAM,EACNC,QAAQ,EACRC,mBAAmB,EACnBE,WAAW,CACV,CAAC;AACHjB,qBAAqB,CAAE,CACtBC,KAAK,EACLW,SAAS,EACTT,MAAM,EACNC,SAAS,EACTC,eAAe,EACfQ,MAAM,EACNN,KAAK,EACLD,KAAK,EACLI,UAAU,EACVC,QAAQ,CACP,CAAC;AAEH,SAASY,cAAc,QAAQ,cAAc;AAC7C,SAASC,gBAAgB,EAAEC,eAAe,QAAQ,UAAU;AAC5D,SAASC,yBAAyB,EAAEC,cAAc,QAAQ,oBAAoB;AAC9E,SAASC,yBAAyB,QAAQ,oBAAoB;AAC9D,SAASC,wBAAwB,EAAEC,aAAa,QAAQ,mBAAmB;AAC3E,SAASC,0BAA0B,QAAQ,qBAAqB;AAChE,SAASC,6BAA6B,QAAQ,wBAAwB;AACtE,SAASC,cAAc,QAAQ,OAAO;AACtC,SAASC,eAAe,QAAQ,qBAAqB;AACrD,SAASC,0BAA0B,QAAQ,cAAc;AACzD,SAASC,UAAU,QAAQ,gBAAgB;AAC3C,SAASC,gDAAgD,QAAQ,yBAAyB;AAC1F,SAASC,gBAAgB,QAAQ,SAAS","ignoreList":[]}
@@ -1,4 +1,3 @@
1
- /* wp:polyfill */
2
1
  /**
3
2
  * External dependencies
4
3
  */
@@ -1 +1 @@
1
- {"version":3,"names":["clsx","createHigherOrderComponent","useInstanceId","addFilter","getBlockSupport","hasBlockSupport","useSelect","__experimentalToggleGroupControl","ToggleGroupControl","__experimentalToggleGroupControlOption","ToggleGroupControlOption","ToggleControl","PanelBody","privateApis","componentsPrivateApis","__","store","blockEditorStore","InspectorControls","useSettings","getLayoutType","getLayoutTypes","useBlockEditingMode","LAYOUT_DEFINITIONS","useBlockSettings","useStyleOverride","unlock","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","layoutBlockSupportKey","kebabCase","hasLayoutBlockSupport","blockName","useLayoutClasses","blockAttributes","layout","default","defaultBlockLayout","usedLayout","inherit","contentSize","wideSize","type","layoutClassnames","className","baseClassName","splitBlockName","split","fullBlockName","pop","join","compoundClassName","push","hasGlobalPadding","select","getSettings","__experimentalFeatures","useRootPaddingAwareAlignments","orientation","justifyContent","flexWrap","useLayoutStyles","selector","style","fullLayoutType","blockGapSupport","hasBlockGapSupport","getLayoutStyle","LayoutPanelPure","setAttributes","name","clientId","settings","layoutSettings","themeSupportsLayout","supportsLayout","blockEditingMode","layoutBlockSupport","blockSupportAndThemeSettings","allowSwitching","allowEditing","allowInheriting","blockSupportAndLayout","defaultType","blockLayoutType","showInheritToggle","layoutType","constrainedType","displayControlsForLegacyLayouts","hasContentSizeOrLegacySettings","onChangeType","newType","onChangeLayout","newLayout","children","title","__nextHasNoMarginBottom","label","checked","onChange","help","LayoutTypeSwitcher","inspectorControls","toolBarControls","shareWithChildBlocks","edit","attributeKeys","hasSupport","__next40pxDefaultSize","isBlock","hideLabelFromVision","isAdaptiveWidth","value","map","addAttribute","_settings$attributes$","attributes","BlockWithLayoutStyles","block","BlockListBlock","props","layoutClasses","id","selectorPrefix","css","layoutClassNames","__unstableLayoutClassNames","withLayoutStyles","blockSupportsLayout","extraProps","getBlockSettings","disableLayoutStyles","undefined"],"sources":["@wordpress/block-editor/src/hooks/layout.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { createHigherOrderComponent, useInstanceId } from '@wordpress/compose';\nimport { addFilter } from '@wordpress/hooks';\nimport { getBlockSupport, hasBlockSupport } from '@wordpress/blocks';\nimport { useSelect } from '@wordpress/data';\nimport {\n\t__experimentalToggleGroupControl as ToggleGroupControl,\n\t__experimentalToggleGroupControlOption as ToggleGroupControlOption,\n\tToggleControl,\n\tPanelBody,\n\tprivateApis as componentsPrivateApis,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../store';\nimport { InspectorControls } from '../components';\nimport { useSettings } from '../components/use-settings';\nimport { getLayoutType, getLayoutTypes } from '../layouts';\nimport { useBlockEditingMode } from '../components/block-editing-mode';\nimport { LAYOUT_DEFINITIONS } from '../layouts/definitions';\nimport { useBlockSettings, useStyleOverride } from './utils';\nimport { unlock } from '../lock-unlock';\n\nconst layoutBlockSupportKey = 'layout';\nconst { kebabCase } = unlock( componentsPrivateApis );\n\nfunction hasLayoutBlockSupport( blockName ) {\n\treturn (\n\t\thasBlockSupport( blockName, 'layout' ) ||\n\t\thasBlockSupport( blockName, '__experimentalLayout' )\n\t);\n}\n\n/**\n * Generates the utility classnames for the given block's layout attributes.\n *\n * @param { Object } blockAttributes Block attributes.\n * @param { string } blockName Block name.\n *\n * @return { Array } Array of CSS classname strings.\n */\nexport function useLayoutClasses( blockAttributes = {}, blockName = '' ) {\n\tconst { layout } = blockAttributes;\n\tconst { default: defaultBlockLayout } =\n\t\tgetBlockSupport( blockName, layoutBlockSupportKey ) || {};\n\tconst usedLayout =\n\t\tlayout?.inherit || layout?.contentSize || layout?.wideSize\n\t\t\t? { ...layout, type: 'constrained' }\n\t\t\t: layout || defaultBlockLayout || {};\n\n\tconst layoutClassnames = [];\n\n\tif ( LAYOUT_DEFINITIONS[ usedLayout?.type || 'default' ]?.className ) {\n\t\tconst baseClassName =\n\t\t\tLAYOUT_DEFINITIONS[ usedLayout?.type || 'default' ]?.className;\n\t\tconst splitBlockName = blockName.split( '/' );\n\t\tconst fullBlockName =\n\t\t\tsplitBlockName[ 0 ] === 'core'\n\t\t\t\t? splitBlockName.pop()\n\t\t\t\t: splitBlockName.join( '-' );\n\t\tconst compoundClassName = `wp-block-${ fullBlockName }-${ baseClassName }`;\n\t\tlayoutClassnames.push( baseClassName, compoundClassName );\n\t}\n\n\tconst hasGlobalPadding = useSelect(\n\t\t( select ) => {\n\t\t\treturn (\n\t\t\t\t( usedLayout?.inherit ||\n\t\t\t\t\tusedLayout?.contentSize ||\n\t\t\t\t\tusedLayout?.type === 'constrained' ) &&\n\t\t\t\tselect( blockEditorStore ).getSettings().__experimentalFeatures\n\t\t\t\t\t?.useRootPaddingAwareAlignments\n\t\t\t);\n\t\t},\n\t\t[ usedLayout?.contentSize, usedLayout?.inherit, usedLayout?.type ]\n\t);\n\n\tif ( hasGlobalPadding ) {\n\t\tlayoutClassnames.push( 'has-global-padding' );\n\t}\n\n\tif ( usedLayout?.orientation ) {\n\t\tlayoutClassnames.push( `is-${ kebabCase( usedLayout.orientation ) }` );\n\t}\n\n\tif ( usedLayout?.justifyContent ) {\n\t\tlayoutClassnames.push(\n\t\t\t`is-content-justification-${ kebabCase(\n\t\t\t\tusedLayout.justifyContent\n\t\t\t) }`\n\t\t);\n\t}\n\n\tif ( usedLayout?.flexWrap && usedLayout.flexWrap === 'nowrap' ) {\n\t\tlayoutClassnames.push( 'is-nowrap' );\n\t}\n\n\treturn layoutClassnames;\n}\n\n/**\n * Generates a CSS rule with the given block's layout styles.\n *\n * @param { Object } blockAttributes Block attributes.\n * @param { string } blockName Block name.\n * @param { string } selector A selector to use in generating the CSS rule.\n *\n * @return { string } CSS rule.\n */\nexport function useLayoutStyles( blockAttributes = {}, blockName, selector ) {\n\tconst { layout = {}, style = {} } = blockAttributes;\n\t// Update type for blocks using legacy layouts.\n\tconst usedLayout =\n\t\tlayout?.inherit || layout?.contentSize || layout?.wideSize\n\t\t\t? { ...layout, type: 'constrained' }\n\t\t\t: layout || {};\n\tconst fullLayoutType = getLayoutType( usedLayout?.type || 'default' );\n\tconst [ blockGapSupport ] = useSettings( 'spacing.blockGap' );\n\tconst hasBlockGapSupport = blockGapSupport !== null;\n\treturn fullLayoutType?.getLayoutStyle?.( {\n\t\tblockName,\n\t\tselector,\n\t\tlayout,\n\t\tstyle,\n\t\thasBlockGapSupport,\n\t} );\n}\n\nfunction LayoutPanelPure( {\n\tlayout,\n\tsetAttributes,\n\tname: blockName,\n\tclientId,\n} ) {\n\tconst settings = useBlockSettings( blockName );\n\t// Block settings come from theme.json under settings.[blockName].\n\tconst { layout: layoutSettings } = settings;\n\tconst { themeSupportsLayout } = useSelect( ( select ) => {\n\t\tconst { getSettings } = select( blockEditorStore );\n\t\treturn {\n\t\t\tthemeSupportsLayout: getSettings().supportsLayout,\n\t\t};\n\t}, [] );\n\tconst blockEditingMode = useBlockEditingMode();\n\n\tif ( blockEditingMode !== 'default' ) {\n\t\treturn null;\n\t}\n\n\t// Layout block support comes from the block's block.json.\n\tconst layoutBlockSupport = getBlockSupport(\n\t\tblockName,\n\t\tlayoutBlockSupportKey,\n\t\t{}\n\t);\n\tconst blockSupportAndThemeSettings = {\n\t\t...layoutSettings,\n\t\t...layoutBlockSupport,\n\t};\n\tconst {\n\t\tallowSwitching,\n\t\tallowEditing = true,\n\t\tallowInheriting = true,\n\t\tdefault: defaultBlockLayout,\n\t} = blockSupportAndThemeSettings;\n\n\tif ( ! allowEditing ) {\n\t\treturn null;\n\t}\n\n\t/*\n\t * Try to find the layout type from either the\n\t * block's layout settings or any saved layout config.\n\t */\n\tconst blockSupportAndLayout = {\n\t\t...layoutBlockSupport,\n\t\t...layout,\n\t};\n\tconst { type, default: { type: defaultType = 'default' } = {} } =\n\t\tblockSupportAndLayout;\n\tconst blockLayoutType = type || defaultType;\n\n\t// Only show the inherit toggle if it's supported,\n\t// and either the default / flow or the constrained layout type is in use, as the toggle switches from one to the other.\n\tconst showInheritToggle = !! (\n\t\tallowInheriting &&\n\t\t( ! blockLayoutType ||\n\t\t\tblockLayoutType === 'default' ||\n\t\t\tblockLayoutType === 'constrained' ||\n\t\t\tblockSupportAndLayout.inherit )\n\t);\n\n\tconst usedLayout = layout || defaultBlockLayout || {};\n\tconst { inherit = false, contentSize = null } = usedLayout;\n\t/**\n\t * `themeSupportsLayout` is only relevant to the `default/flow` or\n\t * `constrained` layouts and it should not be taken into account when other\n\t * `layout` types are used.\n\t */\n\tif (\n\t\t( blockLayoutType === 'default' ||\n\t\t\tblockLayoutType === 'constrained' ) &&\n\t\t! themeSupportsLayout\n\t) {\n\t\treturn null;\n\t}\n\tconst layoutType = getLayoutType( blockLayoutType );\n\tconst constrainedType = getLayoutType( 'constrained' );\n\tconst displayControlsForLegacyLayouts =\n\t\t! usedLayout.type && ( contentSize || inherit );\n\tconst hasContentSizeOrLegacySettings = !! inherit || !! contentSize;\n\n\tconst onChangeType = ( newType ) =>\n\t\tsetAttributes( { layout: { type: newType } } );\n\tconst onChangeLayout = ( newLayout ) =>\n\t\tsetAttributes( { layout: newLayout } );\n\n\treturn (\n\t\t<>\n\t\t\t<InspectorControls>\n\t\t\t\t<PanelBody title={ __( 'Layout' ) }>\n\t\t\t\t\t{ showInheritToggle && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\tlabel={ __( 'Inner blocks use content width' ) }\n\t\t\t\t\t\t\t\tchecked={\n\t\t\t\t\t\t\t\t\tlayoutType?.name === 'constrained' ||\n\t\t\t\t\t\t\t\t\thasContentSizeOrLegacySettings\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tonChange={ () =>\n\t\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\t\tlayout: {\n\t\t\t\t\t\t\t\t\t\t\ttype:\n\t\t\t\t\t\t\t\t\t\t\t\tlayoutType?.name ===\n\t\t\t\t\t\t\t\t\t\t\t\t\t'constrained' ||\n\t\t\t\t\t\t\t\t\t\t\t\thasContentSizeOrLegacySettings\n\t\t\t\t\t\t\t\t\t\t\t\t\t? 'default'\n\t\t\t\t\t\t\t\t\t\t\t\t\t: 'constrained',\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\thelp={\n\t\t\t\t\t\t\t\t\tlayoutType?.name === 'constrained' ||\n\t\t\t\t\t\t\t\t\thasContentSizeOrLegacySettings\n\t\t\t\t\t\t\t\t\t\t? __(\n\t\t\t\t\t\t\t\t\t\t\t\t'Nested blocks use content width with options for full and wide widths.'\n\t\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t\t: __(\n\t\t\t\t\t\t\t\t\t\t\t\t'Nested blocks will fill the width of this container. Toggle to constrain.'\n\t\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</>\n\t\t\t\t\t) }\n\n\t\t\t\t\t{ ! inherit && allowSwitching && (\n\t\t\t\t\t\t<LayoutTypeSwitcher\n\t\t\t\t\t\t\ttype={ blockLayoutType }\n\t\t\t\t\t\t\tonChange={ onChangeType }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\n\t\t\t\t\t{ layoutType && layoutType.name !== 'default' && (\n\t\t\t\t\t\t<layoutType.inspectorControls\n\t\t\t\t\t\t\tlayout={ usedLayout }\n\t\t\t\t\t\t\tonChange={ onChangeLayout }\n\t\t\t\t\t\t\tlayoutBlockSupport={ blockSupportAndThemeSettings }\n\t\t\t\t\t\t\tname={ blockName }\n\t\t\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ constrainedType && displayControlsForLegacyLayouts && (\n\t\t\t\t\t\t<constrainedType.inspectorControls\n\t\t\t\t\t\t\tlayout={ usedLayout }\n\t\t\t\t\t\t\tonChange={ onChangeLayout }\n\t\t\t\t\t\t\tlayoutBlockSupport={ blockSupportAndThemeSettings }\n\t\t\t\t\t\t\tname={ blockName }\n\t\t\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</PanelBody>\n\t\t\t</InspectorControls>\n\t\t\t{ ! inherit && layoutType && (\n\t\t\t\t<layoutType.toolBarControls\n\t\t\t\t\tlayout={ usedLayout }\n\t\t\t\t\tonChange={ onChangeLayout }\n\t\t\t\t\tlayoutBlockSupport={ layoutBlockSupport }\n\t\t\t\t\tname={ blockName }\n\t\t\t\t\tclientId={ clientId }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default {\n\tshareWithChildBlocks: true,\n\tedit: LayoutPanelPure,\n\tattributeKeys: [ 'layout' ],\n\thasSupport( name ) {\n\t\treturn hasLayoutBlockSupport( name );\n\t},\n};\n\nfunction LayoutTypeSwitcher( { type, onChange } ) {\n\treturn (\n\t\t<ToggleGroupControl\n\t\t\t__next40pxDefaultSize\n\t\t\tisBlock\n\t\t\tlabel={ __( 'Layout type' ) }\n\t\t\t__nextHasNoMarginBottom\n\t\t\thideLabelFromVision\n\t\t\tisAdaptiveWidth\n\t\t\tvalue={ type }\n\t\t\tonChange={ onChange }\n\t\t>\n\t\t\t{ getLayoutTypes().map( ( { name, label } ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<ToggleGroupControlOption\n\t\t\t\t\t\tkey={ name }\n\t\t\t\t\t\tvalue={ name }\n\t\t\t\t\t\tlabel={ label }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</ToggleGroupControl>\n\t);\n}\n\n/**\n * Filters registered block settings, extending attributes to include `layout`.\n *\n * @param {Object} settings Original block settings.\n *\n * @return {Object} Filtered block settings.\n */\nexport function addAttribute( settings ) {\n\tif ( 'type' in ( settings.attributes?.layout ?? {} ) ) {\n\t\treturn settings;\n\t}\n\tif ( hasLayoutBlockSupport( settings ) ) {\n\t\tsettings.attributes = {\n\t\t\t...settings.attributes,\n\t\t\tlayout: {\n\t\t\t\ttype: 'object',\n\t\t\t},\n\t\t};\n\t}\n\n\treturn settings;\n}\n\nfunction BlockWithLayoutStyles( {\n\tblock: BlockListBlock,\n\tprops,\n\tblockGapSupport,\n\tlayoutClasses,\n} ) {\n\tconst { name, attributes } = props;\n\tconst id = useInstanceId( BlockListBlock );\n\tconst { layout } = attributes;\n\tconst { default: defaultBlockLayout } =\n\t\tgetBlockSupport( name, layoutBlockSupportKey ) || {};\n\tconst usedLayout =\n\t\tlayout?.inherit || layout?.contentSize || layout?.wideSize\n\t\t\t? { ...layout, type: 'constrained' }\n\t\t\t: layout || defaultBlockLayout || {};\n\n\tconst selectorPrefix = `wp-container-${ kebabCase( name ) }-is-layout-`;\n\t// Higher specificity to override defaults from theme.json.\n\tconst selector = `.${ selectorPrefix }${ id }`;\n\tconst hasBlockGapSupport = blockGapSupport !== null;\n\n\t// Get CSS string for the current layout type.\n\t// The CSS and `style` element is only output if it is not empty.\n\tconst fullLayoutType = getLayoutType( usedLayout?.type || 'default' );\n\tconst css = fullLayoutType?.getLayoutStyle?.( {\n\t\tblockName: name,\n\t\tselector,\n\t\tlayout: usedLayout,\n\t\tstyle: attributes?.style,\n\t\thasBlockGapSupport,\n\t} );\n\n\t// Attach a `wp-container-` id-based class name as well as a layout class name such as `is-layout-flex`.\n\tconst layoutClassNames = clsx(\n\t\t{\n\t\t\t[ `${ selectorPrefix }${ id }` ]: !! css, // Only attach a container class if there is generated CSS to be attached.\n\t\t},\n\t\tlayoutClasses\n\t);\n\n\tuseStyleOverride( { css } );\n\n\treturn (\n\t\t<BlockListBlock\n\t\t\t{ ...props }\n\t\t\t__unstableLayoutClassNames={ layoutClassNames }\n\t\t/>\n\t);\n}\n\n/**\n * Override the default block element to add the layout styles.\n *\n * @param {Function} BlockListBlock Original component.\n *\n * @return {Function} Wrapped component.\n */\nexport const withLayoutStyles = createHigherOrderComponent(\n\t( BlockListBlock ) => ( props ) => {\n\t\tconst { clientId, name, attributes } = props;\n\t\tconst blockSupportsLayout = hasLayoutBlockSupport( name );\n\t\tconst layoutClasses = useLayoutClasses( attributes, name );\n\t\tconst extraProps = useSelect(\n\t\t\t( select ) => {\n\t\t\t\t// The callback returns early to avoid block editor subscription.\n\t\t\t\tif ( ! blockSupportsLayout ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst { getSettings, getBlockSettings } = unlock(\n\t\t\t\t\tselect( blockEditorStore )\n\t\t\t\t);\n\t\t\t\tconst { disableLayoutStyles } = getSettings();\n\n\t\t\t\tif ( disableLayoutStyles ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst [ blockGapSupport ] = getBlockSettings(\n\t\t\t\t\tclientId,\n\t\t\t\t\t'spacing.blockGap'\n\t\t\t\t);\n\n\t\t\t\treturn { blockGapSupport };\n\t\t\t},\n\t\t\t[ blockSupportsLayout, clientId ]\n\t\t);\n\n\t\tif ( ! extraProps ) {\n\t\t\treturn (\n\t\t\t\t<BlockListBlock\n\t\t\t\t\t{ ...props }\n\t\t\t\t\t__unstableLayoutClassNames={\n\t\t\t\t\t\tblockSupportsLayout ? layoutClasses : undefined\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<BlockWithLayoutStyles\n\t\t\t\tblock={ BlockListBlock }\n\t\t\t\tprops={ props }\n\t\t\t\tlayoutClasses={ layoutClasses }\n\t\t\t\t{ ...extraProps }\n\t\t\t/>\n\t\t);\n\t},\n\t'withLayoutStyles'\n);\n\naddFilter(\n\t'blocks.registerBlockType',\n\t'core/layout/addAttribute',\n\taddAttribute\n);\naddFilter(\n\t'editor.BlockListBlock',\n\t'core/editor/layout/with-layout-styles',\n\twithLayoutStyles\n);\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,0BAA0B,EAAEC,aAAa,QAAQ,oBAAoB;AAC9E,SAASC,SAAS,QAAQ,kBAAkB;AAC5C,SAASC,eAAe,EAAEC,eAAe,QAAQ,mBAAmB;AACpE,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SACCC,gCAAgC,IAAIC,kBAAkB,EACtDC,sCAAsC,IAAIC,wBAAwB,EAClEC,aAAa,EACbC,SAAS,EACTC,WAAW,IAAIC,qBAAqB,QAC9B,uBAAuB;AAC9B,SAASC,EAAE,QAAQ,iBAAiB;;AAEpC;AACA;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I;IAAE8C;EAAW,CAAC,GAAGI,KAAK;EAC5C,MAAMQ,mBAAmB,GAAGjG,qBAAqB,CAAEuC,IAAK,CAAC;EACzD,MAAMmD,aAAa,GAAGxF,gBAAgB,CAAEmF,UAAU,EAAE9C,IAAK,CAAC;EAC1D,MAAM2D,UAAU,GAAG/H,SAAS,CACzBoD,MAAM,IAAM;IACb;IACA,IAAK,CAAE0E,mBAAmB,EAAG;MAC5B;IACD;IAEA,MAAM;MAAEzE,WAAW;MAAE2E;IAAiB,CAAC,GAAG5G,MAAM,CAC/CgC,MAAM,CAAEzC,gBAAiB,CAC1B,CAAC;IACD,MAAM;MAAEsH;IAAoB,CAAC,GAAG5E,WAAW,CAAC,CAAC;IAE7C,IAAK4E,mBAAmB,EAAG;MAC1B;IACD;IAEA,MAAM,CAAElE,eAAe,CAAE,GAAGiE,gBAAgB,CAC3C3D,QAAQ,EACR,kBACD,CAAC;IAED,OAAO;MAAEN;IAAgB,CAAC;EAC3B,CAAC,EACD,CAAE+D,mBAAmB,EAAEzD,QAAQ,CAChC,CAAC;EAED,IAAK,CAAE0D,UAAU,EAAG;IACnB,oBACCzG,IAAA,CAAC+F,cAAc;MAAA,GACTC,KAAK;MACVM,0BAA0B,EACzBE,mBAAmB,GAAGP,aAAa,GAAGW;IACtC,CACD,CAAC;EAEJ;EAEA,oBACC5G,IAAA,CAAC6F,qBAAqB;IACrBC,KAAK,EAAGC,cAAgB;IACxBC,KAAK,EAAGA,KAAO;IACfC,aAAa,EAAGA,aAAe;IAAA,GAC1BQ;EAAU,CACf,CAAC;AAEJ,CAAC,EACD,kBACD,CAAC;AAEDlI,SAAS,CACR,0BAA0B,EAC1B,0BAA0B,EAC1BmH,YACD,CAAC;AACDnH,SAAS,CACR,uBAAuB,EACvB,uCAAuC,EACvCgI,gBACD,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["clsx","createHigherOrderComponent","useInstanceId","addFilter","getBlockSupport","hasBlockSupport","useSelect","__experimentalToggleGroupControl","ToggleGroupControl","__experimentalToggleGroupControlOption","ToggleGroupControlOption","ToggleControl","PanelBody","privateApis","componentsPrivateApis","__","store","blockEditorStore","InspectorControls","useSettings","getLayoutType","getLayoutTypes","useBlockEditingMode","LAYOUT_DEFINITIONS","useBlockSettings","useStyleOverride","unlock","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","layoutBlockSupportKey","kebabCase","hasLayoutBlockSupport","blockName","useLayoutClasses","blockAttributes","layout","default","defaultBlockLayout","usedLayout","inherit","contentSize","wideSize","type","layoutClassnames","className","baseClassName","splitBlockName","split","fullBlockName","pop","join","compoundClassName","push","hasGlobalPadding","select","getSettings","__experimentalFeatures","useRootPaddingAwareAlignments","orientation","justifyContent","flexWrap","useLayoutStyles","selector","style","fullLayoutType","blockGapSupport","hasBlockGapSupport","getLayoutStyle","LayoutPanelPure","setAttributes","name","clientId","settings","layoutSettings","themeSupportsLayout","supportsLayout","blockEditingMode","layoutBlockSupport","blockSupportAndThemeSettings","allowSwitching","allowEditing","allowInheriting","blockSupportAndLayout","defaultType","blockLayoutType","showInheritToggle","layoutType","constrainedType","displayControlsForLegacyLayouts","hasContentSizeOrLegacySettings","onChangeType","newType","onChangeLayout","newLayout","children","title","__nextHasNoMarginBottom","label","checked","onChange","help","LayoutTypeSwitcher","inspectorControls","toolBarControls","shareWithChildBlocks","edit","attributeKeys","hasSupport","__next40pxDefaultSize","isBlock","hideLabelFromVision","isAdaptiveWidth","value","map","addAttribute","_settings$attributes$","attributes","BlockWithLayoutStyles","block","BlockListBlock","props","layoutClasses","id","selectorPrefix","css","layoutClassNames","__unstableLayoutClassNames","withLayoutStyles","blockSupportsLayout","extraProps","getBlockSettings","disableLayoutStyles","undefined"],"sources":["@wordpress/block-editor/src/hooks/layout.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { createHigherOrderComponent, useInstanceId } from '@wordpress/compose';\nimport { addFilter } from '@wordpress/hooks';\nimport { getBlockSupport, hasBlockSupport } from '@wordpress/blocks';\nimport { useSelect } from '@wordpress/data';\nimport {\n\t__experimentalToggleGroupControl as ToggleGroupControl,\n\t__experimentalToggleGroupControlOption as ToggleGroupControlOption,\n\tToggleControl,\n\tPanelBody,\n\tprivateApis as componentsPrivateApis,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../store';\nimport { InspectorControls } from '../components';\nimport { useSettings } from '../components/use-settings';\nimport { getLayoutType, getLayoutTypes } from '../layouts';\nimport { useBlockEditingMode } from '../components/block-editing-mode';\nimport { LAYOUT_DEFINITIONS } from '../layouts/definitions';\nimport { useBlockSettings, useStyleOverride } from './utils';\nimport { unlock } from '../lock-unlock';\n\nconst layoutBlockSupportKey = 'layout';\nconst { kebabCase } = unlock( componentsPrivateApis );\n\nfunction hasLayoutBlockSupport( blockName ) {\n\treturn (\n\t\thasBlockSupport( blockName, 'layout' ) ||\n\t\thasBlockSupport( blockName, '__experimentalLayout' )\n\t);\n}\n\n/**\n * Generates the utility classnames for the given block's layout attributes.\n *\n * @param { Object } blockAttributes Block attributes.\n * @param { string } blockName Block name.\n *\n * @return { Array } Array of CSS classname strings.\n */\nexport function useLayoutClasses( blockAttributes = {}, blockName = '' ) {\n\tconst { layout } = blockAttributes;\n\tconst { default: defaultBlockLayout } =\n\t\tgetBlockSupport( blockName, layoutBlockSupportKey ) || {};\n\tconst usedLayout =\n\t\tlayout?.inherit || layout?.contentSize || layout?.wideSize\n\t\t\t? { ...layout, type: 'constrained' }\n\t\t\t: layout || defaultBlockLayout || {};\n\n\tconst layoutClassnames = [];\n\n\tif ( LAYOUT_DEFINITIONS[ usedLayout?.type || 'default' ]?.className ) {\n\t\tconst baseClassName =\n\t\t\tLAYOUT_DEFINITIONS[ usedLayout?.type || 'default' ]?.className;\n\t\tconst splitBlockName = blockName.split( '/' );\n\t\tconst fullBlockName =\n\t\t\tsplitBlockName[ 0 ] === 'core'\n\t\t\t\t? splitBlockName.pop()\n\t\t\t\t: splitBlockName.join( '-' );\n\t\tconst compoundClassName = `wp-block-${ fullBlockName }-${ baseClassName }`;\n\t\tlayoutClassnames.push( baseClassName, compoundClassName );\n\t}\n\n\tconst hasGlobalPadding = useSelect(\n\t\t( select ) => {\n\t\t\treturn (\n\t\t\t\t( usedLayout?.inherit ||\n\t\t\t\t\tusedLayout?.contentSize ||\n\t\t\t\t\tusedLayout?.type === 'constrained' ) &&\n\t\t\t\tselect( blockEditorStore ).getSettings().__experimentalFeatures\n\t\t\t\t\t?.useRootPaddingAwareAlignments\n\t\t\t);\n\t\t},\n\t\t[ usedLayout?.contentSize, usedLayout?.inherit, usedLayout?.type ]\n\t);\n\n\tif ( hasGlobalPadding ) {\n\t\tlayoutClassnames.push( 'has-global-padding' );\n\t}\n\n\tif ( usedLayout?.orientation ) {\n\t\tlayoutClassnames.push( `is-${ kebabCase( usedLayout.orientation ) }` );\n\t}\n\n\tif ( usedLayout?.justifyContent ) {\n\t\tlayoutClassnames.push(\n\t\t\t`is-content-justification-${ kebabCase(\n\t\t\t\tusedLayout.justifyContent\n\t\t\t) }`\n\t\t);\n\t}\n\n\tif ( usedLayout?.flexWrap && usedLayout.flexWrap === 'nowrap' ) {\n\t\tlayoutClassnames.push( 'is-nowrap' );\n\t}\n\n\treturn layoutClassnames;\n}\n\n/**\n * Generates a CSS rule with the given block's layout styles.\n *\n * @param { Object } blockAttributes Block attributes.\n * @param { string } blockName Block name.\n * @param { string } selector A selector to use in generating the CSS rule.\n *\n * @return { string } CSS rule.\n */\nexport function useLayoutStyles( blockAttributes = {}, blockName, selector ) {\n\tconst { layout = {}, style = {} } = blockAttributes;\n\t// Update type for blocks using legacy layouts.\n\tconst usedLayout =\n\t\tlayout?.inherit || layout?.contentSize || layout?.wideSize\n\t\t\t? { ...layout, type: 'constrained' }\n\t\t\t: layout || {};\n\tconst fullLayoutType = getLayoutType( usedLayout?.type || 'default' );\n\tconst [ blockGapSupport ] = useSettings( 'spacing.blockGap' );\n\tconst hasBlockGapSupport = blockGapSupport !== null;\n\treturn fullLayoutType?.getLayoutStyle?.( {\n\t\tblockName,\n\t\tselector,\n\t\tlayout,\n\t\tstyle,\n\t\thasBlockGapSupport,\n\t} );\n}\n\nfunction LayoutPanelPure( {\n\tlayout,\n\tsetAttributes,\n\tname: blockName,\n\tclientId,\n} ) {\n\tconst settings = useBlockSettings( blockName );\n\t// Block settings come from theme.json under settings.[blockName].\n\tconst { layout: layoutSettings } = settings;\n\tconst { themeSupportsLayout } = useSelect( ( select ) => {\n\t\tconst { getSettings } = select( blockEditorStore );\n\t\treturn {\n\t\t\tthemeSupportsLayout: getSettings().supportsLayout,\n\t\t};\n\t}, [] );\n\tconst blockEditingMode = useBlockEditingMode();\n\n\tif ( blockEditingMode !== 'default' ) {\n\t\treturn null;\n\t}\n\n\t// Layout block support comes from the block's block.json.\n\tconst layoutBlockSupport = getBlockSupport(\n\t\tblockName,\n\t\tlayoutBlockSupportKey,\n\t\t{}\n\t);\n\tconst blockSupportAndThemeSettings = {\n\t\t...layoutSettings,\n\t\t...layoutBlockSupport,\n\t};\n\tconst {\n\t\tallowSwitching,\n\t\tallowEditing = true,\n\t\tallowInheriting = true,\n\t\tdefault: defaultBlockLayout,\n\t} = blockSupportAndThemeSettings;\n\n\tif ( ! allowEditing ) {\n\t\treturn null;\n\t}\n\n\t/*\n\t * Try to find the layout type from either the\n\t * block's layout settings or any saved layout config.\n\t */\n\tconst blockSupportAndLayout = {\n\t\t...layoutBlockSupport,\n\t\t...layout,\n\t};\n\tconst { type, default: { type: defaultType = 'default' } = {} } =\n\t\tblockSupportAndLayout;\n\tconst blockLayoutType = type || defaultType;\n\n\t// Only show the inherit toggle if it's supported,\n\t// and either the default / flow or the constrained layout type is in use, as the toggle switches from one to the other.\n\tconst showInheritToggle = !! (\n\t\tallowInheriting &&\n\t\t( ! blockLayoutType ||\n\t\t\tblockLayoutType === 'default' ||\n\t\t\tblockLayoutType === 'constrained' ||\n\t\t\tblockSupportAndLayout.inherit )\n\t);\n\n\tconst usedLayout = layout || defaultBlockLayout || {};\n\tconst { inherit = false, contentSize = null } = usedLayout;\n\t/**\n\t * `themeSupportsLayout` is only relevant to the `default/flow` or\n\t * `constrained` layouts and it should not be taken into account when other\n\t * `layout` types are used.\n\t */\n\tif (\n\t\t( blockLayoutType === 'default' ||\n\t\t\tblockLayoutType === 'constrained' ) &&\n\t\t! themeSupportsLayout\n\t) {\n\t\treturn null;\n\t}\n\tconst layoutType = getLayoutType( blockLayoutType );\n\tconst constrainedType = getLayoutType( 'constrained' );\n\tconst displayControlsForLegacyLayouts =\n\t\t! usedLayout.type && ( contentSize || inherit );\n\tconst hasContentSizeOrLegacySettings = !! inherit || !! contentSize;\n\n\tconst onChangeType = ( newType ) =>\n\t\tsetAttributes( { layout: { type: newType } } );\n\tconst onChangeLayout = ( newLayout ) =>\n\t\tsetAttributes( { layout: newLayout } );\n\n\treturn (\n\t\t<>\n\t\t\t<InspectorControls>\n\t\t\t\t<PanelBody title={ __( 'Layout' ) }>\n\t\t\t\t\t{ showInheritToggle && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\tlabel={ __( 'Inner blocks use content width' ) }\n\t\t\t\t\t\t\t\tchecked={\n\t\t\t\t\t\t\t\t\tlayoutType?.name === 'constrained' ||\n\t\t\t\t\t\t\t\t\thasContentSizeOrLegacySettings\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tonChange={ () =>\n\t\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\t\tlayout: {\n\t\t\t\t\t\t\t\t\t\t\ttype:\n\t\t\t\t\t\t\t\t\t\t\t\tlayoutType?.name ===\n\t\t\t\t\t\t\t\t\t\t\t\t\t'constrained' ||\n\t\t\t\t\t\t\t\t\t\t\t\thasContentSizeOrLegacySettings\n\t\t\t\t\t\t\t\t\t\t\t\t\t? 'default'\n\t\t\t\t\t\t\t\t\t\t\t\t\t: 'constrained',\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\thelp={\n\t\t\t\t\t\t\t\t\tlayoutType?.name === 'constrained' ||\n\t\t\t\t\t\t\t\t\thasContentSizeOrLegacySettings\n\t\t\t\t\t\t\t\t\t\t? __(\n\t\t\t\t\t\t\t\t\t\t\t\t'Nested blocks use content width with options for full and wide widths.'\n\t\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t\t: __(\n\t\t\t\t\t\t\t\t\t\t\t\t'Nested blocks will fill the width of this container. Toggle to constrain.'\n\t\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</>\n\t\t\t\t\t) }\n\n\t\t\t\t\t{ ! inherit && allowSwitching && (\n\t\t\t\t\t\t<LayoutTypeSwitcher\n\t\t\t\t\t\t\ttype={ blockLayoutType }\n\t\t\t\t\t\t\tonChange={ onChangeType }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\n\t\t\t\t\t{ layoutType && layoutType.name !== 'default' && (\n\t\t\t\t\t\t<layoutType.inspectorControls\n\t\t\t\t\t\t\tlayout={ usedLayout }\n\t\t\t\t\t\t\tonChange={ onChangeLayout }\n\t\t\t\t\t\t\tlayoutBlockSupport={ blockSupportAndThemeSettings }\n\t\t\t\t\t\t\tname={ blockName }\n\t\t\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ constrainedType && displayControlsForLegacyLayouts && (\n\t\t\t\t\t\t<constrainedType.inspectorControls\n\t\t\t\t\t\t\tlayout={ usedLayout }\n\t\t\t\t\t\t\tonChange={ onChangeLayout }\n\t\t\t\t\t\t\tlayoutBlockSupport={ blockSupportAndThemeSettings }\n\t\t\t\t\t\t\tname={ blockName }\n\t\t\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</PanelBody>\n\t\t\t</InspectorControls>\n\t\t\t{ ! inherit && layoutType && (\n\t\t\t\t<layoutType.toolBarControls\n\t\t\t\t\tlayout={ usedLayout }\n\t\t\t\t\tonChange={ onChangeLayout }\n\t\t\t\t\tlayoutBlockSupport={ layoutBlockSupport }\n\t\t\t\t\tname={ blockName }\n\t\t\t\t\tclientId={ clientId }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default {\n\tshareWithChildBlocks: true,\n\tedit: LayoutPanelPure,\n\tattributeKeys: [ 'layout' ],\n\thasSupport( name ) {\n\t\treturn hasLayoutBlockSupport( name );\n\t},\n};\n\nfunction LayoutTypeSwitcher( { type, onChange } ) {\n\treturn (\n\t\t<ToggleGroupControl\n\t\t\t__next40pxDefaultSize\n\t\t\tisBlock\n\t\t\tlabel={ __( 'Layout type' ) }\n\t\t\t__nextHasNoMarginBottom\n\t\t\thideLabelFromVision\n\t\t\tisAdaptiveWidth\n\t\t\tvalue={ type }\n\t\t\tonChange={ onChange }\n\t\t>\n\t\t\t{ getLayoutTypes().map( ( { name, label } ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<ToggleGroupControlOption\n\t\t\t\t\t\tkey={ name }\n\t\t\t\t\t\tvalue={ name }\n\t\t\t\t\t\tlabel={ label }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</ToggleGroupControl>\n\t);\n}\n\n/**\n * Filters registered block settings, extending attributes to include `layout`.\n *\n * @param {Object} settings Original block settings.\n *\n * @return {Object} Filtered block settings.\n */\nexport function addAttribute( settings ) {\n\tif ( 'type' in ( settings.attributes?.layout ?? {} ) ) {\n\t\treturn settings;\n\t}\n\tif ( hasLayoutBlockSupport( settings ) ) {\n\t\tsettings.attributes = {\n\t\t\t...settings.attributes,\n\t\t\tlayout: {\n\t\t\t\ttype: 'object',\n\t\t\t},\n\t\t};\n\t}\n\n\treturn settings;\n}\n\nfunction BlockWithLayoutStyles( {\n\tblock: BlockListBlock,\n\tprops,\n\tblockGapSupport,\n\tlayoutClasses,\n} ) {\n\tconst { name, attributes } = props;\n\tconst id = useInstanceId( BlockListBlock );\n\tconst { layout } = attributes;\n\tconst { default: defaultBlockLayout } =\n\t\tgetBlockSupport( name, layoutBlockSupportKey ) || {};\n\tconst usedLayout =\n\t\tlayout?.inherit || layout?.contentSize || layout?.wideSize\n\t\t\t? { ...layout, type: 'constrained' }\n\t\t\t: layout || defaultBlockLayout || {};\n\n\tconst selectorPrefix = `wp-container-${ kebabCase( name ) }-is-layout-`;\n\t// Higher specificity to override defaults from theme.json.\n\tconst selector = `.${ selectorPrefix }${ id }`;\n\tconst hasBlockGapSupport = blockGapSupport !== null;\n\n\t// Get CSS string for the current layout type.\n\t// The CSS and `style` element is only output if it is not empty.\n\tconst fullLayoutType = getLayoutType( usedLayout?.type || 'default' );\n\tconst css = fullLayoutType?.getLayoutStyle?.( {\n\t\tblockName: name,\n\t\tselector,\n\t\tlayout: usedLayout,\n\t\tstyle: attributes?.style,\n\t\thasBlockGapSupport,\n\t} );\n\n\t// Attach a `wp-container-` id-based class name as well as a layout class name such as `is-layout-flex`.\n\tconst layoutClassNames = clsx(\n\t\t{\n\t\t\t[ `${ selectorPrefix }${ id }` ]: !! css, // Only attach a container class if there is generated CSS to be attached.\n\t\t},\n\t\tlayoutClasses\n\t);\n\n\tuseStyleOverride( { css } );\n\n\treturn (\n\t\t<BlockListBlock\n\t\t\t{ ...props }\n\t\t\t__unstableLayoutClassNames={ layoutClassNames }\n\t\t/>\n\t);\n}\n\n/**\n * Override the default block element to add the layout styles.\n *\n * @param {Function} BlockListBlock Original component.\n *\n * @return {Function} Wrapped component.\n */\nexport const withLayoutStyles = createHigherOrderComponent(\n\t( BlockListBlock ) => ( props ) => {\n\t\tconst { clientId, name, attributes } = props;\n\t\tconst blockSupportsLayout = hasLayoutBlockSupport( name );\n\t\tconst layoutClasses = useLayoutClasses( attributes, name );\n\t\tconst extraProps = useSelect(\n\t\t\t( select ) => {\n\t\t\t\t// The callback returns early to avoid block editor subscription.\n\t\t\t\tif ( ! blockSupportsLayout ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst { getSettings, getBlockSettings } = unlock(\n\t\t\t\t\tselect( blockEditorStore )\n\t\t\t\t);\n\t\t\t\tconst { disableLayoutStyles } = getSettings();\n\n\t\t\t\tif ( disableLayoutStyles ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst [ blockGapSupport ] = getBlockSettings(\n\t\t\t\t\tclientId,\n\t\t\t\t\t'spacing.blockGap'\n\t\t\t\t);\n\n\t\t\t\treturn { blockGapSupport };\n\t\t\t},\n\t\t\t[ blockSupportsLayout, clientId ]\n\t\t);\n\n\t\tif ( ! extraProps ) {\n\t\t\treturn (\n\t\t\t\t<BlockListBlock\n\t\t\t\t\t{ ...props }\n\t\t\t\t\t__unstableLayoutClassNames={\n\t\t\t\t\t\tblockSupportsLayout ? layoutClasses : undefined\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<BlockWithLayoutStyles\n\t\t\t\tblock={ BlockListBlock }\n\t\t\t\tprops={ props }\n\t\t\t\tlayoutClasses={ layoutClasses }\n\t\t\t\t{ ...extraProps }\n\t\t\t/>\n\t\t);\n\t},\n\t'withLayoutStyles'\n);\n\naddFilter(\n\t'blocks.registerBlockType',\n\t'core/layout/addAttribute',\n\taddAttribute\n);\naddFilter(\n\t'editor.BlockListBlock',\n\t'core/editor/layout/with-layout-styles',\n\twithLayoutStyles\n);\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,0BAA0B,EAAEC,aAAa,QAAQ,oBAAoB;AAC9E,SAASC,SAAS,QAAQ,kBAAkB;AAC5C,SAAS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,CAAC,EACD,kBACD,CAAC;AAEDlI,SAAS,CACR,0BAA0B,EAC1B,0BAA0B,EAC1BmH,YACD,CAAC;AACDnH,SAAS,CACR,uBAAuB,EACvB,uCAAuC,EACvCgI,gBACD,CAAC","ignoreList":[]}
@@ -1,4 +1,3 @@
1
- /* wp:polyfill */
2
1
  /**
3
2
  * External dependencies
4
3
  */
@@ -1 +1 @@
1
- {"version":3,"names":["clsx","__","_x","sprintf","getBlockSupport","hasBlockSupport","BaseControl","CustomSelectControl","useInstanceId","useSelect","useMemo","Platform","useSettings","InspectorControls","useBlockDisplayInformation","cleanEmptyObject","useStyleOverride","store","blockEditorStore","jsx","_jsx","POSITION_SUPPORT_KEY","DEFAULT_OPTION","key","value","name","STICKY_OPTION","hint","FIXED_OPTION","POSITION_SIDES","VALID_POSITION_TYPES","getPositionCSS","selector","style","output","type","positionType","position","includes","forEach","side","undefined","hasStickyPositionSupport","blockType","support","sticky","hasFixedPositionSupport","fixed","hasPositionSupport","hasPositionValue","props","attributes","hasStickyOrFixedPositionValue","resetPosition","setAttributes","top","right","bottom","left","useIsPositionDisabled","blockName","allowFixed","allowSticky","isDisabled","PositionPanelPure","clientId","firstParentClientId","select","getBlockParents","parents","length","blockInformation","stickyHelpText","title","options","availableOptions","push","onChangeType","next","placementValue","newStyle","selectedOption","find","option","web","group","children","__nextHasNoMarginBottom","help","__next40pxDefaultSize","label","hideLabelFromVision","describedBy","onChange","selectedItem","size","native","edit","Edit","isPositionDisabled","useBlockProps","attributeKeys","hasSupport","POSITION_BLOCK_PROPS_REFERENCE","hasPositionBlockSupport","allowPositionStyles","id","positionSelector","css","className"],"sources":["@wordpress/block-editor/src/hooks/position.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __, _x, sprintf } from '@wordpress/i18n';\nimport { getBlockSupport, hasBlockSupport } from '@wordpress/blocks';\nimport { BaseControl, CustomSelectControl } from '@wordpress/components';\nimport { useInstanceId } from '@wordpress/compose';\nimport { useSelect } from '@wordpress/data';\nimport { useMemo, Platform } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { useSettings } from '../components/use-settings';\nimport InspectorControls from '../components/inspector-controls';\nimport useBlockDisplayInformation from '../components/use-block-display-information';\nimport { cleanEmptyObject, useStyleOverride } from './utils';\nimport { store as blockEditorStore } from '../store';\n\nconst POSITION_SUPPORT_KEY = 'position';\n\nconst DEFAULT_OPTION = {\n\tkey: 'default',\n\tvalue: '',\n\tname: __( 'Default' ),\n};\n\nconst STICKY_OPTION = {\n\tkey: 'sticky',\n\tvalue: 'sticky',\n\tname: _x( 'Sticky', 'Name for the value of the CSS position property' ),\n\thint: __(\n\t\t'The block will stick to the top of the window instead of scrolling.'\n\t),\n};\n\nconst FIXED_OPTION = {\n\tkey: 'fixed',\n\tvalue: 'fixed',\n\tname: _x( 'Fixed', 'Name for the value of the CSS position property' ),\n\thint: __( 'The block will not move when the page is scrolled.' ),\n};\n\nconst POSITION_SIDES = [ 'top', 'right', 'bottom', 'left' ];\nconst VALID_POSITION_TYPES = [ 'sticky', 'fixed' ];\n\n/**\n * Get calculated position CSS.\n *\n * @param {Object} props Component props.\n * @param {string} props.selector Selector to use.\n * @param {Object} props.style Style object.\n * @return {string} The generated CSS rules.\n */\nexport function getPositionCSS( { selector, style } ) {\n\tlet output = '';\n\n\tconst { type: positionType } = style?.position || {};\n\n\tif ( ! VALID_POSITION_TYPES.includes( positionType ) ) {\n\t\treturn output;\n\t}\n\n\toutput += `${ selector } {`;\n\toutput += `position: ${ positionType };`;\n\n\tPOSITION_SIDES.forEach( ( side ) => {\n\t\tif ( style?.position?.[ side ] !== undefined ) {\n\t\t\toutput += `${ side }: ${ style.position[ side ] };`;\n\t\t}\n\t} );\n\n\tif ( positionType === 'sticky' || positionType === 'fixed' ) {\n\t\t// TODO: Replace hard-coded z-index value with a z-index preset approach in theme.json.\n\t\toutput += `z-index: 10`;\n\t}\n\toutput += `}`;\n\n\treturn output;\n}\n\n/**\n * Determines if there is sticky position support.\n *\n * @param {string|Object} blockType Block name or Block Type object.\n *\n * @return {boolean} Whether there is support.\n */\nexport function hasStickyPositionSupport( blockType ) {\n\tconst support = getBlockSupport( blockType, POSITION_SUPPORT_KEY );\n\treturn !! ( true === support || support?.sticky );\n}\n\n/**\n * Determines if there is fixed position support.\n *\n * @param {string|Object} blockType Block name or Block Type object.\n *\n * @return {boolean} Whether there is support.\n */\nexport function hasFixedPositionSupport( blockType ) {\n\tconst support = getBlockSupport( blockType, POSITION_SUPPORT_KEY );\n\treturn !! ( true === support || support?.fixed );\n}\n\n/**\n * Determines if there is position support.\n *\n * @param {string|Object} blockType Block name or Block Type object.\n *\n * @return {boolean} Whether there is support.\n */\nexport function hasPositionSupport( blockType ) {\n\tconst support = getBlockSupport( blockType, POSITION_SUPPORT_KEY );\n\treturn !! support;\n}\n\n/**\n * Checks if there is a current value in the position block support attributes.\n *\n * @param {Object} props Block props.\n * @return {boolean} Whether or not the block has a position value set.\n */\nexport function hasPositionValue( props ) {\n\treturn props.attributes.style?.position?.type !== undefined;\n}\n\n/**\n * Checks if the block is currently set to a sticky or fixed position.\n * This check is helpful for determining how to position block toolbars or other elements.\n *\n * @param {Object} attributes Block attributes.\n * @return {boolean} Whether or not the block is set to a sticky or fixed position.\n */\nexport function hasStickyOrFixedPositionValue( attributes ) {\n\tconst positionType = attributes?.style?.position?.type;\n\treturn positionType === 'sticky' || positionType === 'fixed';\n}\n\n/**\n * Resets the position block support attributes. This can be used when disabling\n * the position support controls for a block via a `ToolsPanel`.\n *\n * @param {Object} props Block props.\n * @param {Object} props.attributes Block's attributes.\n * @param {Object} props.setAttributes Function to set block's attributes.\n */\nexport function resetPosition( { attributes = {}, setAttributes } ) {\n\tconst { style = {} } = attributes;\n\n\tsetAttributes( {\n\t\tstyle: cleanEmptyObject( {\n\t\t\t...style,\n\t\t\tposition: {\n\t\t\t\t...style?.position,\n\t\t\t\ttype: undefined,\n\t\t\t\ttop: undefined,\n\t\t\t\tright: undefined,\n\t\t\t\tbottom: undefined,\n\t\t\t\tleft: undefined,\n\t\t\t},\n\t\t} ),\n\t} );\n}\n\n/**\n * Custom hook that checks if position settings have been disabled.\n *\n * @param {string} name The name of the block.\n *\n * @return {boolean} Whether padding setting is disabled.\n */\nexport function useIsPositionDisabled( { name: blockName } = {} ) {\n\tconst [ allowFixed, allowSticky ] = useSettings(\n\t\t'position.fixed',\n\t\t'position.sticky'\n\t);\n\tconst isDisabled = ! allowFixed && ! allowSticky;\n\n\treturn ! hasPositionSupport( blockName ) || isDisabled;\n}\n\n/*\n * Position controls rendered in an inspector control panel.\n *\n * @param {Object} props\n *\n * @return {Element} Position panel.\n */\nexport function PositionPanelPure( {\n\tstyle = {},\n\tclientId,\n\tname: blockName,\n\tsetAttributes,\n} ) {\n\tconst allowFixed = hasFixedPositionSupport( blockName );\n\tconst allowSticky = hasStickyPositionSupport( blockName );\n\tconst value = style?.position?.type;\n\n\tconst { firstParentClientId } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockParents } = select( blockEditorStore );\n\t\t\tconst parents = getBlockParents( clientId );\n\t\t\treturn { firstParentClientId: parents[ parents.length - 1 ] };\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\tconst blockInformation = useBlockDisplayInformation( firstParentClientId );\n\tconst stickyHelpText =\n\t\tallowSticky && value === STICKY_OPTION.value && blockInformation\n\t\t\t? sprintf(\n\t\t\t\t\t/* translators: %s: the name of the parent block. */\n\t\t\t\t\t__(\n\t\t\t\t\t\t'The block will stick to the scrollable area of the parent %s block.'\n\t\t\t\t\t),\n\t\t\t\t\tblockInformation.title\n\t\t\t )\n\t\t\t: null;\n\n\tconst options = useMemo( () => {\n\t\tconst availableOptions = [ DEFAULT_OPTION ];\n\t\t// Display options if they are allowed, or if a block already has a valid value set.\n\t\t// This allows for a block to be switched off from a position type that is not allowed.\n\t\tif ( allowSticky || value === STICKY_OPTION.value ) {\n\t\t\tavailableOptions.push( STICKY_OPTION );\n\t\t}\n\t\tif ( allowFixed || value === FIXED_OPTION.value ) {\n\t\t\tavailableOptions.push( FIXED_OPTION );\n\t\t}\n\t\treturn availableOptions;\n\t}, [ allowFixed, allowSticky, value ] );\n\n\tconst onChangeType = ( next ) => {\n\t\t// For now, use a hard-coded `0px` value for the position.\n\t\t// `0px` is preferred over `0` as it can be used in `calc()` functions.\n\t\t// In the future, it could be useful to allow for an offset value.\n\t\tconst placementValue = '0px';\n\n\t\tconst newStyle = {\n\t\t\t...style,\n\t\t\tposition: {\n\t\t\t\t...style?.position,\n\t\t\t\ttype: next,\n\t\t\t\ttop:\n\t\t\t\t\tnext === 'sticky' || next === 'fixed'\n\t\t\t\t\t\t? placementValue\n\t\t\t\t\t\t: undefined,\n\t\t\t},\n\t\t};\n\n\t\tsetAttributes( {\n\t\t\tstyle: cleanEmptyObject( newStyle ),\n\t\t} );\n\t};\n\n\tconst selectedOption = value\n\t\t? options.find( ( option ) => option.value === value ) || DEFAULT_OPTION\n\t\t: DEFAULT_OPTION;\n\n\t// Only display position controls if there is at least one option to choose from.\n\treturn Platform.select( {\n\t\tweb:\n\t\t\toptions.length > 1 ? (\n\t\t\t\t<InspectorControls group=\"position\">\n\t\t\t\t\t<BaseControl\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\thelp={ stickyHelpText }\n\t\t\t\t\t>\n\t\t\t\t\t\t<CustomSelectControl\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tlabel={ __( 'Position' ) }\n\t\t\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t\t\tdescribedBy={ sprintf(\n\t\t\t\t\t\t\t\t// translators: %s: Currently selected position.\n\t\t\t\t\t\t\t\t__( 'Currently selected position: %s' ),\n\t\t\t\t\t\t\t\tselectedOption.name\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\toptions={ options }\n\t\t\t\t\t\t\tvalue={ selectedOption }\n\t\t\t\t\t\t\tonChange={ ( { selectedItem } ) => {\n\t\t\t\t\t\t\t\tonChangeType( selectedItem.value );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tsize=\"__unstable-large\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</BaseControl>\n\t\t\t\t</InspectorControls>\n\t\t\t) : null,\n\t\tnative: null,\n\t} );\n}\n\nexport default {\n\tedit: function Edit( props ) {\n\t\tconst isPositionDisabled = useIsPositionDisabled( props );\n\t\tif ( isPositionDisabled ) {\n\t\t\treturn null;\n\t\t}\n\t\treturn <PositionPanelPure { ...props } />;\n\t},\n\tuseBlockProps,\n\tattributeKeys: [ 'style' ],\n\thasSupport( name ) {\n\t\treturn hasBlockSupport( name, POSITION_SUPPORT_KEY );\n\t},\n};\n\n// Used for generating the instance ID\nconst POSITION_BLOCK_PROPS_REFERENCE = {};\n\nfunction useBlockProps( { name, style } ) {\n\tconst hasPositionBlockSupport = hasBlockSupport(\n\t\tname,\n\t\tPOSITION_SUPPORT_KEY\n\t);\n\tconst isPositionDisabled = useIsPositionDisabled( { name } );\n\tconst allowPositionStyles = hasPositionBlockSupport && ! isPositionDisabled;\n\n\tconst id = useInstanceId( POSITION_BLOCK_PROPS_REFERENCE );\n\n\t// Higher specificity to override defaults in editor UI.\n\tconst positionSelector = `.wp-container-${ id }.wp-container-${ id }`;\n\n\t// Get CSS string for the current position values.\n\tlet css;\n\tif ( allowPositionStyles ) {\n\t\tcss =\n\t\t\tgetPositionCSS( {\n\t\t\t\tselector: positionSelector,\n\t\t\t\tstyle,\n\t\t\t} ) || '';\n\t}\n\n\t// Attach a `wp-container-` id-based class name.\n\tconst className = clsx( {\n\t\t[ `wp-container-${ id }` ]: allowPositionStyles && !! css, // Only attach a container class if there is generated CSS to be attached.\n\t\t[ `is-position-${ style?.position?.type }` ]:\n\t\t\tallowPositionStyles && !! css && !! style?.position?.type,\n\t} );\n\n\tuseStyleOverride( { css } );\n\n\treturn { className };\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,IAAI,MA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E,EAAG;;EAErE;EACA,IAAIE,GAAG;EACP,IAAKH,mBAAmB,EAAG;IAC1BG,GAAG,GACF7E,cAAc,CAAE;MACfC,QAAQ,EAAE2E,gBAAgB;MAC1B1E;IACD,CAAE,CAAC,IAAI,EAAE;EACX;;EAEA;EACA,MAAM4E,SAAS,GAAG7G,IAAI,CAAE;IACvB,CAAE,gBAAiB0G,EAAE,EAAG,GAAID,mBAAmB,IAAI,CAAC,CAAEG,GAAG;IAAE;IAC3D,CAAE,eAAgB3E,KAAK,EAAEI,QAAQ,EAAEF,IAAI,EAAG,GACzCsE,mBAAmB,IAAI,CAAC,CAAEG,GAAG,IAAI,CAAC,CAAE3E,KAAK,EAAEI,QAAQ,EAAEF;EACvD,CAAE,CAAC;EAEHnB,gBAAgB,CAAE;IAAE4F;EAAI,CAAE,CAAC;EAE3B,OAAO;IAAEC;EAAU,CAAC;AACrB","ignoreList":[]}
1
+ {"version":3,"names":["clsx","__","_x","sprintf","getBlockSupport","hasBlockSupport","BaseControl","CustomSelectControl","useInstanceId","useSelect","useMemo","Platform","useSettings","InspectorControls","useBlockDisplayInformation","cleanEmptyObject","useStyleOverride","store","blockEditorStore","jsx","_jsx","POSITION_SUPPORT_KEY","DEFAULT_OPTION","key","value","name","STICKY_OPTION","hint","FIXED_OPTION","POSITION_SIDES","VALID_POSITION_TYPES","getPositionCSS","selector","style","output","type","positionType","position","includes","forEach","side","undefined","hasStickyPositionSupport","blockType","support","sticky","hasFixedPositionSupport","fixed","hasPositionSupport","hasPositionValue","props","attributes","hasStickyOrFixedPositionValue","resetPosition","setAttributes","top","right","bottom","left","useIsPositionDisabled","blockName","allowFixed","allowSticky","isDisabled","PositionPanelPure","clientId","firstParentClientId","select","getBlockParents","parents","length","blockInformation","stickyHelpText","title","options","availableOptions","push","onChangeType","next","placementValue","newStyle","selectedOption","find","option","web","group","children","__nextHasNoMarginBottom","help","__next40pxDefaultSize","label","hideLabelFromVision","describedBy","onChange","selectedItem","size","native","edit","Edit","isPositionDisabled","useBlockProps","attributeKeys","hasSupport","POSITION_BLOCK_PROPS_REFERENCE","hasPositionBlockSupport","allowPositionStyles","id","positionSelector","css","className"],"sources":["@wordpress/block-editor/src/hooks/position.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __, _x, sprintf } from '@wordpress/i18n';\nimport { getBlockSupport, hasBlockSupport } from '@wordpress/blocks';\nimport { BaseControl, CustomSelectControl } from '@wordpress/components';\nimport { useInstanceId } from '@wordpress/compose';\nimport { useSelect } from '@wordpress/data';\nimport { useMemo, Platform } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { useSettings } from '../components/use-settings';\nimport InspectorControls from '../components/inspector-controls';\nimport useBlockDisplayInformation from '../components/use-block-display-information';\nimport { cleanEmptyObject, useStyleOverride } from './utils';\nimport { store as blockEditorStore } from '../store';\n\nconst POSITION_SUPPORT_KEY = 'position';\n\nconst DEFAULT_OPTION = {\n\tkey: 'default',\n\tvalue: '',\n\tname: __( 'Default' ),\n};\n\nconst STICKY_OPTION = {\n\tkey: 'sticky',\n\tvalue: 'sticky',\n\tname: _x( 'Sticky', 'Name for the value of the CSS position property' ),\n\thint: __(\n\t\t'The block will stick to the top of the window instead of scrolling.'\n\t),\n};\n\nconst FIXED_OPTION = {\n\tkey: 'fixed',\n\tvalue: 'fixed',\n\tname: _x( 'Fixed', 'Name for the value of the CSS position property' ),\n\thint: __( 'The block will not move when the page is scrolled.' ),\n};\n\nconst POSITION_SIDES = [ 'top', 'right', 'bottom', 'left' ];\nconst VALID_POSITION_TYPES = [ 'sticky', 'fixed' ];\n\n/**\n * Get calculated position CSS.\n *\n * @param {Object} props Component props.\n * @param {string} props.selector Selector to use.\n * @param {Object} props.style Style object.\n * @return {string} The generated CSS rules.\n */\nexport function getPositionCSS( { selector, style } ) {\n\tlet output = '';\n\n\tconst { type: positionType } = style?.position || {};\n\n\tif ( ! VALID_POSITION_TYPES.includes( positionType ) ) {\n\t\treturn output;\n\t}\n\n\toutput += `${ selector } {`;\n\toutput += `position: ${ positionType };`;\n\n\tPOSITION_SIDES.forEach( ( side ) => {\n\t\tif ( style?.position?.[ side ] !== undefined ) {\n\t\t\toutput += `${ side }: ${ style.position[ side ] };`;\n\t\t}\n\t} );\n\n\tif ( positionType === 'sticky' || positionType === 'fixed' ) {\n\t\t// TODO: Replace hard-coded z-index value with a z-index preset approach in theme.json.\n\t\toutput += `z-index: 10`;\n\t}\n\toutput += `}`;\n\n\treturn output;\n}\n\n/**\n * Determines if there is sticky position support.\n *\n * @param {string|Object} blockType Block name or Block Type object.\n *\n * @return {boolean} Whether there is support.\n */\nexport function hasStickyPositionSupport( blockType ) {\n\tconst support = getBlockSupport( blockType, POSITION_SUPPORT_KEY );\n\treturn !! ( true === support || support?.sticky );\n}\n\n/**\n * Determines if there is fixed position support.\n *\n * @param {string|Object} blockType Block name or Block Type object.\n *\n * @return {boolean} Whether there is support.\n */\nexport function hasFixedPositionSupport( blockType ) {\n\tconst support = getBlockSupport( blockType, POSITION_SUPPORT_KEY );\n\treturn !! ( true === support || support?.fixed );\n}\n\n/**\n * Determines if there is position support.\n *\n * @param {string|Object} blockType Block name or Block Type object.\n *\n * @return {boolean} Whether there is support.\n */\nexport function hasPositionSupport( blockType ) {\n\tconst support = getBlockSupport( blockType, POSITION_SUPPORT_KEY );\n\treturn !! support;\n}\n\n/**\n * Checks if there is a current value in the position block support attributes.\n *\n * @param {Object} props Block props.\n * @return {boolean} Whether or not the block has a position value set.\n */\nexport function hasPositionValue( props ) {\n\treturn props.attributes.style?.position?.type !== undefined;\n}\n\n/**\n * Checks if the block is currently set to a sticky or fixed position.\n * This check is helpful for determining how to position block toolbars or other elements.\n *\n * @param {Object} attributes Block attributes.\n * @return {boolean} Whether or not the block is set to a sticky or fixed position.\n */\nexport function hasStickyOrFixedPositionValue( attributes ) {\n\tconst positionType = attributes?.style?.position?.type;\n\treturn positionType === 'sticky' || positionType === 'fixed';\n}\n\n/**\n * Resets the position block support attributes. This can be used when disabling\n * the position support controls for a block via a `ToolsPanel`.\n *\n * @param {Object} props Block props.\n * @param {Object} props.attributes Block's attributes.\n * @param {Object} props.setAttributes Function to set block's attributes.\n */\nexport function resetPosition( { attributes = {}, setAttributes } ) {\n\tconst { style = {} } = attributes;\n\n\tsetAttributes( {\n\t\tstyle: cleanEmptyObject( {\n\t\t\t...style,\n\t\t\tposition: {\n\t\t\t\t...style?.position,\n\t\t\t\ttype: undefined,\n\t\t\t\ttop: undefined,\n\t\t\t\tright: undefined,\n\t\t\t\tbottom: undefined,\n\t\t\t\tleft: undefined,\n\t\t\t},\n\t\t} ),\n\t} );\n}\n\n/**\n * Custom hook that checks if position settings have been disabled.\n *\n * @param {string} name The name of the block.\n *\n * @return {boolean} Whether padding setting is disabled.\n */\nexport function useIsPositionDisabled( { name: blockName } = {} ) {\n\tconst [ allowFixed, allowSticky ] = useSettings(\n\t\t'position.fixed',\n\t\t'position.sticky'\n\t);\n\tconst isDisabled = ! allowFixed && ! allowSticky;\n\n\treturn ! hasPositionSupport( blockName ) || isDisabled;\n}\n\n/*\n * Position controls rendered in an inspector control panel.\n *\n * @param {Object} props\n *\n * @return {Element} Position panel.\n */\nexport function PositionPanelPure( {\n\tstyle = {},\n\tclientId,\n\tname: blockName,\n\tsetAttributes,\n} ) {\n\tconst allowFixed = hasFixedPositionSupport( blockName );\n\tconst allowSticky = hasStickyPositionSupport( blockName );\n\tconst value = style?.position?.type;\n\n\tconst { firstParentClientId } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockParents } = select( blockEditorStore );\n\t\t\tconst parents = getBlockParents( clientId );\n\t\t\treturn { firstParentClientId: parents[ parents.length - 1 ] };\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\tconst blockInformation = useBlockDisplayInformation( firstParentClientId );\n\tconst stickyHelpText =\n\t\tallowSticky && value === STICKY_OPTION.value && blockInformation\n\t\t\t? sprintf(\n\t\t\t\t\t/* translators: %s: the name of the parent block. */\n\t\t\t\t\t__(\n\t\t\t\t\t\t'The block will stick to the scrollable area of the parent %s block.'\n\t\t\t\t\t),\n\t\t\t\t\tblockInformation.title\n\t\t\t )\n\t\t\t: null;\n\n\tconst options = useMemo( () => {\n\t\tconst availableOptions = [ DEFAULT_OPTION ];\n\t\t// Display options if they are allowed, or if a block already has a valid value set.\n\t\t// This allows for a block to be switched off from a position type that is not allowed.\n\t\tif ( allowSticky || value === STICKY_OPTION.value ) {\n\t\t\tavailableOptions.push( STICKY_OPTION );\n\t\t}\n\t\tif ( allowFixed || value === FIXED_OPTION.value ) {\n\t\t\tavailableOptions.push( FIXED_OPTION );\n\t\t}\n\t\treturn availableOptions;\n\t}, [ allowFixed, allowSticky, value ] );\n\n\tconst onChangeType = ( next ) => {\n\t\t// For now, use a hard-coded `0px` value for the position.\n\t\t// `0px` is preferred over `0` as it can be used in `calc()` functions.\n\t\t// In the future, it could be useful to allow for an offset value.\n\t\tconst placementValue = '0px';\n\n\t\tconst newStyle = {\n\t\t\t...style,\n\t\t\tposition: {\n\t\t\t\t...style?.position,\n\t\t\t\ttype: next,\n\t\t\t\ttop:\n\t\t\t\t\tnext === 'sticky' || next === 'fixed'\n\t\t\t\t\t\t? placementValue\n\t\t\t\t\t\t: undefined,\n\t\t\t},\n\t\t};\n\n\t\tsetAttributes( {\n\t\t\tstyle: cleanEmptyObject( newStyle ),\n\t\t} );\n\t};\n\n\tconst selectedOption = value\n\t\t? options.find( ( option ) => option.value === value ) || DEFAULT_OPTION\n\t\t: DEFAULT_OPTION;\n\n\t// Only display position controls if there is at least one option to choose from.\n\treturn Platform.select( {\n\t\tweb:\n\t\t\toptions.length > 1 ? (\n\t\t\t\t<InspectorControls group=\"position\">\n\t\t\t\t\t<BaseControl\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\thelp={ stickyHelpText }\n\t\t\t\t\t>\n\t\t\t\t\t\t<CustomSelectControl\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tlabel={ __( 'Position' ) }\n\t\t\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t\t\tdescribedBy={ sprintf(\n\t\t\t\t\t\t\t\t// translators: %s: Currently selected position.\n\t\t\t\t\t\t\t\t__( 'Currently selected position: %s' ),\n\t\t\t\t\t\t\t\tselectedOption.name\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\toptions={ options }\n\t\t\t\t\t\t\tvalue={ selectedOption }\n\t\t\t\t\t\t\tonChange={ ( { selectedItem } ) => {\n\t\t\t\t\t\t\t\tonChangeType( selectedItem.value );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tsize=\"__unstable-large\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</BaseControl>\n\t\t\t\t</InspectorControls>\n\t\t\t) : null,\n\t\tnative: null,\n\t} );\n}\n\nexport default {\n\tedit: function Edit( props ) {\n\t\tconst isPositionDisabled = useIsPositionDisabled( props );\n\t\tif ( isPositionDisabled ) {\n\t\t\treturn null;\n\t\t}\n\t\treturn <PositionPanelPure { ...props } />;\n\t},\n\tuseBlockProps,\n\tattributeKeys: [ 'style' ],\n\thasSupport( name ) {\n\t\treturn hasBlockSupport( name, POSITION_SUPPORT_KEY );\n\t},\n};\n\n// Used for generating the instance ID\nconst POSITION_BLOCK_PROPS_REFERENCE = {};\n\nfunction useBlockProps( { name, style } ) {\n\tconst hasPositionBlockSupport = hasBlockSupport(\n\t\tname,\n\t\tPOSITION_SUPPORT_KEY\n\t);\n\tconst isPositionDisabled = useIsPositionDisabled( { name } );\n\tconst allowPositionStyles = hasPositionBlockSupport && ! isPositionDisabled;\n\n\tconst id = useInstanceId( POSITION_BLOCK_PROPS_REFERENCE );\n\n\t// Higher specificity to override defaults in editor UI.\n\tconst positionSelector = `.wp-container-${ id }.wp-container-${ id }`;\n\n\t// Get CSS string for the current position values.\n\tlet css;\n\tif ( allowPositionStyles ) {\n\t\tcss =\n\t\t\tgetPositionCSS( {\n\t\t\t\tselector: positionSelector,\n\t\t\t\tstyle,\n\t\t\t} ) || '';\n\t}\n\n\t// Attach a `wp-container-` id-based class name.\n\tconst className = clsx( {\n\t\t[ `wp-container-${ id }` ]: allowPositionStyles && !! css, // Only attach a container class if there is generated CSS to be attached.\n\t\t[ `is-position-${ style?.position?.type }` ]:\n\t\t\tallowPositionStyles && !! css && !! style?.position?.type,\n\t} );\n\n\tuseStyleOverride( { css } );\n\n\treturn { className };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,EAAE,EAAEC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AACjD,SAASC,eAAe,EAAEC,eAAe,QAAQ,mBAAmB;AACpE,SAASC,WAAW,EAAEC,mBAAmB,QAAQ,uBAAuB;AACxE,SAASC,aAAa,QAAQ,oBAAoB;AAClD,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,OAAO,EAAEC,QAAQ,QAAQ,oBAAoB;;AAEtD;AACA;AACA;AACA,SAASC,WAAW,QAAQ,4BAA4B;AACxD,OAAOC,iBAAiB,MAAM,kCAAkC;AAChE,OAAOC,0BAA0B,MAAM,6CAA6C;AACpF,SAASC,gBAAgB,EAAEC,gBAAgB,QAAQ,SAAS;AAC5D,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,UAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAErD,MAAMC,oBAAoB,GAAG,UAAU;AAEvC,MAAMC,cAAc,GAAG;EACtBC,GAAG,EAAE,SAAS;EACdC,KAAK,EAAE,EAAE;EACTC,IAAI,EAAExB,EAAE,CAAE,SAAU;AACrB,CAAC;AAED,MAAMyB,aAAa,GAAG;EACrBH,GAAG,EAAE,QAAQ;EACbC,KAAK,EAAE,QAAQ;EACfC,IAAI,EAAEvB,EAAE,CAAE,QAAQ,EAAE,iDAAkD,CAAC;EACvEyB,IAAI,EAAE1B,EAAE,CACP,qEACD;AACD,CAAC;AAED,MAAM2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zC,MAAMuE,uBAAuB,GAAGnG,eAAe,CAC9CoB,IAAI,EACJJ,oBACD,CAAC;EACD,MAAM8E,kBAAkB,GAAGxC,qBAAqB,CAAE;IAAElC;EAAK,CAAE,CAAC;EAC5D,MAAMgF,mBAAmB,GAAGD,uBAAuB,IAAI,CAAEL,kBAAkB;EAE3E,MAAMO,EAAE,GAAGlG,aAAa,CAAE+F,8BAA+B,CAAC;;EAE1D;EACA,MAAMI,gBAAgB,GAAG,iBAAkBD,EAAE,iBAAmBA,EAAE,EAAG;;EAErE;EACA,IAAIE,GAAG;EACP,IAAKH,mBAAmB,EAAG;IAC1BG,GAAG,GACF7E,cAAc,CAAE;MACfC,QAAQ,EAAE2E,gBAAgB;MAC1B1E;IACD,CAAE,CAAC,IAAI,EAAE;EACX;;EAEA;EACA,MAAM4E,SAAS,GAAG7G,IAAI,CAAE;IACvB,CAAE,gBAAiB0G,EAAE,EAAG,GAAID,mBAAmB,IAAI,CAAC,CAAEG,GAAG;IAAE;IAC3D,CAAE,eAAgB3E,KAAK,EAAEI,QAAQ,EAAEF,IAAI,EAAG,GACzCsE,mBAAmB,IAAI,CAAC,CAAEG,GAAG,IAAI,CAAC,CAAE3E,KAAK,EAAEI,QAAQ,EAAEF;EACvD,CAAE,CAAC;EAEHnB,gBAAgB,CAAE;IAAE4F;EAAI,CAAE,CAAC;EAE3B,OAAO;IAAEC;EAAU,CAAC;AACrB","ignoreList":[]}
@@ -1,4 +1,3 @@
1
- /* wp:polyfill */
2
1
  /**
3
2
  * WordPress dependencies
4
3
  */
@@ -1 +1 @@
1
- {"version":3,"names":["useMemo","addFilter","getBlockSupport","hasBlockSupport","__EXPERIMENTAL_ELEMENTS","ELEMENTS","useInstanceId","getCSSRules","compileCSS","BACKGROUND_SUPPORT_KEY","BackgroundImagePanel","BORDER_SUPPORT_KEY","BorderPanel","SHADOW_SUPPORT_KEY","COLOR_SUPPORT_KEY","ColorEdit","TypographyPanel","TYPOGRAPHY_SUPPORT_KEY","TYPOGRAPHY_SUPPORT_KEYS","DIMENSIONS_SUPPORT_KEY","SPACING_SUPPORT_KEY","DimensionsPanel","shouldSkipSerialization","useStyleOverride","useBlockSettings","scopeSelector","useBlockEditingMode","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","styleSupportKeys","hasStyleSupport","nameOrType","some","key","getInlineStyles","styles","output","forEach","rule","value","addAttribute","settings","attributes","style","Object","assign","type","skipSerializationPathsEdit","skipSerializationPathsSave","skipSerializationPathsSaveChecks","renamedFeatures","gradients","omitStyle","paths","preserveReference","newStyle","JSON","parse","stringify","Array","isArray","path","split","length","firstSubpath","restPath","addSaveProps","props","blockNameOrType","skipPaths","entries","indicator","skipSerialization","featureName","feature","BlockStyleControls","clientId","name","setAttributes","__unstableParentLayout","blockEditingMode","passedProps","typography","textAlign","children","edit","hasSupport","attributeKeys","useBlockProps","elementTypes","elementType","pseudo","elements","STYLE_BLOCK_PROPS_REFERENCE","blockElementsContainerIdentifier","baseElementSelector","blockElementStyles","elementCSSRules","elementStyles","selector","push","pseudoSelector","element","join","undefined","css","className"],"sources":["@wordpress/block-editor/src/hooks/style.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport { addFilter } from '@wordpress/hooks';\nimport {\n\tgetBlockSupport,\n\thasBlockSupport,\n\t__EXPERIMENTAL_ELEMENTS as ELEMENTS,\n} from '@wordpress/blocks';\nimport { useInstanceId } from '@wordpress/compose';\nimport { getCSSRules, compileCSS } from '@wordpress/style-engine';\n\n/**\n * Internal dependencies\n */\nimport { BACKGROUND_SUPPORT_KEY, BackgroundImagePanel } from './background';\nimport { BORDER_SUPPORT_KEY, BorderPanel, SHADOW_SUPPORT_KEY } from './border';\nimport { COLOR_SUPPORT_KEY, ColorEdit } from './color';\nimport {\n\tTypographyPanel,\n\tTYPOGRAPHY_SUPPORT_KEY,\n\tTYPOGRAPHY_SUPPORT_KEYS,\n} from './typography';\nimport {\n\tDIMENSIONS_SUPPORT_KEY,\n\tSPACING_SUPPORT_KEY,\n\tDimensionsPanel,\n} from './dimensions';\nimport {\n\tshouldSkipSerialization,\n\tuseStyleOverride,\n\tuseBlockSettings,\n} from './utils';\nimport { scopeSelector } from '../components/global-styles/utils';\nimport { useBlockEditingMode } from '../components/block-editing-mode';\n\nconst styleSupportKeys = [\n\t...TYPOGRAPHY_SUPPORT_KEYS,\n\tBORDER_SUPPORT_KEY,\n\tCOLOR_SUPPORT_KEY,\n\tDIMENSIONS_SUPPORT_KEY,\n\tBACKGROUND_SUPPORT_KEY,\n\tSPACING_SUPPORT_KEY,\n\tSHADOW_SUPPORT_KEY,\n];\n\nconst hasStyleSupport = ( nameOrType ) =>\n\tstyleSupportKeys.some( ( key ) => hasBlockSupport( nameOrType, key ) );\n\n/**\n * Returns the inline styles to add depending on the style object\n *\n * @param {Object} styles Styles configuration.\n *\n * @return {Object} Flattened CSS variables declaration.\n */\nexport function getInlineStyles( styles = {} ) {\n\tconst output = {};\n\t// The goal is to move everything to server side generated engine styles\n\t// This is temporary as we absorb more and more styles into the engine.\n\tgetCSSRules( styles ).forEach( ( rule ) => {\n\t\toutput[ rule.key ] = rule.value;\n\t} );\n\n\treturn output;\n}\n\n/**\n * Filters registered block settings, extending attributes to include `style` attribute.\n *\n * @param {Object} settings Original block settings.\n *\n * @return {Object} Filtered block settings.\n */\nfunction addAttribute( settings ) {\n\tif ( ! hasStyleSupport( settings ) ) {\n\t\treturn settings;\n\t}\n\n\t// Allow blocks to specify their own attribute definition with default values if needed.\n\tif ( ! settings.attributes.style ) {\n\t\tObject.assign( settings.attributes, {\n\t\t\tstyle: {\n\t\t\t\ttype: 'object',\n\t\t\t},\n\t\t} );\n\t}\n\n\treturn settings;\n}\n\n/**\n * A dictionary of paths to flag skipping block support serialization as the key,\n * with values providing the style paths to be omitted from serialization.\n *\n * @constant\n * @type {Record<string, string[]>}\n */\nconst skipSerializationPathsEdit = {\n\t[ `${ BORDER_SUPPORT_KEY }.__experimentalSkipSerialization` ]: [ 'border' ],\n\t[ `${ COLOR_SUPPORT_KEY }.__experimentalSkipSerialization` ]: [\n\t\tCOLOR_SUPPORT_KEY,\n\t],\n\t[ `${ TYPOGRAPHY_SUPPORT_KEY }.__experimentalSkipSerialization` ]: [\n\t\tTYPOGRAPHY_SUPPORT_KEY,\n\t],\n\t[ `${ DIMENSIONS_SUPPORT_KEY }.__experimentalSkipSerialization` ]: [\n\t\tDIMENSIONS_SUPPORT_KEY,\n\t],\n\t[ `${ SPACING_SUPPORT_KEY }.__experimentalSkipSerialization` ]: [\n\t\tSPACING_SUPPORT_KEY,\n\t],\n\t[ `${ SHADOW_SUPPORT_KEY }.__experimentalSkipSerialization` ]: [\n\t\tSHADOW_SUPPORT_KEY,\n\t],\n};\n\n/**\n * A dictionary of paths to flag skipping block support serialization as the key,\n * with values providing the style paths to be omitted from serialization.\n *\n * Extends the Edit skip paths to enable skipping additional paths in just\n * the Save component. This allows a block support to be serialized within the\n * editor, while using an alternate approach, such as server-side rendering, when\n * the support is saved.\n *\n * @constant\n * @type {Record<string, string[]>}\n */\nconst skipSerializationPathsSave = {\n\t...skipSerializationPathsEdit,\n\t[ `${ DIMENSIONS_SUPPORT_KEY }.aspectRatio` ]: [\n\t\t`${ DIMENSIONS_SUPPORT_KEY }.aspectRatio`,\n\t], // Skip serialization of aspect ratio in save mode.\n\t[ `${ BACKGROUND_SUPPORT_KEY }` ]: [ BACKGROUND_SUPPORT_KEY ], // Skip serialization of background support in save mode.\n};\n\nconst skipSerializationPathsSaveChecks = {\n\t[ `${ DIMENSIONS_SUPPORT_KEY }.aspectRatio` ]: true,\n\t[ `${ BACKGROUND_SUPPORT_KEY }` ]: true,\n};\n\n/**\n * A dictionary used to normalize feature names between support flags, style\n * object properties and __experimentSkipSerialization configuration arrays.\n *\n * This allows not having to provide a migration for a support flag and possible\n * backwards compatibility bridges, while still achieving consistency between\n * the support flag and the skip serialization array.\n *\n * @constant\n * @type {Record<string, string>}\n */\nconst renamedFeatures = { gradients: 'gradient' };\n\n/**\n * A utility function used to remove one or more paths from a style object.\n * Works in a way similar to Lodash's `omit()`. See unit tests and examples below.\n *\n * It supports a single string path:\n *\n * ```\n * omitStyle( { color: 'red' }, 'color' ); // {}\n * ```\n *\n * or an array of paths:\n *\n * ```\n * omitStyle( { color: 'red', background: '#fff' }, [ 'color', 'background' ] ); // {}\n * ```\n *\n * It also allows you to specify paths at multiple levels in a string.\n *\n * ```\n * omitStyle( { typography: { textDecoration: 'underline' } }, 'typography.textDecoration' ); // {}\n * ```\n *\n * You can remove multiple paths at the same time:\n *\n * ```\n * omitStyle(\n * \t\t{\n * \t\t\ttypography: {\n * \t\t\t\ttextDecoration: 'underline',\n * \t\t\t\ttextTransform: 'uppercase',\n * \t\t\t}\n *\t\t},\n *\t\t[\n * \t\t\t'typography.textDecoration',\n * \t\t\t'typography.textTransform',\n *\t\t]\n * );\n * // {}\n * ```\n *\n * You can also specify nested paths as arrays:\n *\n * ```\n * omitStyle(\n * \t\t{\n * \t\t\ttypography: {\n * \t\t\t\ttextDecoration: 'underline',\n * \t\t\t\ttextTransform: 'uppercase',\n * \t\t\t}\n *\t\t},\n *\t\t[\n * \t\t\t[ 'typography', 'textDecoration' ],\n * \t\t\t[ 'typography', 'textTransform' ],\n *\t\t]\n * );\n * // {}\n * ```\n *\n * With regards to nesting of styles, infinite depth is supported:\n *\n * ```\n * omitStyle(\n * \t\t{\n * \t\t\tborder: {\n * \t\t\t\tradius: {\n * \t\t\t\t\ttopLeft: '10px',\n * \t\t\t\t\ttopRight: '0.5rem',\n * \t\t\t\t}\n * \t\t\t}\n *\t\t},\n *\t\t[\n * \t\t\t[ 'border', 'radius', 'topRight' ],\n *\t\t]\n * );\n * // { border: { radius: { topLeft: '10px' } } }\n * ```\n *\n * The third argument, `preserveReference`, defines how to treat the input style object.\n * It is mostly necessary to properly handle mutation when recursively handling the style object.\n * Defaulting to `false`, this will always create a new object, avoiding to mutate `style`.\n * However, when recursing, we change that value to `true` in order to work with a single copy\n * of the original style object.\n *\n * @see https://lodash.com/docs/4.17.15#omit\n *\n * @param {Object} style Styles object.\n * @param {Array|string} paths Paths to remove.\n * @param {boolean} preserveReference True to mutate the `style` object, false otherwise.\n * @return {Object} Styles object with the specified paths removed.\n */\nexport function omitStyle( style, paths, preserveReference = false ) {\n\tif ( ! style ) {\n\t\treturn style;\n\t}\n\n\tlet newStyle = style;\n\tif ( ! preserveReference ) {\n\t\tnewStyle = JSON.parse( JSON.stringify( style ) );\n\t}\n\n\tif ( ! Array.isArray( paths ) ) {\n\t\tpaths = [ paths ];\n\t}\n\n\tpaths.forEach( ( path ) => {\n\t\tif ( ! Array.isArray( path ) ) {\n\t\t\tpath = path.split( '.' );\n\t\t}\n\n\t\tif ( path.length > 1 ) {\n\t\t\tconst [ firstSubpath, ...restPath ] = path;\n\t\t\tomitStyle( newStyle[ firstSubpath ], [ restPath ], true );\n\t\t} else if ( path.length === 1 ) {\n\t\t\tdelete newStyle[ path[ 0 ] ];\n\t\t}\n\t} );\n\n\treturn newStyle;\n}\n\n/**\n * Override props assigned to save component to inject the CSS variables definition.\n *\n * @param {Object} props Additional props applied to save element.\n * @param {Object|string} blockNameOrType Block type.\n * @param {Object} attributes Block attributes.\n * @param {?Record<string, string[]>} skipPaths An object of keys and paths to skip serialization.\n *\n * @return {Object} Filtered props applied to save element.\n */\nexport function addSaveProps(\n\tprops,\n\tblockNameOrType,\n\tattributes,\n\tskipPaths = skipSerializationPathsSave\n) {\n\tif ( ! hasStyleSupport( blockNameOrType ) ) {\n\t\treturn props;\n\t}\n\n\tlet { style } = attributes;\n\tObject.entries( skipPaths ).forEach( ( [ indicator, path ] ) => {\n\t\tconst skipSerialization =\n\t\t\tskipSerializationPathsSaveChecks[ indicator ] ||\n\t\t\tgetBlockSupport( blockNameOrType, indicator );\n\n\t\tif ( skipSerialization === true ) {\n\t\t\tstyle = omitStyle( style, path );\n\t\t}\n\n\t\tif ( Array.isArray( skipSerialization ) ) {\n\t\t\tskipSerialization.forEach( ( featureName ) => {\n\t\t\t\tconst feature = renamedFeatures[ featureName ] || featureName;\n\t\t\t\tstyle = omitStyle( style, [ [ ...path, feature ] ] );\n\t\t\t} );\n\t\t}\n\t} );\n\n\tprops.style = {\n\t\t...getInlineStyles( style ),\n\t\t...props.style,\n\t};\n\n\treturn props;\n}\n\nfunction BlockStyleControls( {\n\tclientId,\n\tname,\n\tsetAttributes,\n\t__unstableParentLayout,\n} ) {\n\tconst settings = useBlockSettings( name, __unstableParentLayout );\n\tconst blockEditingMode = useBlockEditingMode();\n\tconst passedProps = {\n\t\tclientId,\n\t\tname,\n\t\tsetAttributes,\n\t\tsettings: {\n\t\t\t...settings,\n\t\t\ttypography: {\n\t\t\t\t...settings.typography,\n\t\t\t\t// The text alignment UI for individual blocks is rendered in\n\t\t\t\t// the block toolbar, so disable it here.\n\t\t\t\ttextAlign: false,\n\t\t\t},\n\t\t},\n\t};\n\tif ( blockEditingMode !== 'default' ) {\n\t\treturn null;\n\t}\n\treturn (\n\t\t<>\n\t\t\t<ColorEdit { ...passedProps } />\n\t\t\t<BackgroundImagePanel { ...passedProps } />\n\t\t\t<TypographyPanel { ...passedProps } />\n\t\t\t<BorderPanel { ...passedProps } />\n\t\t\t<DimensionsPanel { ...passedProps } />\n\t\t</>\n\t);\n}\n\nexport default {\n\tedit: BlockStyleControls,\n\thasSupport: hasStyleSupport,\n\taddSaveProps,\n\tattributeKeys: [ 'style' ],\n\tuseBlockProps,\n};\n\n// Defines which element types are supported, including their hover styles or\n// any other elements that have been included under a single element type\n// e.g. heading and h1-h6.\nconst elementTypes = [\n\t{ elementType: 'button' },\n\t{ elementType: 'link', pseudo: [ ':hover' ] },\n\t{\n\t\telementType: 'heading',\n\t\telements: [ 'h1', 'h2', 'h3', 'h4', 'h5', 'h6' ],\n\t},\n];\n\n// Used for generating the instance ID\nconst STYLE_BLOCK_PROPS_REFERENCE = {};\n\nfunction useBlockProps( { name, style } ) {\n\tconst blockElementsContainerIdentifier = useInstanceId(\n\t\tSTYLE_BLOCK_PROPS_REFERENCE,\n\t\t'wp-elements'\n\t);\n\n\tconst baseElementSelector = `.${ blockElementsContainerIdentifier }`;\n\tconst blockElementStyles = style?.elements;\n\n\tconst styles = useMemo( () => {\n\t\tif ( ! blockElementStyles ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst elementCSSRules = [];\n\n\t\telementTypes.forEach( ( { elementType, pseudo, elements } ) => {\n\t\t\tconst skipSerialization = shouldSkipSerialization(\n\t\t\t\tname,\n\t\t\t\tCOLOR_SUPPORT_KEY,\n\t\t\t\telementType\n\t\t\t);\n\n\t\t\tif ( skipSerialization ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst elementStyles = blockElementStyles?.[ elementType ];\n\n\t\t\t// Process primary element type styles.\n\t\t\tif ( elementStyles ) {\n\t\t\t\tconst selector = scopeSelector(\n\t\t\t\t\tbaseElementSelector,\n\t\t\t\t\tELEMENTS[ elementType ]\n\t\t\t\t);\n\n\t\t\t\telementCSSRules.push(\n\t\t\t\t\tcompileCSS( elementStyles, { selector } )\n\t\t\t\t);\n\n\t\t\t\t// Process any interactive states for the element type.\n\t\t\t\tif ( pseudo ) {\n\t\t\t\t\tpseudo.forEach( ( pseudoSelector ) => {\n\t\t\t\t\t\tif ( elementStyles[ pseudoSelector ] ) {\n\t\t\t\t\t\t\telementCSSRules.push(\n\t\t\t\t\t\t\t\tcompileCSS( elementStyles[ pseudoSelector ], {\n\t\t\t\t\t\t\t\t\tselector: scopeSelector(\n\t\t\t\t\t\t\t\t\t\tbaseElementSelector,\n\t\t\t\t\t\t\t\t\t\t`${ ELEMENTS[ elementType ] }${ pseudoSelector }`\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Process related elements e.g. h1-h6 for headings\n\t\t\tif ( elements ) {\n\t\t\t\telements.forEach( ( element ) => {\n\t\t\t\t\tif ( blockElementStyles[ element ] ) {\n\t\t\t\t\t\telementCSSRules.push(\n\t\t\t\t\t\t\tcompileCSS( blockElementStyles[ element ], {\n\t\t\t\t\t\t\t\tselector: scopeSelector(\n\t\t\t\t\t\t\t\t\tbaseElementSelector,\n\t\t\t\t\t\t\t\t\tELEMENTS[ element ]\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}\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\n\t\treturn elementCSSRules.length > 0\n\t\t\t? elementCSSRules.join( '' )\n\t\t\t: undefined;\n\t}, [ baseElementSelector, blockElementStyles, name ] );\n\n\tuseStyleOverride( { css: styles } );\n\n\treturn addSaveProps(\n\t\t{ className: blockElementsContainerIdentifier },\n\t\tname,\n\t\t{ style },\n\t\tskipSerializationPathsEdit\n\t);\n}\n\naddFilter(\n\t'blocks.registerBlockType',\n\t'core/style/addAttribute',\n\taddAttribute\n);\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,OAAO,QAAQ,oBAAoB;AAC5C,SAASC,SAAS,QAAQ,kBAAkB;AAC5C,SACCC,eAAe,EACfC,eAAe,EACfC,uBAAuB,IAAIC,QAAQ,QAC7B,mBAAmB;AAC1B,SAASC,aAAa,QAAQ,oBAAoB;AAClD,SAASC,WAAW,EAAEC,UAAU,QAAQ,yBAAyB;;AAEjE;AACA;AACA;AACA,SAASC,sBAAsB,EAAEC,oBAAoB,QAAQ,cAAc;AAC3E,SAASC,kBAAkB,EAAEC,WAAW,EAAEC,kBAAkB,QAAQ,UAAU;AAC9E,SAASC,iBAAiB,EAAEC,SAAS,QAAQ,SAAS;AACtD,SACCC,eAAe,EACfC,sBAAsB,EACtBC,uBAAuB,QACjB,cAAc;AACrB,SACCC,sBAAsB,EACtBC,mBAAmB,EACnBC,eAAe,QACT,cAAc;AACrB,SACCC,uBAAuB,EACvBC,gBAAgB,EAChBC,gBAAgB,QACV,SAAS;A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AE,QAAQ,CAAE;EAC3E,CAAE,GAAIG,iBAAiB,kCAAmC,GAAI,CAC7DA,iBAAiB,CACjB;EACD,CAAE,GAAIG,sBAAsB,kCAAmC,GAAI,CAClEA,sBAAsB,CACtB;EACD,CAAE,GAAIE,sBAAsB,kCAAmC,GAAI,CAClEA,sBAAsB,CACtB;EACD,CAAE,GAAIC,mBAAmB,kCAAmC,GAAI,CAC/DA,mBAAmB,CACnB;EACD,CAAE,GAAIP,kBAAkB,kCAAmC,GAAI,CAC9DA,kBAAkB;AAEpB,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMuC,0BAA0B,GAAG;EAClC,GAAGD,0BAA0B;EAC7B,CAAE,GAAIhC,sBAAsB,cAAe,GAAI,CAC9C,GAAIA,sBAAsB,cAAe,CACzC;EAAE;EACH,CAAE,GAAIV,sBAAsB,EAAG,GAAI,CAAEA,sBAAsB,CAAE,CAAE;AAChE,CAAC;AAED,MAAM4C,gCAAgC,GAAG;EACxC,CAAE,GAAIlC,sBAAsB,cAAe,GAAI,IAAI;EACnD,CAAE,GAAIV,sBAAsB,EAAG,GAAI;AACpC,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM6C,eAAe,GAAG;EAAEC,SAAS,EAAE;AAAW,CAAC;;AAEjD;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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ACD,CAAE,CACH,CAAC;UACF;QACD,CAAE,CAAC;MACJ;IACD,CAAE,CAAC;IAEH,OAAOL,eAAe,CAAClC,MAAM,GAAG,CAAC,GAC9BkC,eAAe,CAACM,IAAI,CAAE,EAAG,CAAC,GAC1BC,SAAS;EACb,CAAC,EAAE,CAAET,mBAAmB,EAAEC,kBAAkB,EAAEnB,IAAI,CAAG,CAAC;EAEtD1D,gBAAgB,CAAE;IAAEsF,GAAG,EAAEtE;EAAO,CAAE,CAAC;EAEnC,OAAO+B,YAAY,CAClB;IAAEwC,SAAS,EAAEZ;EAAiC,CAAC,EAC/CjB,IAAI,EACJ;IAAElC;EAAM,CAAC,EACTI,0BACD,CAAC;AACF;AAEAlD,SAAS,CACR,0BAA0B,EAC1B,yBAAyB,EACzB2C,YACD,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["useMemo","addFilter","getBlockSupport","hasBlockSupport","__EXPERIMENTAL_ELEMENTS","ELEMENTS","useInstanceId","getCSSRules","compileCSS","BACKGROUND_SUPPORT_KEY","BackgroundImagePanel","BORDER_SUPPORT_KEY","BorderPanel","SHADOW_SUPPORT_KEY","COLOR_SUPPORT_KEY","ColorEdit","TypographyPanel","TYPOGRAPHY_SUPPORT_KEY","TYPOGRAPHY_SUPPORT_KEYS","DIMENSIONS_SUPPORT_KEY","SPACING_SUPPORT_KEY","DimensionsPanel","shouldSkipSerialization","useStyleOverride","useBlockSettings","scopeSelector","useBlockEditingMode","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","styleSupportKeys","hasStyleSupport","nameOrType","some","key","getInlineStyles","styles","output","forEach","rule","value","addAttribute","settings","attributes","style","Object","assign","type","skipSerializationPathsEdit","skipSerializationPathsSave","skipSerializationPathsSaveChecks","renamedFeatures","gradients","omitStyle","paths","preserveReference","newStyle","JSON","parse","stringify","Array","isArray","path","split","length","firstSubpath","restPath","addSaveProps","props","blockNameOrType","skipPaths","entries","indicator","skipSerialization","featureName","feature","BlockStyleControls","clientId","name","setAttributes","__unstableParentLayout","blockEditingMode","passedProps","typography","textAlign","children","edit","hasSupport","attributeKeys","useBlockProps","elementTypes","elementType","pseudo","elements","STYLE_BLOCK_PROPS_REFERENCE","blockElementsContainerIdentifier","baseElementSelector","blockElementStyles","elementCSSRules","elementStyles","selector","push","pseudoSelector","element","join","undefined","css","className"],"sources":["@wordpress/block-editor/src/hooks/style.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport { addFilter } from '@wordpress/hooks';\nimport {\n\tgetBlockSupport,\n\thasBlockSupport,\n\t__EXPERIMENTAL_ELEMENTS as ELEMENTS,\n} from '@wordpress/blocks';\nimport { useInstanceId } from '@wordpress/compose';\nimport { getCSSRules, compileCSS } from '@wordpress/style-engine';\n\n/**\n * Internal dependencies\n */\nimport { BACKGROUND_SUPPORT_KEY, BackgroundImagePanel } from './background';\nimport { BORDER_SUPPORT_KEY, BorderPanel, SHADOW_SUPPORT_KEY } from './border';\nimport { COLOR_SUPPORT_KEY, ColorEdit } from './color';\nimport {\n\tTypographyPanel,\n\tTYPOGRAPHY_SUPPORT_KEY,\n\tTYPOGRAPHY_SUPPORT_KEYS,\n} from './typography';\nimport {\n\tDIMENSIONS_SUPPORT_KEY,\n\tSPACING_SUPPORT_KEY,\n\tDimensionsPanel,\n} from './dimensions';\nimport {\n\tshouldSkipSerialization,\n\tuseStyleOverride,\n\tuseBlockSettings,\n} from './utils';\nimport { scopeSelector } from '../components/global-styles/utils';\nimport { useBlockEditingMode } from '../components/block-editing-mode';\n\nconst styleSupportKeys = [\n\t...TYPOGRAPHY_SUPPORT_KEYS,\n\tBORDER_SUPPORT_KEY,\n\tCOLOR_SUPPORT_KEY,\n\tDIMENSIONS_SUPPORT_KEY,\n\tBACKGROUND_SUPPORT_KEY,\n\tSPACING_SUPPORT_KEY,\n\tSHADOW_SUPPORT_KEY,\n];\n\nconst hasStyleSupport = ( nameOrType ) =>\n\tstyleSupportKeys.some( ( key ) => hasBlockSupport( nameOrType, key ) );\n\n/**\n * Returns the inline styles to add depending on the style object\n *\n * @param {Object} styles Styles configuration.\n *\n * @return {Object} Flattened CSS variables declaration.\n */\nexport function getInlineStyles( styles = {} ) {\n\tconst output = {};\n\t// The goal is to move everything to server side generated engine styles\n\t// This is temporary as we absorb more and more styles into the engine.\n\tgetCSSRules( styles ).forEach( ( rule ) => {\n\t\toutput[ rule.key ] = rule.value;\n\t} );\n\n\treturn output;\n}\n\n/**\n * Filters registered block settings, extending attributes to include `style` attribute.\n *\n * @param {Object} settings Original block settings.\n *\n * @return {Object} Filtered block settings.\n */\nfunction addAttribute( settings ) {\n\tif ( ! hasStyleSupport( settings ) ) {\n\t\treturn settings;\n\t}\n\n\t// Allow blocks to specify their own attribute definition with default values if needed.\n\tif ( ! settings.attributes.style ) {\n\t\tObject.assign( settings.attributes, {\n\t\t\tstyle: {\n\t\t\t\ttype: 'object',\n\t\t\t},\n\t\t} );\n\t}\n\n\treturn settings;\n}\n\n/**\n * A dictionary of paths to flag skipping block support serialization as the key,\n * with values providing the style paths to be omitted from serialization.\n *\n * @constant\n * @type {Record<string, string[]>}\n */\nconst skipSerializationPathsEdit = {\n\t[ `${ BORDER_SUPPORT_KEY }.__experimentalSkipSerialization` ]: [ 'border' ],\n\t[ `${ COLOR_SUPPORT_KEY }.__experimentalSkipSerialization` ]: [\n\t\tCOLOR_SUPPORT_KEY,\n\t],\n\t[ `${ TYPOGRAPHY_SUPPORT_KEY }.__experimentalSkipSerialization` ]: [\n\t\tTYPOGRAPHY_SUPPORT_KEY,\n\t],\n\t[ `${ DIMENSIONS_SUPPORT_KEY }.__experimentalSkipSerialization` ]: [\n\t\tDIMENSIONS_SUPPORT_KEY,\n\t],\n\t[ `${ SPACING_SUPPORT_KEY }.__experimentalSkipSerialization` ]: [\n\t\tSPACING_SUPPORT_KEY,\n\t],\n\t[ `${ SHADOW_SUPPORT_KEY }.__experimentalSkipSerialization` ]: [\n\t\tSHADOW_SUPPORT_KEY,\n\t],\n};\n\n/**\n * A dictionary of paths to flag skipping block support serialization as the key,\n * with values providing the style paths to be omitted from serialization.\n *\n * Extends the Edit skip paths to enable skipping additional paths in just\n * the Save component. This allows a block support to be serialized within the\n * editor, while using an alternate approach, such as server-side rendering, when\n * the support is saved.\n *\n * @constant\n * @type {Record<string, string[]>}\n */\nconst skipSerializationPathsSave = {\n\t...skipSerializationPathsEdit,\n\t[ `${ DIMENSIONS_SUPPORT_KEY }.aspectRatio` ]: [\n\t\t`${ DIMENSIONS_SUPPORT_KEY }.aspectRatio`,\n\t], // Skip serialization of aspect ratio in save mode.\n\t[ `${ BACKGROUND_SUPPORT_KEY }` ]: [ BACKGROUND_SUPPORT_KEY ], // Skip serialization of background support in save mode.\n};\n\nconst skipSerializationPathsSaveChecks = {\n\t[ `${ DIMENSIONS_SUPPORT_KEY }.aspectRatio` ]: true,\n\t[ `${ BACKGROUND_SUPPORT_KEY }` ]: true,\n};\n\n/**\n * A dictionary used to normalize feature names between support flags, style\n * object properties and __experimentSkipSerialization configuration arrays.\n *\n * This allows not having to provide a migration for a support flag and possible\n * backwards compatibility bridges, while still achieving consistency between\n * the support flag and the skip serialization array.\n *\n * @constant\n * @type {Record<string, string>}\n */\nconst renamedFeatures = { gradients: 'gradient' };\n\n/**\n * A utility function used to remove one or more paths from a style object.\n * Works in a way similar to Lodash's `omit()`. See unit tests and examples below.\n *\n * It supports a single string path:\n *\n * ```\n * omitStyle( { color: 'red' }, 'color' ); // {}\n * ```\n *\n * or an array of paths:\n *\n * ```\n * omitStyle( { color: 'red', background: '#fff' }, [ 'color', 'background' ] ); // {}\n * ```\n *\n * It also allows you to specify paths at multiple levels in a string.\n *\n * ```\n * omitStyle( { typography: { textDecoration: 'underline' } }, 'typography.textDecoration' ); // {}\n * ```\n *\n * You can remove multiple paths at the same time:\n *\n * ```\n * omitStyle(\n * \t\t{\n * \t\t\ttypography: {\n * \t\t\t\ttextDecoration: 'underline',\n * \t\t\t\ttextTransform: 'uppercase',\n * \t\t\t}\n *\t\t},\n *\t\t[\n * \t\t\t'typography.textDecoration',\n * \t\t\t'typography.textTransform',\n *\t\t]\n * );\n * // {}\n * ```\n *\n * You can also specify nested paths as arrays:\n *\n * ```\n * omitStyle(\n * \t\t{\n * \t\t\ttypography: {\n * \t\t\t\ttextDecoration: 'underline',\n * \t\t\t\ttextTransform: 'uppercase',\n * \t\t\t}\n *\t\t},\n *\t\t[\n * \t\t\t[ 'typography', 'textDecoration' ],\n * \t\t\t[ 'typography', 'textTransform' ],\n *\t\t]\n * );\n * // {}\n * ```\n *\n * With regards to nesting of styles, infinite depth is supported:\n *\n * ```\n * omitStyle(\n * \t\t{\n * \t\t\tborder: {\n * \t\t\t\tradius: {\n * \t\t\t\t\ttopLeft: '10px',\n * \t\t\t\t\ttopRight: '0.5rem',\n * \t\t\t\t}\n * \t\t\t}\n *\t\t},\n *\t\t[\n * \t\t\t[ 'border', 'radius', 'topRight' ],\n *\t\t]\n * );\n * // { border: { radius: { topLeft: '10px' } } }\n * ```\n *\n * The third argument, `preserveReference`, defines how to treat the input style object.\n * It is mostly necessary to properly handle mutation when recursively handling the style object.\n * Defaulting to `false`, this will always create a new object, avoiding to mutate `style`.\n * However, when recursing, we change that value to `true` in order to work with a single copy\n * of the original style object.\n *\n * @see https://lodash.com/docs/4.17.15#omit\n *\n * @param {Object} style Styles object.\n * @param {Array|string} paths Paths to remove.\n * @param {boolean} preserveReference True to mutate the `style` object, false otherwise.\n * @return {Object} Styles object with the specified paths removed.\n */\nexport function omitStyle( style, paths, preserveReference = false ) {\n\tif ( ! style ) {\n\t\treturn style;\n\t}\n\n\tlet newStyle = style;\n\tif ( ! preserveReference ) {\n\t\tnewStyle = JSON.parse( JSON.stringify( style ) );\n\t}\n\n\tif ( ! Array.isArray( paths ) ) {\n\t\tpaths = [ paths ];\n\t}\n\n\tpaths.forEach( ( path ) => {\n\t\tif ( ! Array.isArray( path ) ) {\n\t\t\tpath = path.split( '.' );\n\t\t}\n\n\t\tif ( path.length > 1 ) {\n\t\t\tconst [ firstSubpath, ...restPath ] = path;\n\t\t\tomitStyle( newStyle[ firstSubpath ], [ restPath ], true );\n\t\t} else if ( path.length === 1 ) {\n\t\t\tdelete newStyle[ path[ 0 ] ];\n\t\t}\n\t} );\n\n\treturn newStyle;\n}\n\n/**\n * Override props assigned to save component to inject the CSS variables definition.\n *\n * @param {Object} props Additional props applied to save element.\n * @param {Object|string} blockNameOrType Block type.\n * @param {Object} attributes Block attributes.\n * @param {?Record<string, string[]>} skipPaths An object of keys and paths to skip serialization.\n *\n * @return {Object} Filtered props applied to save element.\n */\nexport function addSaveProps(\n\tprops,\n\tblockNameOrType,\n\tattributes,\n\tskipPaths = skipSerializationPathsSave\n) {\n\tif ( ! hasStyleSupport( blockNameOrType ) ) {\n\t\treturn props;\n\t}\n\n\tlet { style } = attributes;\n\tObject.entries( skipPaths ).forEach( ( [ indicator, path ] ) => {\n\t\tconst skipSerialization =\n\t\t\tskipSerializationPathsSaveChecks[ indicator ] ||\n\t\t\tgetBlockSupport( blockNameOrType, indicator );\n\n\t\tif ( skipSerialization === true ) {\n\t\t\tstyle = omitStyle( style, path );\n\t\t}\n\n\t\tif ( Array.isArray( skipSerialization ) ) {\n\t\t\tskipSerialization.forEach( ( featureName ) => {\n\t\t\t\tconst feature = renamedFeatures[ featureName ] || featureName;\n\t\t\t\tstyle = omitStyle( style, [ [ ...path, feature ] ] );\n\t\t\t} );\n\t\t}\n\t} );\n\n\tprops.style = {\n\t\t...getInlineStyles( style ),\n\t\t...props.style,\n\t};\n\n\treturn props;\n}\n\nfunction BlockStyleControls( {\n\tclientId,\n\tname,\n\tsetAttributes,\n\t__unstableParentLayout,\n} ) {\n\tconst settings = useBlockSettings( name, __unstableParentLayout );\n\tconst blockEditingMode = useBlockEditingMode();\n\tconst passedProps = {\n\t\tclientId,\n\t\tname,\n\t\tsetAttributes,\n\t\tsettings: {\n\t\t\t...settings,\n\t\t\ttypography: {\n\t\t\t\t...settings.typography,\n\t\t\t\t// The text alignment UI for individual blocks is rendered in\n\t\t\t\t// the block toolbar, so disable it here.\n\t\t\t\ttextAlign: false,\n\t\t\t},\n\t\t},\n\t};\n\tif ( blockEditingMode !== 'default' ) {\n\t\treturn null;\n\t}\n\treturn (\n\t\t<>\n\t\t\t<ColorEdit { ...passedProps } />\n\t\t\t<BackgroundImagePanel { ...passedProps } />\n\t\t\t<TypographyPanel { ...passedProps } />\n\t\t\t<BorderPanel { ...passedProps } />\n\t\t\t<DimensionsPanel { ...passedProps } />\n\t\t</>\n\t);\n}\n\nexport default {\n\tedit: BlockStyleControls,\n\thasSupport: hasStyleSupport,\n\taddSaveProps,\n\tattributeKeys: [ 'style' ],\n\tuseBlockProps,\n};\n\n// Defines which element types are supported, including their hover styles or\n// any other elements that have been included under a single element type\n// e.g. heading and h1-h6.\nconst elementTypes = [\n\t{ elementType: 'button' },\n\t{ elementType: 'link', pseudo: [ ':hover' ] },\n\t{\n\t\telementType: 'heading',\n\t\telements: [ 'h1', 'h2', 'h3', 'h4', 'h5', 'h6' ],\n\t},\n];\n\n// Used for generating the instance ID\nconst STYLE_BLOCK_PROPS_REFERENCE = {};\n\nfunction useBlockProps( { name, style } ) {\n\tconst blockElementsContainerIdentifier = useInstanceId(\n\t\tSTYLE_BLOCK_PROPS_REFERENCE,\n\t\t'wp-elements'\n\t);\n\n\tconst baseElementSelector = `.${ blockElementsContainerIdentifier }`;\n\tconst blockElementStyles = style?.elements;\n\n\tconst styles = useMemo( () => {\n\t\tif ( ! blockElementStyles ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst elementCSSRules = [];\n\n\t\telementTypes.forEach( ( { elementType, pseudo, elements } ) => {\n\t\t\tconst skipSerialization = shouldSkipSerialization(\n\t\t\t\tname,\n\t\t\t\tCOLOR_SUPPORT_KEY,\n\t\t\t\telementType\n\t\t\t);\n\n\t\t\tif ( skipSerialization ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst elementStyles = blockElementStyles?.[ elementType ];\n\n\t\t\t// Process primary element type styles.\n\t\t\tif ( elementStyles ) {\n\t\t\t\tconst selector = scopeSelector(\n\t\t\t\t\tbaseElementSelector,\n\t\t\t\t\tELEMENTS[ elementType ]\n\t\t\t\t);\n\n\t\t\t\telementCSSRules.push(\n\t\t\t\t\tcompileCSS( elementStyles, { selector } )\n\t\t\t\t);\n\n\t\t\t\t// Process any interactive states for the element type.\n\t\t\t\tif ( pseudo ) {\n\t\t\t\t\tpseudo.forEach( ( pseudoSelector ) => {\n\t\t\t\t\t\tif ( elementStyles[ pseudoSelector ] ) {\n\t\t\t\t\t\t\telementCSSRules.push(\n\t\t\t\t\t\t\t\tcompileCSS( elementStyles[ pseudoSelector ], {\n\t\t\t\t\t\t\t\t\tselector: scopeSelector(\n\t\t\t\t\t\t\t\t\t\tbaseElementSelector,\n\t\t\t\t\t\t\t\t\t\t`${ ELEMENTS[ elementType ] }${ pseudoSelector }`\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Process related elements e.g. h1-h6 for headings\n\t\t\tif ( elements ) {\n\t\t\t\telements.forEach( ( element ) => {\n\t\t\t\t\tif ( blockElementStyles[ element ] ) {\n\t\t\t\t\t\telementCSSRules.push(\n\t\t\t\t\t\t\tcompileCSS( blockElementStyles[ element ], {\n\t\t\t\t\t\t\t\tselector: scopeSelector(\n\t\t\t\t\t\t\t\t\tbaseElementSelector,\n\t\t\t\t\t\t\t\t\tELEMENTS[ element ]\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}\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\n\t\treturn elementCSSRules.length > 0\n\t\t\t? elementCSSRules.join( '' )\n\t\t\t: undefined;\n\t}, [ baseElementSelector, blockElementStyles, name ] );\n\n\tuseStyleOverride( { css: styles } );\n\n\treturn addSaveProps(\n\t\t{ className: blockElementsContainerIdentifier },\n\t\tname,\n\t\t{ style },\n\t\tskipSerializationPathsEdit\n\t);\n}\n\naddFilter(\n\t'blocks.registerBlockType',\n\t'core/style/addAttribute',\n\taddAttribute\n);\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,OAAO,QAAQ,oBAAoB;AAC5C,SAASC,SAAS,QAAQ,kBAAkB;AAC5C,SACCC,eAAe,EACfC,eAAe,EACfC,uBAAuB,IAAIC,QAAQ,QAC7B,mBAAmB;AAC1B,SAASC,aAAa,QAAQ,oBAAoB;AAClD,SAASC,WAAW,EAAEC,UAAU,QAAQ,yBAAyB;;AAEjE;AACA;AACA;AACA,SAASC,sBAAsB,EAAEC,oBAAoB,QAAQ,cAAc;AAC3E,SAASC,kBAAkB,EAAEC,WAAW,EAAEC,kBAAkB,QAAQ,UAAU;AAC9E,SAASC,iBAAiB,EAAEC,SAAS,QAAQ,SAAS;AACtD,SACCC,eAAe,EACfC,sBAAsB,EACtBC,uBAAuB,QACjB,cAAc;AACrB,SACCC,sBAAsB,EACtBC,mBAAmB,EACnBC,eAAe,QACT,cAAc;AACrB,SACCC,uBAAuB,EACvBC,gBAAgB,EAChBC,gBAAgB,QACV,SAAS;AAChB,SAASC,aAAa,QAAQ,mCAAmC;AACjE,SAASC,mBAAmB,QAAQ,kCAAkC;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,QAAA,IAAAC,SAAA,EAAAC,IAAA,IAAAC,KAAA;AAEvE,MAAMC,gBAAgB,GAAG,CACxB,GAAGf,uBAAuB,EAC1BP,kBAAkB,EAClBG,iBAAiB,EACjBK,sBAAsB,EACtBV,sBAAsB,EACtBW,mBAAmB,EACnBP,kBAAkB,CAClB;AAED,MAAMqB,eAAe,GAAKC,UAAU,IACnCF,gBAAgB,CAACG,IAAI,CAAIC,GAAG,IAAMlC,eAAe,CAAEgC,UAAU,EAAEE,GAAI,CAAE,CAAC;;AAEvE;AACA;AACA;AACA;AACA;AAC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,GAAIhC,sBAAsB,cAAe,GAAI,CAC9C,GAAIA,sBAAsB,cAAe,CACzC;EAAE;EACH,CAAE,GAAIV,sBAAsB,EAAG,GAAI,CAAEA,sBAAsB,CAAE,CAAE;AAChE,CAAC;AAED,MAAM4C,gCAAgC,GAAG;EACxC,CAAE,GAAIlC,sBAAsB,cAAe,GAAI,IAAI;EACnD,CAAE,GAAIV,sBAAsB,EAAG,GAAI;AACpC,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM6C,eAAe,GAAG;EAAEC,SAAS,EAAE;AAAW,CAAC;;AAEjD;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;AACA,OAAO,SAASC,SAASA,CAAET,KAAK,EAAEU,KAAK,EAAEC,iBAAiB,GAAG,KAAK,EAAG;EACpE,IAAK,CAAEX,KAAK,EAAG;IACd,OAAOA,KAAK;EACb;EAEA,IAAIY,QAAQ,GAAGZ,KAAK;EACpB,IAAK,CAAEW,iBAAiB,EAAG;IAC1BC,QAAQ,GAAGC,IAAI,CAACC,KAAK,CAAED,IAAI,CAACE,SAAS,CAAEf,KAAM,CAAE,CAAC;EACjD;EAEA,IAAK,CAAEgB,KAAK,CAACC,OAAO,CAAEP,KAAM,CAAC,EAAG;IAC/BA,KAAK,GAAG,CAAEA,KAAK,CAAE;EAClB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EAC1B,yBAAyB,EACzB2C,YACD,CAAC","ignoreList":[]}
@@ -1,4 +1,3 @@
1
- /* wp:polyfill */
2
1
  /**
3
2
  * WordPress dependencies
4
3
  */
@@ -1 +1 @@
1
- {"version":3,"names":["getBlockSupport","hasBlockSupport","Platform","ALIGN_SUPPORT_KEY","ALIGN_WIDE_SUPPORT_KEY","BORDER_SUPPORT_KEY","COLOR_SUPPORT_KEY","CUSTOM_CLASS_NAME_SUPPORT_KEY","FONT_FAMILY_SUPPORT_KEY","FONT_SIZE_SUPPORT_KEY","LINE_HEIGHT_SUPPORT_KEY","FONT_STYLE_SUPPORT_KEY","FONT_WEIGHT_SUPPORT_KEY","TEXT_ALIGN_SUPPORT_KEY","TEXT_COLUMNS_SUPPORT_KEY","TEXT_DECORATION_SUPPORT_KEY","WRITING_MODE_SUPPORT_KEY","TEXT_TRANSFORM_SUPPORT_KEY","LETTER_SPACING_SUPPORT_KEY","LAYOUT_SUPPORT_KEY","TYPOGRAPHY_SUPPORT_KEYS","EFFECTS_SUPPORT_KEYS","SPACING_SUPPORT_KEY","styleSupportKeys","hasAlignSupport","nameOrType","getAlignSupport","hasAlignWideSupport","getAlignWideSupport","hasBorderSupport","feature","OS","support","color","radius","width","style","getBorderSupport","hasColorSupport","colorSupport","link","gradient","background","text","hasLinkColorSupport","hasGradientSupport","gradients","hasBackgroundColorSupport","hasTextAlignSupport","getTextAlignSupport","hasTextColorSupport","getColorSupport","hasCustomClassNameSupport","getCustomClassNameSupport","hasFontFamilySupport","getFontFamilySupport","hasFontSizeSupport","getFontSizeSupport","hasLayoutSupport","getLayoutSupport","hasStyleSupport","some","key"],"sources":["@wordpress/block-editor/src/hooks/supports.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { getBlockSupport, hasBlockSupport } from '@wordpress/blocks';\nimport { Platform } from '@wordpress/element';\n\nconst ALIGN_SUPPORT_KEY = 'align';\nconst ALIGN_WIDE_SUPPORT_KEY = 'alignWide';\nconst BORDER_SUPPORT_KEY = '__experimentalBorder';\nconst COLOR_SUPPORT_KEY = 'color';\nconst CUSTOM_CLASS_NAME_SUPPORT_KEY = 'customClassName';\nconst FONT_FAMILY_SUPPORT_KEY = 'typography.__experimentalFontFamily';\nconst FONT_SIZE_SUPPORT_KEY = 'typography.fontSize';\nconst LINE_HEIGHT_SUPPORT_KEY = 'typography.lineHeight';\n/**\n * Key within block settings' support array indicating support for font style.\n */\nconst FONT_STYLE_SUPPORT_KEY = 'typography.__experimentalFontStyle';\n/**\n * Key within block settings' support array indicating support for font weight.\n */\nconst FONT_WEIGHT_SUPPORT_KEY = 'typography.__experimentalFontWeight';\n/**\n * Key within block settings' supports array indicating support for text\n * align e.g. settings found in `block.json`.\n */\nconst TEXT_ALIGN_SUPPORT_KEY = 'typography.textAlign';\n/**\n * Key within block settings' supports array indicating support for text\n * columns e.g. settings found in `block.json`.\n */\nconst TEXT_COLUMNS_SUPPORT_KEY = 'typography.textColumns';\n/**\n * Key within block settings' supports array indicating support for text\n * decorations e.g. settings found in `block.json`.\n */\nconst TEXT_DECORATION_SUPPORT_KEY = 'typography.__experimentalTextDecoration';\n/**\n * Key within block settings' supports array indicating support for writing mode\n * e.g. settings found in `block.json`.\n */\nconst WRITING_MODE_SUPPORT_KEY = 'typography.__experimentalWritingMode';\n/**\n * Key within block settings' supports array indicating support for text\n * transforms e.g. settings found in `block.json`.\n */\nconst TEXT_TRANSFORM_SUPPORT_KEY = 'typography.__experimentalTextTransform';\n\n/**\n * Key within block settings' supports array indicating support for letter-spacing\n * e.g. settings found in `block.json`.\n */\nconst LETTER_SPACING_SUPPORT_KEY = 'typography.__experimentalLetterSpacing';\nconst LAYOUT_SUPPORT_KEY = 'layout';\nconst TYPOGRAPHY_SUPPORT_KEYS = [\n\tLINE_HEIGHT_SUPPORT_KEY,\n\tFONT_SIZE_SUPPORT_KEY,\n\tFONT_STYLE_SUPPORT_KEY,\n\tFONT_WEIGHT_SUPPORT_KEY,\n\tFONT_FAMILY_SUPPORT_KEY,\n\tTEXT_ALIGN_SUPPORT_KEY,\n\tTEXT_COLUMNS_SUPPORT_KEY,\n\tTEXT_DECORATION_SUPPORT_KEY,\n\tTEXT_TRANSFORM_SUPPORT_KEY,\n\tWRITING_MODE_SUPPORT_KEY,\n\tLETTER_SPACING_SUPPORT_KEY,\n];\nconst EFFECTS_SUPPORT_KEYS = [ 'shadow' ];\nconst SPACING_SUPPORT_KEY = 'spacing';\nconst styleSupportKeys = [\n\t...EFFECTS_SUPPORT_KEYS,\n\t...TYPOGRAPHY_SUPPORT_KEYS,\n\tBORDER_SUPPORT_KEY,\n\tCOLOR_SUPPORT_KEY,\n\tSPACING_SUPPORT_KEY,\n];\n\n/**\n * Returns true if the block defines support for align.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasAlignSupport = ( nameOrType ) =>\n\thasBlockSupport( nameOrType, ALIGN_SUPPORT_KEY );\n\n/**\n * Returns the block support value for align, if defined.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {unknown} The block support value.\n */\nexport const getAlignSupport = ( nameOrType ) =>\n\tgetBlockSupport( nameOrType, ALIGN_SUPPORT_KEY );\n\n/**\n * Returns true if the block defines support for align wide.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasAlignWideSupport = ( nameOrType ) =>\n\thasBlockSupport( nameOrType, ALIGN_WIDE_SUPPORT_KEY );\n\n/**\n * Returns the block support value for align wide, if defined.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {unknown} The block support value.\n */\nexport const getAlignWideSupport = ( nameOrType ) =>\n\tgetBlockSupport( nameOrType, ALIGN_WIDE_SUPPORT_KEY );\n\n/**\n * Determine whether there is block support for border properties.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @param {string} feature Border feature to check support for.\n *\n * @return {boolean} Whether there is support.\n */\nexport function hasBorderSupport( nameOrType, feature = 'any' ) {\n\tif ( Platform.OS !== 'web' ) {\n\t\treturn false;\n\t}\n\n\tconst support = getBlockSupport( nameOrType, BORDER_SUPPORT_KEY );\n\n\tif ( support === true ) {\n\t\treturn true;\n\t}\n\n\tif ( feature === 'any' ) {\n\t\treturn !! (\n\t\t\tsupport?.color ||\n\t\t\tsupport?.radius ||\n\t\t\tsupport?.width ||\n\t\t\tsupport?.style\n\t\t);\n\t}\n\n\treturn !! support?.[ feature ];\n}\n\n/**\n * Get block support for border properties.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @param {string} feature Border feature to get.\n *\n * @return {unknown} The block support.\n */\nexport const getBorderSupport = ( nameOrType, feature ) =>\n\tgetBlockSupport( nameOrType, [ BORDER_SUPPORT_KEY, feature ] );\n\n/**\n * Returns true if the block defines support for color.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasColorSupport = ( nameOrType ) => {\n\tconst colorSupport = getBlockSupport( nameOrType, COLOR_SUPPORT_KEY );\n\treturn (\n\t\tcolorSupport &&\n\t\t( colorSupport.link === true ||\n\t\t\tcolorSupport.gradient === true ||\n\t\t\tcolorSupport.background !== false ||\n\t\t\tcolorSupport.text !== false )\n\t);\n};\n\n/**\n * Returns true if the block defines support for link color.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasLinkColorSupport = ( nameOrType ) => {\n\tif ( Platform.OS !== 'web' ) {\n\t\treturn false;\n\t}\n\n\tconst colorSupport = getBlockSupport( nameOrType, COLOR_SUPPORT_KEY );\n\n\treturn (\n\t\tcolorSupport !== null &&\n\t\ttypeof colorSupport === 'object' &&\n\t\t!! colorSupport.link\n\t);\n};\n\n/**\n * Returns true if the block defines support for gradient color.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasGradientSupport = ( nameOrType ) => {\n\tconst colorSupport = getBlockSupport( nameOrType, COLOR_SUPPORT_KEY );\n\n\treturn (\n\t\tcolorSupport !== null &&\n\t\ttypeof colorSupport === 'object' &&\n\t\t!! colorSupport.gradients\n\t);\n};\n\n/**\n * Returns true if the block defines support for background color.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasBackgroundColorSupport = ( nameOrType ) => {\n\tconst colorSupport = getBlockSupport( nameOrType, COLOR_SUPPORT_KEY );\n\n\treturn colorSupport && colorSupport.background !== false;\n};\n\n/**\n * Returns true if the block defines support for text-align.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasTextAlignSupport = ( nameOrType ) =>\n\thasBlockSupport( nameOrType, TEXT_ALIGN_SUPPORT_KEY );\n\n/**\n * Returns the block support value for text-align, if defined.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {unknown} The block support value.\n */\nexport const getTextAlignSupport = ( nameOrType ) =>\n\tgetBlockSupport( nameOrType, TEXT_ALIGN_SUPPORT_KEY );\n\n/**\n * Returns true if the block defines support for background color.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasTextColorSupport = ( nameOrType ) => {\n\tconst colorSupport = getBlockSupport( nameOrType, COLOR_SUPPORT_KEY );\n\n\treturn colorSupport && colorSupport.text !== false;\n};\n\n/**\n * Get block support for color properties.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @param {string} feature Color feature to get.\n *\n * @return {unknown} The block support.\n */\nexport const getColorSupport = ( nameOrType, feature ) =>\n\tgetBlockSupport( nameOrType, [ COLOR_SUPPORT_KEY, feature ] );\n\n/**\n * Returns true if the block defines support for custom class name.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasCustomClassNameSupport = ( nameOrType ) =>\n\thasBlockSupport( nameOrType, CUSTOM_CLASS_NAME_SUPPORT_KEY, true );\n\n/**\n * Returns the block support value for custom class name, if defined.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {unknown} The block support value.\n */\nexport const getCustomClassNameSupport = ( nameOrType ) =>\n\tgetBlockSupport( nameOrType, CUSTOM_CLASS_NAME_SUPPORT_KEY, true );\n\n/**\n * Returns true if the block defines support for font family.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasFontFamilySupport = ( nameOrType ) =>\n\thasBlockSupport( nameOrType, FONT_FAMILY_SUPPORT_KEY );\n\n/**\n * Returns the block support value for font family, if defined.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {unknown} The block support value.\n */\nexport const getFontFamilySupport = ( nameOrType ) =>\n\tgetBlockSupport( nameOrType, FONT_FAMILY_SUPPORT_KEY );\n\n/**\n * Returns true if the block defines support for font size.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasFontSizeSupport = ( nameOrType ) =>\n\thasBlockSupport( nameOrType, FONT_SIZE_SUPPORT_KEY );\n\n/**\n * Returns the block support value for font size, if defined.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {unknown} The block support value.\n */\nexport const getFontSizeSupport = ( nameOrType ) =>\n\tgetBlockSupport( nameOrType, FONT_SIZE_SUPPORT_KEY );\n\n/**\n * Returns true if the block defines support for layout.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasLayoutSupport = ( nameOrType ) =>\n\thasBlockSupport( nameOrType, LAYOUT_SUPPORT_KEY );\n\n/**\n * Returns the block support value for layout, if defined.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {unknown} The block support value.\n */\nexport const getLayoutSupport = ( nameOrType ) =>\n\tgetBlockSupport( nameOrType, LAYOUT_SUPPORT_KEY );\n\n/**\n * Returns true if the block defines support for style.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasStyleSupport = ( nameOrType ) =>\n\tstyleSupportKeys.some( ( key )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,kBAAkB,GAAK/B,UAAU,IAC7CxB,eAAe,CAAEwB,UAAU,EAAEhB,qBAAsB,CAAC;;AAErD;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMgD,kBAAkB,GAAKhC,UAAU,IAC7CzB,eAAe,CAAEyB,UAAU,EAAEhB,qBAAsB,CAAC;;AAErD;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMiD,gBAAgB,GAAKjC,UAAU,IAC3CxB,eAAe,CAAEwB,UAAU,EAAEN,kBAAmB,CAAC;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMwC,gBAAgB,GAAKlC,UAAU,IAC3CzB,eAAe,CAAEyB,UAAU,EAAEN,kBAAmB,CAAC;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMyC,eAAe,GAAKnC,UAAU,IAC1CF,gBAAgB,CAACsC,IAAI,CAAIC,GAAG,IAAM7D,eAAe,CAAEwB,UAAU,EAAEqC,GAAI,CAAE,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["getBlockSupport","hasBlockSupport","Platform","ALIGN_SUPPORT_KEY","ALIGN_WIDE_SUPPORT_KEY","BORDER_SUPPORT_KEY","COLOR_SUPPORT_KEY","CUSTOM_CLASS_NAME_SUPPORT_KEY","FONT_FAMILY_SUPPORT_KEY","FONT_SIZE_SUPPORT_KEY","LINE_HEIGHT_SUPPORT_KEY","FONT_STYLE_SUPPORT_KEY","FONT_WEIGHT_SUPPORT_KEY","TEXT_ALIGN_SUPPORT_KEY","TEXT_COLUMNS_SUPPORT_KEY","TEXT_DECORATION_SUPPORT_KEY","WRITING_MODE_SUPPORT_KEY","TEXT_TRANSFORM_SUPPORT_KEY","LETTER_SPACING_SUPPORT_KEY","LAYOUT_SUPPORT_KEY","TYPOGRAPHY_SUPPORT_KEYS","EFFECTS_SUPPORT_KEYS","SPACING_SUPPORT_KEY","styleSupportKeys","hasAlignSupport","nameOrType","getAlignSupport","hasAlignWideSupport","getAlignWideSupport","hasBorderSupport","feature","OS","support","color","radius","width","style","getBorderSupport","hasColorSupport","colorSupport","link","gradient","background","text","hasLinkColorSupport","hasGradientSupport","gradients","hasBackgroundColorSupport","hasTextAlignSupport","getTextAlignSupport","hasTextColorSupport","getColorSupport","hasCustomClassNameSupport","getCustomClassNameSupport","hasFontFamilySupport","getFontFamilySupport","hasFontSizeSupport","getFontSizeSupport","hasLayoutSupport","getLayoutSupport","hasStyleSupport","some","key"],"sources":["@wordpress/block-editor/src/hooks/supports.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { getBlockSupport, hasBlockSupport } from '@wordpress/blocks';\nimport { Platform } from '@wordpress/element';\n\nconst ALIGN_SUPPORT_KEY = 'align';\nconst ALIGN_WIDE_SUPPORT_KEY = 'alignWide';\nconst BORDER_SUPPORT_KEY = '__experimentalBorder';\nconst COLOR_SUPPORT_KEY = 'color';\nconst CUSTOM_CLASS_NAME_SUPPORT_KEY = 'customClassName';\nconst FONT_FAMILY_SUPPORT_KEY = 'typography.__experimentalFontFamily';\nconst FONT_SIZE_SUPPORT_KEY = 'typography.fontSize';\nconst LINE_HEIGHT_SUPPORT_KEY = 'typography.lineHeight';\n/**\n * Key within block settings' support array indicating support for font style.\n */\nconst FONT_STYLE_SUPPORT_KEY = 'typography.__experimentalFontStyle';\n/**\n * Key within block settings' support array indicating support for font weight.\n */\nconst FONT_WEIGHT_SUPPORT_KEY = 'typography.__experimentalFontWeight';\n/**\n * Key within block settings' supports array indicating support for text\n * align e.g. settings found in `block.json`.\n */\nconst TEXT_ALIGN_SUPPORT_KEY = 'typography.textAlign';\n/**\n * Key within block settings' supports array indicating support for text\n * columns e.g. settings found in `block.json`.\n */\nconst TEXT_COLUMNS_SUPPORT_KEY = 'typography.textColumns';\n/**\n * Key within block settings' supports array indicating support for text\n * decorations e.g. settings found in `block.json`.\n */\nconst TEXT_DECORATION_SUPPORT_KEY = 'typography.__experimentalTextDecoration';\n/**\n * Key within block settings' supports array indicating support for writing mode\n * e.g. settings found in `block.json`.\n */\nconst WRITING_MODE_SUPPORT_KEY = 'typography.__experimentalWritingMode';\n/**\n * Key within block settings' supports array indicating support for text\n * transforms e.g. settings found in `block.json`.\n */\nconst TEXT_TRANSFORM_SUPPORT_KEY = 'typography.__experimentalTextTransform';\n\n/**\n * Key within block settings' supports array indicating support for letter-spacing\n * e.g. settings found in `block.json`.\n */\nconst LETTER_SPACING_SUPPORT_KEY = 'typography.__experimentalLetterSpacing';\nconst LAYOUT_SUPPORT_KEY = 'layout';\nconst TYPOGRAPHY_SUPPORT_KEYS = [\n\tLINE_HEIGHT_SUPPORT_KEY,\n\tFONT_SIZE_SUPPORT_KEY,\n\tFONT_STYLE_SUPPORT_KEY,\n\tFONT_WEIGHT_SUPPORT_KEY,\n\tFONT_FAMILY_SUPPORT_KEY,\n\tTEXT_ALIGN_SUPPORT_KEY,\n\tTEXT_COLUMNS_SUPPORT_KEY,\n\tTEXT_DECORATION_SUPPORT_KEY,\n\tTEXT_TRANSFORM_SUPPORT_KEY,\n\tWRITING_MODE_SUPPORT_KEY,\n\tLETTER_SPACING_SUPPORT_KEY,\n];\nconst EFFECTS_SUPPORT_KEYS = [ 'shadow' ];\nconst SPACING_SUPPORT_KEY = 'spacing';\nconst styleSupportKeys = [\n\t...EFFECTS_SUPPORT_KEYS,\n\t...TYPOGRAPHY_SUPPORT_KEYS,\n\tBORDER_SUPPORT_KEY,\n\tCOLOR_SUPPORT_KEY,\n\tSPACING_SUPPORT_KEY,\n];\n\n/**\n * Returns true if the block defines support for align.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasAlignSupport = ( nameOrType ) =>\n\thasBlockSupport( nameOrType, ALIGN_SUPPORT_KEY );\n\n/**\n * Returns the block support value for align, if defined.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {unknown} The block support value.\n */\nexport const getAlignSupport = ( nameOrType ) =>\n\tgetBlockSupport( nameOrType, ALIGN_SUPPORT_KEY );\n\n/**\n * Returns true if the block defines support for align wide.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasAlignWideSupport = ( nameOrType ) =>\n\thasBlockSupport( nameOrType, ALIGN_WIDE_SUPPORT_KEY );\n\n/**\n * Returns the block support value for align wide, if defined.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {unknown} The block support value.\n */\nexport const getAlignWideSupport = ( nameOrType ) =>\n\tgetBlockSupport( nameOrType, ALIGN_WIDE_SUPPORT_KEY );\n\n/**\n * Determine whether there is block support for border properties.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @param {string} feature Border feature to check support for.\n *\n * @return {boolean} Whether there is support.\n */\nexport function hasBorderSupport( nameOrType, feature = 'any' ) {\n\tif ( Platform.OS !== 'web' ) {\n\t\treturn false;\n\t}\n\n\tconst support = getBlockSupport( nameOrType, BORDER_SUPPORT_KEY );\n\n\tif ( support === true ) {\n\t\treturn true;\n\t}\n\n\tif ( feature === 'any' ) {\n\t\treturn !! (\n\t\t\tsupport?.color ||\n\t\t\tsupport?.radius ||\n\t\t\tsupport?.width ||\n\t\t\tsupport?.style\n\t\t);\n\t}\n\n\treturn !! support?.[ feature ];\n}\n\n/**\n * Get block support for border properties.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @param {string} feature Border feature to get.\n *\n * @return {unknown} The block support.\n */\nexport const getBorderSupport = ( nameOrType, feature ) =>\n\tgetBlockSupport( nameOrType, [ BORDER_SUPPORT_KEY, feature ] );\n\n/**\n * Returns true if the block defines support for color.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasColorSupport = ( nameOrType ) => {\n\tconst colorSupport = getBlockSupport( nameOrType, COLOR_SUPPORT_KEY );\n\treturn (\n\t\tcolorSupport &&\n\t\t( colorSupport.link === true ||\n\t\t\tcolorSupport.gradient === true ||\n\t\t\tcolorSupport.background !== false ||\n\t\t\tcolorSupport.text !== false )\n\t);\n};\n\n/**\n * Returns true if the block defines support for link color.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasLinkColorSupport = ( nameOrType ) => {\n\tif ( Platform.OS !== 'web' ) {\n\t\treturn false;\n\t}\n\n\tconst colorSupport = getBlockSupport( nameOrType, COLOR_SUPPORT_KEY );\n\n\treturn (\n\t\tcolorSupport !== null &&\n\t\ttypeof colorSupport === 'object' &&\n\t\t!! colorSupport.link\n\t);\n};\n\n/**\n * Returns true if the block defines support for gradient color.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasGradientSupport = ( nameOrType ) => {\n\tconst colorSupport = getBlockSupport( nameOrType, COLOR_SUPPORT_KEY );\n\n\treturn (\n\t\tcolorSupport !== null &&\n\t\ttypeof colorSupport === 'object' &&\n\t\t!! colorSupport.gradients\n\t);\n};\n\n/**\n * Returns true if the block defines support for background color.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasBackgroundColorSupport = ( nameOrType ) => {\n\tconst colorSupport = getBlockSupport( nameOrType, COLOR_SUPPORT_KEY );\n\n\treturn colorSupport && colorSupport.background !== false;\n};\n\n/**\n * Returns true if the block defines support for text-align.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasTextAlignSupport = ( nameOrType ) =>\n\thasBlockSupport( nameOrType, TEXT_ALIGN_SUPPORT_KEY );\n\n/**\n * Returns the block support value for text-align, if defined.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {unknown} The block support value.\n */\nexport const getTextAlignSupport = ( nameOrType ) =>\n\tgetBlockSupport( nameOrType, TEXT_ALIGN_SUPPORT_KEY );\n\n/**\n * Returns true if the block defines support for background color.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasTextColorSupport = ( nameOrType ) => {\n\tconst colorSupport = getBlockSupport( nameOrType, COLOR_SUPPORT_KEY );\n\n\treturn colorSupport && colorSupport.text !== false;\n};\n\n/**\n * Get block support for color properties.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @param {string} feature Color feature to get.\n *\n * @return {unknown} The block support.\n */\nexport const getColorSupport = ( nameOrType, feature ) =>\n\tgetBlockSupport( nameOrType, [ COLOR_SUPPORT_KEY, feature ] );\n\n/**\n * Returns true if the block defines support for custom class name.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasCustomClassNameSupport = ( nameOrType ) =>\n\thasBlockSupport( nameOrType, CUSTOM_CLASS_NAME_SUPPORT_KEY, true );\n\n/**\n * Returns the block support value for custom class name, if defined.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {unknown} The block support value.\n */\nexport const getCustomClassNameSupport = ( nameOrType ) =>\n\tgetBlockSupport( nameOrType, CUSTOM_CLASS_NAME_SUPPORT_KEY, true );\n\n/**\n * Returns true if the block defines support for font family.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasFontFamilySupport = ( nameOrType ) =>\n\thasBlockSupport( nameOrType, FONT_FAMILY_SUPPORT_KEY );\n\n/**\n * Returns the block support value for font family, if defined.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {unknown} The block support value.\n */\nexport const getFontFamilySupport = ( nameOrType ) =>\n\tgetBlockSupport( nameOrType, FONT_FAMILY_SUPPORT_KEY );\n\n/**\n * Returns true if the block defines support for font size.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasFontSizeSupport = ( nameOrType ) =>\n\thasBlockSupport( nameOrType, FONT_SIZE_SUPPORT_KEY );\n\n/**\n * Returns the block support value for font size, if defined.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {unknown} The block support value.\n */\nexport const getFontSizeSupport = ( nameOrType ) =>\n\tgetBlockSupport( nameOrType, FONT_SIZE_SUPPORT_KEY );\n\n/**\n * Returns true if the block defines support for layout.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasLayoutSupport = ( nameOrType ) =>\n\thasBlockSupport( nameOrType, LAYOUT_SUPPORT_KEY );\n\n/**\n * Returns the block support value for layout, if defined.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {unknown} The block support value.\n */\nexport const getLayoutSupport = ( nameOrType ) =>\n\tgetBlockSupport( nameOrType, LAYOUT_SUPPORT_KEY );\n\n/**\n * Returns true if the block defines support for style.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasStyleSupport = ( nameOrType ) =>\n\tstyleSupportKeys.some( ( key ) => hasBlockSupport( nameOrType, key ) );\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,eAAe,EAAEC,eAAe,QAAQ,mBAAmB;AACpE,SAASC,QAAQ,QAAQ,oBAAoB;AAE7C,MAAMC,iBAAiB,GAAG,OAAO;AACjC,MAAMC,sBAAsB,GAAG,WAAW;AAC1C,MAAMC,kBAAkB,GAAG,sBAAsB;AACjD,MAAMC,iBAAiB,GAAG,OAAO;AACjC,MAAMC,6BAA6B,GAAG,iBAAiB;AACvD,MAAMC,uBAAuB,GAAG,qCAAqC;AACrE,MAAMC,qBAAqB,GAAG,qBAAqB;AACnD,MAAMC,uBAAuB,GAAG,uBAAuB;AACvD;AACA;AACA;AACA,MAAMC,sBAAsB,GAAG,oCAAoC;AACnE;AACA;AACA;AACA,MAAMC,uBAAuB,GAAG,qCAAqC;AACrE;AACA;AACA;AACA;AACA,MAAMC,sBAAsB,GAAG,sBAAsB;AACrD;AACA;AACA;AACA;AACA,MAAMC,wBAAwB,GAAG,wBAAwB;AACzD;AACA;AACA;AACA;AACA,MAAMC,2BAA2B,GAAG,yCAAyC;AAC7E;AACA;AACA;AACA;AACA,MAAMC,wBAAwB,GAA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"names":["clsx","__","getBlockSupport","hasBlockSupport","alignLeft","alignRight","alignCenter","AlignmentControl","BlockControls","useBlockEditingMode","cleanEmptyObject","shouldSkipSerialization","useBlockSettings","TYPOGRAPHY_SUPPORT_KEY","jsx","_jsx","TEXT_ALIGN_SUPPORT_KEY","TEXT_ALIGNMENT_OPTIONS","icon","title","align","VALID_TEXT_ALIGNMENTS","NO_TEXT_ALIGNMENTS","getValidTextAlignments","blockTextAlign","Array","isArray","filter","textAlign","includes","BlockEditTextAlignmentToolbarControlsPure","style","name","blockName","setAttributes","settings","hasTextAlignControl","typography","blockEditingMode","validTextAlignments","length","textAlignmentControls","control","onChange","newTextAlignValue","newStyle","group","children","value","alignmentControls","edit","useBlockProps","addSaveProps","addAssignedTextAlign","attributeKeys","hasSupport","className","props","blockType","attributes","isTextAlignValid"],"sources":["@wordpress/block-editor/src/hooks/text-align.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { getBlockSupport, hasBlockSupport } from '@wordpress/blocks';\nimport { alignLeft, alignRight, alignCenter } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { AlignmentControl, BlockControls } from '../components';\nimport { useBlockEditingMode } from '../components/block-editing-mode';\nimport {\n\tcleanEmptyObject,\n\tshouldSkipSerialization,\n\tuseBlockSettings,\n} from './utils';\nimport { TYPOGRAPHY_SUPPORT_KEY } from './typography';\n\nexport const TEXT_ALIGN_SUPPORT_KEY = 'typography.textAlign';\n\nconst TEXT_ALIGNMENT_OPTIONS = [\n\t{\n\t\ticon: alignLeft,\n\t\ttitle: __( 'Align text left' ),\n\t\talign: 'left',\n\t},\n\t{\n\t\ticon: alignCenter,\n\t\ttitle: __( 'Align text center' ),\n\t\talign: 'center',\n\t},\n\t{\n\t\ticon: alignRight,\n\t\ttitle: __( 'Align text right' ),\n\t\talign: 'right',\n\t},\n];\n\nconst VALID_TEXT_ALIGNMENTS = [ 'left', 'center', 'right' ];\nconst NO_TEXT_ALIGNMENTS = [];\n\n/**\n * Returns the valid text alignments.\n * Takes into consideration the text aligns supported by a block.\n * Exported just for testing purposes, not exported outside the module.\n *\n * @param {?boolean|string[]} blockTextAlign Text aligns supported by the block.\n *\n * @return {string[]} Valid text alignments.\n */\nexport function getValidTextAlignments( blockTextAlign ) {\n\tif ( Array.isArray( blockTextAlign ) ) {\n\t\treturn VALID_TEXT_ALIGNMENTS.filter( ( textAlign ) =>\n\t\t\tblockTextAlign.includes( textAlign )\n\t\t);\n\t}\n\n\treturn blockTextAlign === true ? VALID_TEXT_ALIGNMENTS : NO_TEXT_ALIGNMENTS;\n}\n\nfunction BlockEditTextAlignmentToolbarControlsPure( {\n\tstyle,\n\tname: blockName,\n\tsetAttributes,\n} ) {\n\tconst settings = useBlockSettings( blockName );\n\tconst hasTextAlignControl = settings?.typography?.textAlign;\n\tconst blockEditingMode = useBlockEditingMode();\n\n\tif ( ! hasTextAlignControl || blockEditingMode !== 'default' ) {\n\t\treturn null;\n\t}\n\n\tconst validTextAlignments = getValidTextAlignments(\n\t\tgetBlockSupport( blockName, TEXT_ALIGN_SUPPORT_KEY )\n\t);\n\tif ( ! validTextAlignments.length ) {\n\t\treturn null;\n\t}\n\n\tconst textAlignmentControls = TEXT_ALIGNMENT_OPTIONS.filter( ( control ) =>\n\t\tvalidTextAlignments.includes( control.align )\n\t);\n\n\tconst onChange = ( newTextAlignValue ) => {\n\t\tconst newStyle = {\n\t\t\t...style,\n\t\t\ttypography: {\n\t\t\t\t...style?.typography,\n\t\t\t\ttextAlign: newTextAlignValue,\n\t\t\t},\n\t\t};\n\n\t\tsetAttributes( { style: cleanEmptyObject( newStyle ) } );\n\t};\n\n\treturn (\n\t\t<BlockControls group=\"block\">\n\t\t\t<AlignmentControl\n\t\t\t\tvalue={ style?.typography?.textAlign }\n\t\t\t\tonChange={ onChange }\n\t\t\t\talignmentControls={ textAlignmentControls }\n\t\t\t/>\n\t\t</BlockControls>\n\t);\n}\n\nexport default {\n\tedit: BlockEditTextAlignmentToolbarControlsPure,\n\tuseBlockProps,\n\taddSaveProps: addAssignedTextAlign,\n\tattributeKeys: [ 'style' ],\n\thasSupport( name ) {\n\t\treturn hasBlockSupport( name, TEXT_ALIGN_SUPPORT_KEY, false );\n\t},\n};\n\nfunction useBlockProps( { name, style } ) {\n\tif ( ! style?.typography?.textAlign ) {\n\t\treturn null;\n\t}\n\n\tconst validTextAlignments = getValidTextAlignments(\n\t\tgetBlockSupport( name, TEXT_ALIGN_SUPPORT_KEY )\n\t);\n\n\tif ( ! validTextAlignments.length ) {\n\t\treturn null;\n\t}\n\n\tif (\n\t\tshouldSkipSerialization( name, TYPOGRAPHY_SUPPORT_KEY, 'textAlign' )\n\t) {\n\t\treturn null;\n\t}\n\n\tconst textAlign = style.typography.textAlign;\n\n\tconst className = clsx( {\n\t\t[ `has-text-align-${ textAlign }` ]: textAlign,\n\t} );\n\treturn { className };\n}\n\n/**\n * Override props assigned to save component to inject text alignment class\n * name if block supports it.\n *\n * @param {Object} props Additional props applied to save element.\n * @param {Object} blockType Block type.\n * @param {Object} attributes Block attributes.\n *\n * @return {Object} Filtered props applied to save element.\n */\nexport function addAssignedTextAlign( props, blockType, attributes ) {\n\tif ( ! attributes?.style?.typography?.textAlign ) {\n\t\treturn props;\n\t}\n\n\tconst { textAlign } = attributes.style.typography;\n\tconst blockTextAlign = getBlockSupport( blockType, TEXT_ALIGN_SUPPORT_KEY );\n\tconst isTextAlignValid =\n\t\tgetValidTextAlignments( blockTextAlign ).includes( textAlign );\n\tif (\n\t\tisTextAlignValid &&\n\t\t! shouldSkipSerialization(\n\t\t\tblockType,\n\t\t\tTYPOGRAPHY_SUPPORT_KEY,\n\t\t\t'textAlign'\n\t\t)\n\t) {\n\t\tprops.className = clsx(\n\t\t\t`has-text-align-${ textAlign }`,\n\t\t\tprops.className\n\t\t);\n\t}\n\treturn props;\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,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AU,CAAC;EAC/D,IACCgC,gBAAgB,IAChB,CAAEjD,uBAAuB,CACxB+C,SAAS,EACT7C,sBAAsB,EACtB,WACD,CAAC,EACA;IACD4C,KAAK,CAACD,SAAS,GAAGxD,IAAI,CACrB,kBAAmB4B,SAAS,EAAG,EAC/B6B,KAAK,CAACD,SACP,CAAC;EACF;EACA,OAAOC,KAAK;AACb","ignoreList":[]}
1
+ {"version":3,"names":["clsx","__","getBlockSupport","hasBlockSupport","alignLeft","alignRight","alignCenter","AlignmentControl","BlockControls","useBlockEditingMode","cleanEmptyObject","shouldSkipSerialization","useBlockSettings","TYPOGRAPHY_SUPPORT_KEY","jsx","_jsx","TEXT_ALIGN_SUPPORT_KEY","TEXT_ALIGNMENT_OPTIONS","icon","title","align","VALID_TEXT_ALIGNMENTS","NO_TEXT_ALIGNMENTS","getValidTextAlignments","blockTextAlign","Array","isArray","filter","textAlign","includes","BlockEditTextAlignmentToolbarControlsPure","style","name","blockName","setAttributes","settings","hasTextAlignControl","typography","blockEditingMode","validTextAlignments","length","textAlignmentControls","control","onChange","newTextAlignValue","newStyle","group","children","value","alignmentControls","edit","useBlockProps","addSaveProps","addAssignedTextAlign","attributeKeys","hasSupport","className","props","blockType","attributes","isTextAlignValid"],"sources":["@wordpress/block-editor/src/hooks/text-align.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { getBlockSupport, hasBlockSupport } from '@wordpress/blocks';\nimport { alignLeft, alignRight, alignCenter } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { AlignmentControl, BlockControls } from '../components';\nimport { useBlockEditingMode } from '../components/block-editing-mode';\nimport {\n\tcleanEmptyObject,\n\tshouldSkipSerialization,\n\tuseBlockSettings,\n} from './utils';\nimport { TYPOGRAPHY_SUPPORT_KEY } from './typography';\n\nexport const TEXT_ALIGN_SUPPORT_KEY = 'typography.textAlign';\n\nconst TEXT_ALIGNMENT_OPTIONS = [\n\t{\n\t\ticon: alignLeft,\n\t\ttitle: __( 'Align text left' ),\n\t\talign: 'left',\n\t},\n\t{\n\t\ticon: alignCenter,\n\t\ttitle: __( 'Align text center' ),\n\t\talign: 'center',\n\t},\n\t{\n\t\ticon: alignRight,\n\t\ttitle: __( 'Align text right' ),\n\t\talign: 'right',\n\t},\n];\n\nconst VALID_TEXT_ALIGNMENTS = [ 'left', 'center', 'right' ];\nconst NO_TEXT_ALIGNMENTS = [];\n\n/**\n * Returns the valid text alignments.\n * Takes into consideration the text aligns supported by a block.\n * Exported just for testing purposes, not exported outside the module.\n *\n * @param {?boolean|string[]} blockTextAlign Text aligns supported by the block.\n *\n * @return {string[]} Valid text alignments.\n */\nexport function getValidTextAlignments( blockTextAlign ) {\n\tif ( Array.isArray( blockTextAlign ) ) {\n\t\treturn VALID_TEXT_ALIGNMENTS.filter( ( textAlign ) =>\n\t\t\tblockTextAlign.includes( textAlign )\n\t\t);\n\t}\n\n\treturn blockTextAlign === true ? VALID_TEXT_ALIGNMENTS : NO_TEXT_ALIGNMENTS;\n}\n\nfunction BlockEditTextAlignmentToolbarControlsPure( {\n\tstyle,\n\tname: blockName,\n\tsetAttributes,\n} ) {\n\tconst settings = useBlockSettings( blockName );\n\tconst hasTextAlignControl = settings?.typography?.textAlign;\n\tconst blockEditingMode = useBlockEditingMode();\n\n\tif ( ! hasTextAlignControl || blockEditingMode !== 'default' ) {\n\t\treturn null;\n\t}\n\n\tconst validTextAlignments = getValidTextAlignments(\n\t\tgetBlockSupport( blockName, TEXT_ALIGN_SUPPORT_KEY )\n\t);\n\tif ( ! validTextAlignments.length ) {\n\t\treturn null;\n\t}\n\n\tconst textAlignmentControls = TEXT_ALIGNMENT_OPTIONS.filter( ( control ) =>\n\t\tvalidTextAlignments.includes( control.align )\n\t);\n\n\tconst onChange = ( newTextAlignValue ) => {\n\t\tconst newStyle = {\n\t\t\t...style,\n\t\t\ttypography: {\n\t\t\t\t...style?.typography,\n\t\t\t\ttextAlign: newTextAlignValue,\n\t\t\t},\n\t\t};\n\n\t\tsetAttributes( { style: cleanEmptyObject( newStyle ) } );\n\t};\n\n\treturn (\n\t\t<BlockControls group=\"block\">\n\t\t\t<AlignmentControl\n\t\t\t\tvalue={ style?.typography?.textAlign }\n\t\t\t\tonChange={ onChange }\n\t\t\t\talignmentControls={ textAlignmentControls }\n\t\t\t/>\n\t\t</BlockControls>\n\t);\n}\n\nexport default {\n\tedit: BlockEditTextAlignmentToolbarControlsPure,\n\tuseBlockProps,\n\taddSaveProps: addAssignedTextAlign,\n\tattributeKeys: [ 'style' ],\n\thasSupport( name ) {\n\t\treturn hasBlockSupport( name, TEXT_ALIGN_SUPPORT_KEY, false );\n\t},\n};\n\nfunction useBlockProps( { name, style } ) {\n\tif ( ! style?.typography?.textAlign ) {\n\t\treturn null;\n\t}\n\n\tconst validTextAlignments = getValidTextAlignments(\n\t\tgetBlockSupport( name, TEXT_ALIGN_SUPPORT_KEY )\n\t);\n\n\tif ( ! validTextAlignments.length ) {\n\t\treturn null;\n\t}\n\n\tif (\n\t\tshouldSkipSerialization( name, TYPOGRAPHY_SUPPORT_KEY, 'textAlign' )\n\t) {\n\t\treturn null;\n\t}\n\n\tconst textAlign = style.typography.textAlign;\n\n\tconst className = clsx( {\n\t\t[ `has-text-align-${ textAlign }` ]: textAlign,\n\t} );\n\treturn { className };\n}\n\n/**\n * Override props assigned to save component to inject text alignment class\n * name if block supports it.\n *\n * @param {Object} props Additional props applied to save element.\n * @param {Object} blockType Block type.\n * @param {Object} attributes Block attributes.\n *\n * @return {Object} Filtered props applied to save element.\n */\nexport function addAssignedTextAlign( props, blockType, attributes ) {\n\tif ( ! attributes?.style?.typography?.textAlign ) {\n\t\treturn props;\n\t}\n\n\tconst { textAlign } = attributes.style.typography;\n\tconst blockTextAlign = getBlockSupport( blockType, TEXT_ALIGN_SUPPORT_KEY );\n\tconst isTextAlignValid =\n\t\tgetValidTextAlignments( blockTextAlign ).includes( textAlign );\n\tif (\n\t\tisTextAlignValid &&\n\t\t! shouldSkipSerialization(\n\t\t\tblockType,\n\t\t\tTYPOGRAPHY_SUPPORT_KEY,\n\t\t\t'textAlign'\n\t\t)\n\t) {\n\t\tprops.className = clsx(\n\t\t\t`has-text-align-${ textAlign }`,\n\t\t\tprops.className\n\t\t);\n\t}\n\treturn props;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,eAAe,EAAEC,eAAe,QAAQ,mBAAmB;AACpE,SAASC,SAAS,EAAEC,UAAU,EAAEC,WAAW,QAAQ,kBAAkB;;AAErE;AACA;AACA;AACA,SAASC,gBAAgB,EAAEC,aAAa,QAAQ,eAAe;AAC/D,SAASC,mBAAmB,QAAQ,kCAAkC;AACtE,SACCC,gBAAgB,EAChBC,uBAAuB,EACvBC,gBAAgB,QACV,SAAS;AAChB,SAASC,sBAAsB,QAAQ,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEtD,OAAO,MAAMC,sBAAsB,GAAG,sBAAsB;AAE5D,MAAMC,sBAAsB,GAAG,CAC9B;EACCC,IAAI,EAAEd,SAAS;EACfe,KAAK,EAAElB,EAAE,CAAE,iBAAkB,CAAC;EAC9BmB,KAAK,EAAE;AACR,CAAC,EACD;EACCF,IAAI,EAAEZ,WAAW;EACjBa,KAAK,EAAElB,EAAE,CAAE,mBAAoB,CAAC;EAChCmB,KAAK,EAAE;AACR,CAAC,EACD;EACCF,IAAI,EAAEb,UAAU;EAChBc,KAAK,EAAElB,EAAE,CAAE,kBAAmB,CAAC;EAC/BmB,KAAK,EAAE;AACR,CAAC,CACD;AAED,MAAMC,qBAAqB,GAAG,CAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAE;AAC3D,MAAMC,kBAAkB,GAAG,EAAE;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO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