@wordpress/block-editor 14.3.6 → 14.5.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 (953) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/README.md +6 -2
  3. package/build/autocompleters/block.js.map +1 -1
  4. package/build/autocompleters/link.js +2 -1
  5. package/build/autocompleters/link.js.map +1 -1
  6. package/build/components/background-image-control/index.js +1 -1
  7. package/build/components/background-image-control/index.js.map +1 -1
  8. package/build/components/block-actions/index.js +1 -13
  9. package/build/components/block-actions/index.js.map +1 -1
  10. package/build/components/block-controls/slot.js.map +1 -1
  11. package/build/components/block-controls/slot.native.js.map +1 -1
  12. package/build/components/block-draggable/draggable-chip.js +1 -1
  13. package/build/components/block-draggable/draggable-chip.js.map +1 -1
  14. package/build/components/block-inspector/index.js +56 -75
  15. package/build/components/block-inspector/index.js.map +1 -1
  16. package/build/components/block-list/block-invalid-warning.native.js +1 -1
  17. package/build/components/block-list/block-invalid-warning.native.js.map +1 -1
  18. package/build/components/block-list/block-list-item.native.js.map +1 -1
  19. package/build/components/block-list/block.js +5 -16
  20. package/build/components/block-list/block.js.map +1 -1
  21. package/build/components/block-list/index.js +6 -8
  22. package/build/components/block-list/index.js.map +1 -1
  23. package/build/components/block-list/index.native.js.map +1 -1
  24. package/build/components/block-list/use-block-props/index.js +3 -8
  25. package/build/components/block-list/use-block-props/index.js.map +1 -1
  26. package/build/components/block-list/use-block-props/use-selected-block-event-handlers.js +14 -6
  27. package/build/components/block-list/use-block-props/use-selected-block-event-handlers.js.map +1 -1
  28. package/build/components/block-list/use-in-between-inserter.js +5 -3
  29. package/build/components/block-list/use-in-between-inserter.js.map +1 -1
  30. package/build/components/block-list/zoom-out-separator.js +24 -13
  31. package/build/components/block-list/zoom-out-separator.js.map +1 -1
  32. package/build/components/block-lock/modal.js +1 -1
  33. package/build/components/block-lock/modal.js.map +1 -1
  34. package/build/components/block-mover/button.js.map +1 -1
  35. package/build/components/block-navigation/dropdown.js +2 -4
  36. package/build/components/block-navigation/dropdown.js.map +1 -1
  37. package/build/components/block-parent-selector/index.js +14 -11
  38. package/build/components/block-parent-selector/index.js.map +1 -1
  39. package/build/components/block-pattern-setup/index.js.map +1 -1
  40. package/build/components/block-pattern-setup/setup-toolbar.js +10 -20
  41. package/build/components/block-pattern-setup/setup-toolbar.js.map +1 -1
  42. package/build/components/block-patterns-list/index.js.map +1 -1
  43. package/build/components/block-patterns-paging/index.js +11 -13
  44. package/build/components/block-patterns-paging/index.js.map +1 -1
  45. package/build/components/block-popover/index.js +45 -2
  46. package/build/components/block-popover/index.js.map +1 -1
  47. package/build/components/block-preview/auto.js +1 -4
  48. package/build/components/block-preview/auto.js.map +1 -1
  49. package/build/components/block-preview/index.js.map +1 -1
  50. package/build/components/block-quick-navigation/index.js +2 -4
  51. package/build/components/block-quick-navigation/index.js.map +1 -1
  52. package/build/components/block-rename/modal.js +2 -2
  53. package/build/components/block-rename/modal.js.map +1 -1
  54. package/build/components/block-settings-menu/block-parent-selector-menu-item.js +1 -1
  55. package/build/components/block-settings-menu/block-parent-selector-menu-item.js.map +1 -1
  56. package/build/components/block-settings-menu/block-settings-dropdown.js +79 -76
  57. package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  58. package/build/components/block-settings-menu-controls/index.js +1 -6
  59. package/build/components/block-settings-menu-controls/index.js.map +1 -1
  60. package/build/components/block-switcher/block-transformations-menu.native.js +1 -1
  61. package/build/components/block-switcher/block-transformations-menu.native.js.map +1 -1
  62. package/build/components/block-switcher/index.js +19 -15
  63. package/build/components/block-switcher/index.js.map +1 -1
  64. package/build/components/block-switcher/pattern-transformations-menu.js.map +1 -1
  65. package/build/components/block-switcher/use-transformed-patterns.js +1 -0
  66. package/build/components/block-switcher/use-transformed-patterns.js.map +1 -1
  67. package/build/components/block-switcher/utils.js +1 -0
  68. package/build/components/block-switcher/utils.js.map +1 -1
  69. package/build/components/block-toolbar/index.js +16 -19
  70. package/build/components/block-toolbar/index.js.map +1 -1
  71. package/build/components/block-toolbar/use-has-block-toolbar.js +3 -5
  72. package/build/components/block-toolbar/use-has-block-toolbar.js.map +1 -1
  73. package/build/components/block-tools/index.js +8 -18
  74. package/build/components/block-tools/index.js.map +1 -1
  75. package/build/components/block-tools/insertion-point.js +1 -4
  76. package/build/components/block-tools/insertion-point.js.map +1 -1
  77. package/build/components/block-tools/use-show-block-tools.js +8 -7
  78. package/build/components/block-tools/use-show-block-tools.js.map +1 -1
  79. package/build/components/block-tools/zoom-out-mode-inserter-button.js +1 -12
  80. package/build/components/block-tools/zoom-out-mode-inserter-button.js.map +1 -1
  81. package/build/components/block-tools/zoom-out-mode-inserters.js +14 -17
  82. package/build/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
  83. package/build/components/block-tools/zoom-out-popover.js +3 -2
  84. package/build/components/block-tools/zoom-out-popover.js.map +1 -1
  85. package/build/components/block-tools/zoom-out-toolbar.js +5 -32
  86. package/build/components/block-tools/zoom-out-toolbar.js.map +1 -1
  87. package/build/components/block-types-list/index.js.map +1 -1
  88. package/build/components/block-types-list/index.native.js.map +1 -1
  89. package/build/components/block-variation-transforms/index.js +3 -2
  90. package/build/components/block-variation-transforms/index.js.map +1 -1
  91. package/build/components/border-radius-control/index.js.map +1 -1
  92. package/build/components/border-radius-control/utils.js.map +1 -1
  93. package/build/components/button-block-appender/index.js.map +1 -1
  94. package/build/components/color-style-selector/index.js.map +1 -1
  95. package/build/components/colors/utils.js.map +1 -1
  96. package/build/components/colors/with-colors.js.map +1 -1
  97. package/build/components/colors-gradients/panel-color-gradient-settings.native.js.map +1 -1
  98. package/build/components/date-format-picker/index.js +1 -0
  99. package/build/components/date-format-picker/index.js.map +1 -1
  100. package/build/components/duotone/utils.js.map +1 -1
  101. package/build/components/duotone-control/index.js.map +1 -1
  102. package/build/components/font-sizes/fluid-utils.js.map +1 -1
  103. package/build/components/font-sizes/utils.js.map +1 -1
  104. package/build/components/font-sizes/with-font-sizes.js.map +1 -1
  105. package/build/components/global-styles/border-panel.js +1 -1
  106. package/build/components/global-styles/border-panel.js.map +1 -1
  107. package/build/components/global-styles/color-panel.js +1 -1
  108. package/build/components/global-styles/color-panel.js.map +1 -1
  109. package/build/components/global-styles/dimensions-panel.js +3 -3
  110. package/build/components/global-styles/dimensions-panel.js.map +1 -1
  111. package/build/components/global-styles/filters-panel.js.map +1 -1
  112. package/build/components/global-styles/get-block-css-selector.js.map +1 -1
  113. package/build/components/global-styles/get-global-styles-changes.js +2 -1
  114. package/build/components/global-styles/get-global-styles-changes.js.map +1 -1
  115. package/build/components/global-styles/hooks.js.map +1 -1
  116. package/build/components/global-styles/typography-panel.js.map +1 -1
  117. package/build/components/global-styles/use-global-styles-context.native.js.map +1 -1
  118. package/build/components/global-styles/use-global-styles-output.js.map +1 -1
  119. package/build/components/global-styles/utils.js.map +1 -1
  120. package/build/components/gradients/use-gradient.js.map +1 -1
  121. package/build/components/grid/grid-item-movers.js.map +1 -1
  122. package/build/components/grid/grid-visualizer.js.map +1 -1
  123. package/build/components/iframe/index.js +44 -9
  124. package/build/components/iframe/index.js.map +1 -1
  125. package/build/components/image-editor/use-save-image.js +1 -1
  126. package/build/components/image-editor/use-save-image.js.map +1 -1
  127. package/build/components/inner-blocks/index.js +1 -9
  128. package/build/components/inner-blocks/index.js.map +1 -1
  129. package/build/components/inner-blocks/use-nested-settings-update.js +15 -8
  130. package/build/components/inner-blocks/use-nested-settings-update.js.map +1 -1
  131. package/build/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js +1 -1
  132. package/build/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js.map +1 -1
  133. package/build/components/inserter/block-patterns-explorer/pattern-list.js +2 -2
  134. package/build/components/inserter/block-patterns-explorer/pattern-list.js.map +1 -1
  135. package/build/components/inserter/block-patterns-tab/use-pattern-categories.js +1 -1
  136. package/build/components/inserter/block-patterns-tab/use-pattern-categories.js.map +1 -1
  137. package/build/components/inserter/block-types-tab.js +1 -1
  138. package/build/components/inserter/block-types-tab.js.map +1 -1
  139. package/build/components/inserter/block-types-tab.native.js.map +1 -1
  140. package/build/components/inserter/category-tabs/index.js +1 -10
  141. package/build/components/inserter/category-tabs/index.js.map +1 -1
  142. package/build/components/inserter/hooks/use-block-types-state.js +24 -5
  143. package/build/components/inserter/hooks/use-block-types-state.js.map +1 -1
  144. package/build/components/inserter/hooks/use-insertion-point.js +22 -12
  145. package/build/components/inserter/hooks/use-insertion-point.js.map +1 -1
  146. package/build/components/inserter/hooks/use-patterns-state.js +24 -11
  147. package/build/components/inserter/hooks/use-patterns-state.js.map +1 -1
  148. package/build/components/inserter/media-tab/media-panel.js.map +1 -1
  149. package/build/components/inserter/media-tab/media-preview.js +36 -14
  150. package/build/components/inserter/media-tab/media-preview.js.map +1 -1
  151. package/build/components/inserter/media-tab/media-tab.js.map +1 -1
  152. package/build/components/inserter/media-tab/utils.js.map +1 -1
  153. package/build/components/inserter/menu.js +4 -4
  154. package/build/components/inserter/menu.js.map +1 -1
  155. package/build/components/inserter/mobile-tab-navigation.js +5 -5
  156. package/build/components/inserter/mobile-tab-navigation.js.map +1 -1
  157. package/build/components/inserter/preview-panel.js.map +1 -1
  158. package/build/components/inserter/quick-inserter.js +5 -5
  159. package/build/components/inserter/quick-inserter.js.map +1 -1
  160. package/build/components/inserter/search-results.js +1 -1
  161. package/build/components/inserter/search-results.js.map +1 -1
  162. package/build/components/inserter/tabs.native.js.map +1 -1
  163. package/build/components/inspector-controls/block-support-tools-panel.js.map +1 -1
  164. package/build/components/inspector-controls/fill.js.map +1 -1
  165. package/build/components/inspector-controls/fill.native.js.map +1 -1
  166. package/build/components/inspector-controls/slot.js.map +1 -1
  167. package/build/components/inspector-controls/slot.native.js.map +1 -1
  168. package/build/components/line-height-control/index.js.map +1 -1
  169. package/build/components/link-control/index.js +1 -2
  170. package/build/components/link-control/index.js.map +1 -1
  171. package/build/components/link-control/is-url-like.js.map +1 -1
  172. package/build/components/link-control/search-create-button.js +1 -1
  173. package/build/components/link-control/search-create-button.js.map +1 -1
  174. package/build/components/link-control/search-input.js +3 -5
  175. package/build/components/link-control/search-input.js.map +1 -1
  176. package/build/components/link-control/search-results.js +5 -15
  177. package/build/components/link-control/search-results.js.map +1 -1
  178. package/build/components/link-control/settings-drawer.js.map +1 -1
  179. package/build/components/link-control/use-rich-url-data.js.map +1 -1
  180. package/build/components/list-view/appender.js +1 -1
  181. package/build/components/list-view/appender.js.map +1 -1
  182. package/build/components/list-view/block-contents.js +1 -25
  183. package/build/components/list-view/block-contents.js.map +1 -1
  184. package/build/components/list-view/block-select-button.js.map +1 -1
  185. package/build/components/list-view/block.js.map +1 -1
  186. package/build/components/list-view/branch.js.map +1 -1
  187. package/build/components/list-view/drop-indicator.js.map +1 -1
  188. package/build/components/list-view/index.js.map +1 -1
  189. package/build/components/list-view/use-block-selection.js +2 -2
  190. package/build/components/list-view/use-block-selection.js.map +1 -1
  191. package/build/components/list-view/utils.js +1 -1
  192. package/build/components/list-view/utils.js.map +1 -1
  193. package/build/components/media-placeholder/index.native.js +1 -1
  194. package/build/components/media-placeholder/index.native.js.map +1 -1
  195. package/build/components/media-replace-flow/index.js.map +1 -1
  196. package/build/components/multi-selection-inspector/index.js +2 -2
  197. package/build/components/multi-selection-inspector/index.js.map +1 -1
  198. package/build/components/observe-typing/index.js +1 -0
  199. package/build/components/observe-typing/index.js.map +1 -1
  200. package/build/components/recursion-provider/index.js +1 -0
  201. package/build/components/recursion-provider/index.js.map +1 -1
  202. package/build/components/responsive-block-control/index.js +3 -3
  203. package/build/components/responsive-block-control/index.js.map +1 -1
  204. package/build/components/responsive-block-control/label.js +1 -1
  205. package/build/components/responsive-block-control/label.js.map +1 -1
  206. package/build/components/rich-text/content.js.map +1 -1
  207. package/build/components/rich-text/file-paste-handler.native.js.map +1 -1
  208. package/build/components/rich-text/format-toolbar/index.js.map +1 -1
  209. package/build/components/rich-text/format-toolbar/index.native.js.map +1 -1
  210. package/build/components/rich-text/index.js +3 -2
  211. package/build/components/rich-text/index.js.map +1 -1
  212. package/build/components/rich-text/multiline.js.map +1 -1
  213. package/build/components/rich-text/native/get-format-colors.native.js.map +1 -1
  214. package/build/components/rich-text/native/index.native.js.map +1 -1
  215. package/build/components/rich-text/native/use-format-types.js +1 -0
  216. package/build/components/rich-text/native/use-format-types.js.map +1 -1
  217. package/build/components/rich-text/toolbar-button.js.map +1 -1
  218. package/build/components/rich-text/use-format-types.js +1 -0
  219. package/build/components/rich-text/use-format-types.js.map +1 -1
  220. package/build/components/spacing-sizes-control/input-controls/axial.js.map +1 -1
  221. package/build/components/spacing-sizes-control/input-controls/separated.js.map +1 -1
  222. package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
  223. package/build/components/spacing-sizes-control/utils.js +1 -0
  224. package/build/components/spacing-sizes-control/utils.js.map +1 -1
  225. package/build/components/tool-selector/index.js +13 -8
  226. package/build/components/tool-selector/index.js.map +1 -1
  227. package/build/components/typewriter/index.js +1 -0
  228. package/build/components/typewriter/index.js.map +1 -1
  229. package/build/components/unsupported-block-details/index.native.js.map +1 -1
  230. package/build/components/url-input/index.js +1 -1
  231. package/build/components/url-input/index.js.map +1 -1
  232. package/build/components/use-block-commands/index.js +0 -61
  233. package/build/components/use-block-commands/index.js.map +1 -1
  234. package/build/components/use-block-drop-zone/index.js.map +1 -1
  235. package/build/components/use-flash-editable-blocks/index.js.map +1 -1
  236. package/build/components/use-moving-animation/index.js.map +1 -1
  237. package/build/components/writing-flow/use-tab-nav.js +23 -30
  238. package/build/components/writing-flow/use-tab-nav.js.map +1 -1
  239. package/build/hooks/align.js.map +1 -1
  240. package/build/hooks/block-hooks.js +1 -1
  241. package/build/hooks/block-hooks.js.map +1 -1
  242. package/build/hooks/block-style-variation.js.map +1 -1
  243. package/build/hooks/duotone.js +4 -1
  244. package/build/hooks/duotone.js.map +1 -1
  245. package/build/hooks/font-family.js.map +1 -1
  246. package/build/hooks/gap.js.map +1 -1
  247. package/build/hooks/generated-class-name.js +1 -0
  248. package/build/hooks/generated-class-name.js.map +1 -1
  249. package/build/hooks/layout-child.js +3 -1
  250. package/build/hooks/layout-child.js.map +1 -1
  251. package/build/hooks/layout.js.map +1 -1
  252. package/build/hooks/position.js +4 -3
  253. package/build/hooks/position.js.map +1 -1
  254. package/build/hooks/spacing-visualizer.js.map +1 -1
  255. package/build/hooks/style.js.map +1 -1
  256. package/build/hooks/text-align.js.map +1 -1
  257. package/build/hooks/use-typography-props.js.map +1 -1
  258. package/build/hooks/use-zoom-out.js +24 -16
  259. package/build/hooks/use-zoom-out.js.map +1 -1
  260. package/build/layouts/constrained.js.map +1 -1
  261. package/build/layouts/flex.js.map +1 -1
  262. package/build/layouts/grid.js.map +1 -1
  263. package/build/layouts/utils.js.map +1 -1
  264. package/build/store/actions.js +18 -20
  265. package/build/store/actions.js.map +1 -1
  266. package/build/store/private-actions.js +15 -0
  267. package/build/store/private-actions.js.map +1 -1
  268. package/build/store/private-selectors.js +104 -7
  269. package/build/store/private-selectors.js.map +1 -1
  270. package/build/store/reducer.js +24 -44
  271. package/build/store/reducer.js.map +1 -1
  272. package/build/store/selectors.js +149 -71
  273. package/build/store/selectors.js.map +1 -1
  274. package/build/store/utils.js +4 -3
  275. package/build/store/utils.js.map +1 -1
  276. package/build/utils/block-bindings.js +2 -0
  277. package/build/utils/block-bindings.js.map +1 -1
  278. package/build/utils/get-font-styles-and-weights.js +1 -1
  279. package/build/utils/get-font-styles-and-weights.js.map +1 -1
  280. package/build/utils/object.js +1 -0
  281. package/build/utils/object.js.map +1 -1
  282. package/build/utils/pasting.js.map +1 -1
  283. package/build-module/autocompleters/block.js +1 -3
  284. package/build-module/autocompleters/block.js.map +1 -1
  285. package/build-module/autocompleters/link.js +3 -4
  286. package/build-module/autocompleters/link.js.map +1 -1
  287. package/build-module/components/audio-player/index.native.js +1 -2
  288. package/build-module/components/audio-player/index.native.js.map +1 -1
  289. package/build-module/components/background-image-control/index.js +2 -3
  290. package/build-module/components/background-image-control/index.js.map +1 -1
  291. package/build-module/components/block-actions/index.js +1 -13
  292. package/build-module/components/block-actions/index.js.map +1 -1
  293. package/build-module/components/block-alignment-control/ui.js +1 -2
  294. package/build-module/components/block-alignment-control/ui.js.map +1 -1
  295. package/build-module/components/block-breadcrumb/index.js +1 -2
  296. package/build-module/components/block-breadcrumb/index.js.map +1 -1
  297. package/build-module/components/block-canvas/index.js +1 -2
  298. package/build-module/components/block-canvas/index.js.map +1 -1
  299. package/build-module/components/block-card/index.js +1 -2
  300. package/build-module/components/block-card/index.js.map +1 -1
  301. package/build-module/components/block-compare/block-view.js +1 -2
  302. package/build-module/components/block-compare/block-view.js.map +1 -1
  303. package/build-module/components/block-compare/index.js +1 -2
  304. package/build-module/components/block-compare/index.js.map +1 -1
  305. package/build-module/components/block-controls/fill.js +1 -3
  306. package/build-module/components/block-controls/fill.js.map +1 -1
  307. package/build-module/components/block-controls/slot.js.map +1 -1
  308. package/build-module/components/block-controls/slot.native.js.map +1 -1
  309. package/build-module/components/block-draggable/draggable-chip.js +2 -3
  310. package/build-module/components/block-draggable/draggable-chip.js.map +1 -1
  311. package/build-module/components/block-draggable/draggable-chip.native.js +1 -2
  312. package/build-module/components/block-draggable/draggable-chip.native.js.map +1 -1
  313. package/build-module/components/block-draggable/index.native.js +1 -3
  314. package/build-module/components/block-draggable/index.native.js.map +1 -1
  315. package/build-module/components/block-edit/index.js +1 -2
  316. package/build-module/components/block-edit/index.js.map +1 -1
  317. package/build-module/components/block-edit/multiple-usage-warning.js +1 -2
  318. package/build-module/components/block-edit/multiple-usage-warning.js.map +1 -1
  319. package/build-module/components/block-inspector/index.js +57 -78
  320. package/build-module/components/block-inspector/index.js.map +1 -1
  321. package/build-module/components/block-list/block-crash-warning.js +1 -1
  322. package/build-module/components/block-list/block-crash-warning.js.map +1 -1
  323. package/build-module/components/block-list/block-crash-warning.native.js +1 -1
  324. package/build-module/components/block-list/block-crash-warning.native.js.map +1 -1
  325. package/build-module/components/block-list/block-invalid-warning.js +1 -3
  326. package/build-module/components/block-list/block-invalid-warning.js.map +1 -1
  327. package/build-module/components/block-list/block-invalid-warning.native.js +1 -1
  328. package/build-module/components/block-list/block-invalid-warning.native.js.map +1 -1
  329. package/build-module/components/block-list/block-list-item.native.js +1 -2
  330. package/build-module/components/block-list/block-list-item.native.js.map +1 -1
  331. package/build-module/components/block-list/block-selection-button.native.js +1 -2
  332. package/build-module/components/block-list/block-selection-button.native.js.map +1 -1
  333. package/build-module/components/block-list/block.js +6 -19
  334. package/build-module/components/block-list/block.js.map +1 -1
  335. package/build-module/components/block-list/block.native.js +1 -2
  336. package/build-module/components/block-list/block.native.js.map +1 -1
  337. package/build-module/components/block-list/index.js +7 -10
  338. package/build-module/components/block-list/index.js.map +1 -1
  339. package/build-module/components/block-list/index.native.js +1 -3
  340. package/build-module/components/block-list/index.native.js.map +1 -1
  341. package/build-module/components/block-list/insertion-point.native.js +1 -2
  342. package/build-module/components/block-list/insertion-point.native.js.map +1 -1
  343. package/build-module/components/block-list/use-block-props/index.js +3 -8
  344. package/build-module/components/block-list/use-block-props/index.js.map +1 -1
  345. package/build-module/components/block-list/use-block-props/use-selected-block-event-handlers.js +14 -6
  346. package/build-module/components/block-list/use-block-props/use-selected-block-event-handlers.js.map +1 -1
  347. package/build-module/components/block-list/use-in-between-inserter.js +5 -3
  348. package/build-module/components/block-list/use-in-between-inserter.js.map +1 -1
  349. package/build-module/components/block-list/zoom-out-separator.js +24 -13
  350. package/build-module/components/block-list/zoom-out-separator.js.map +1 -1
  351. package/build-module/components/block-lock/menu-item.js +1 -3
  352. package/build-module/components/block-lock/menu-item.js.map +1 -1
  353. package/build-module/components/block-lock/modal.js +2 -3
  354. package/build-module/components/block-lock/modal.js.map +1 -1
  355. package/build-module/components/block-lock/toolbar.js +1 -3
  356. package/build-module/components/block-lock/toolbar.js.map +1 -1
  357. package/build-module/components/block-media-update-progress/index.native.js +1 -2
  358. package/build-module/components/block-media-update-progress/index.native.js.map +1 -1
  359. package/build-module/components/block-mover/button.js +1 -3
  360. package/build-module/components/block-mover/button.js.map +1 -1
  361. package/build-module/components/block-mover/index.js +1 -2
  362. package/build-module/components/block-mover/index.js.map +1 -1
  363. package/build-module/components/block-mover/index.native.js +1 -2
  364. package/build-module/components/block-mover/index.native.js.map +1 -1
  365. package/build-module/components/block-navigation/dropdown.js +3 -6
  366. package/build-module/components/block-navigation/dropdown.js.map +1 -1
  367. package/build-module/components/block-parent-selector/index.js +14 -11
  368. package/build-module/components/block-parent-selector/index.js.map +1 -1
  369. package/build-module/components/block-pattern-setup/index.js +1 -3
  370. package/build-module/components/block-pattern-setup/index.js.map +1 -1
  371. package/build-module/components/block-pattern-setup/setup-toolbar.js +11 -22
  372. package/build-module/components/block-pattern-setup/setup-toolbar.js.map +1 -1
  373. package/build-module/components/block-patterns-list/index.js +1 -3
  374. package/build-module/components/block-patterns-list/index.js.map +1 -1
  375. package/build-module/components/block-patterns-paging/index.js +12 -15
  376. package/build-module/components/block-patterns-paging/index.js.map +1 -1
  377. package/build-module/components/block-popover/index.js +45 -2
  378. package/build-module/components/block-popover/index.js.map +1 -1
  379. package/build-module/components/block-preview/auto.js +2 -7
  380. package/build-module/components/block-preview/auto.js.map +1 -1
  381. package/build-module/components/block-preview/index.js +1 -2
  382. package/build-module/components/block-preview/index.js.map +1 -1
  383. package/build-module/components/block-quick-navigation/index.js +3 -6
  384. package/build-module/components/block-quick-navigation/index.js.map +1 -1
  385. package/build-module/components/block-removal-warning-modal/index.js +1 -2
  386. package/build-module/components/block-removal-warning-modal/index.js.map +1 -1
  387. package/build-module/components/block-rename/modal.js +3 -4
  388. package/build-module/components/block-rename/modal.js.map +1 -1
  389. package/build-module/components/block-rename/rename-control.js +1 -3
  390. package/build-module/components/block-rename/rename-control.js.map +1 -1
  391. package/build-module/components/block-settings/container.native.js +1 -3
  392. package/build-module/components/block-settings/container.native.js.map +1 -1
  393. package/build-module/components/block-settings-menu/block-parent-selector-menu-item.js +1 -1
  394. package/build-module/components/block-settings-menu/block-parent-selector-menu-item.js.map +1 -1
  395. package/build-module/components/block-settings-menu/block-settings-dropdown.js +80 -79
  396. package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  397. package/build-module/components/block-settings-menu-controls/index.js +3 -9
  398. package/build-module/components/block-settings-menu-controls/index.js.map +1 -1
  399. package/build-module/components/block-styles/index.js +1 -2
  400. package/build-module/components/block-styles/index.js.map +1 -1
  401. package/build-module/components/block-styles/menu-items.js +1 -2
  402. package/build-module/components/block-styles/menu-items.js.map +1 -1
  403. package/build-module/components/block-styles/preview.native.js +1 -2
  404. package/build-module/components/block-styles/preview.native.js.map +1 -1
  405. package/build-module/components/block-switcher/block-transformations-menu.js +1 -3
  406. package/build-module/components/block-switcher/block-transformations-menu.js.map +1 -1
  407. package/build-module/components/block-switcher/block-transformations-menu.native.js +1 -1
  408. package/build-module/components/block-switcher/block-transformations-menu.native.js.map +1 -1
  409. package/build-module/components/block-switcher/block-variation-transformations.js +1 -3
  410. package/build-module/components/block-switcher/block-variation-transformations.js.map +1 -1
  411. package/build-module/components/block-switcher/index.js +20 -18
  412. package/build-module/components/block-switcher/index.js.map +1 -1
  413. package/build-module/components/block-switcher/pattern-transformations-menu.js +1 -2
  414. package/build-module/components/block-switcher/pattern-transformations-menu.js.map +1 -1
  415. package/build-module/components/block-switcher/preview-block-popover.js +1 -2
  416. package/build-module/components/block-switcher/preview-block-popover.js.map +1 -1
  417. package/build-module/components/block-switcher/use-transformed-patterns.js +1 -0
  418. package/build-module/components/block-switcher/use-transformed-patterns.js.map +1 -1
  419. package/build-module/components/block-switcher/utils.js +1 -0
  420. package/build-module/components/block-switcher/utils.js.map +1 -1
  421. package/build-module/components/block-toolbar/block-toolbar-menu.native.js +1 -2
  422. package/build-module/components/block-toolbar/block-toolbar-menu.native.js.map +1 -1
  423. package/build-module/components/block-toolbar/index.js +17 -22
  424. package/build-module/components/block-toolbar/index.js.map +1 -1
  425. package/build-module/components/block-toolbar/index.native.js +1 -3
  426. package/build-module/components/block-toolbar/index.native.js.map +1 -1
  427. package/build-module/components/block-toolbar/use-has-block-toolbar.js +3 -5
  428. package/build-module/components/block-toolbar/use-has-block-toolbar.js.map +1 -1
  429. package/build-module/components/block-tools/index.js +9 -20
  430. package/build-module/components/block-tools/index.js.map +1 -1
  431. package/build-module/components/block-tools/insertion-point.js +2 -6
  432. package/build-module/components/block-tools/insertion-point.js.map +1 -1
  433. package/build-module/components/block-tools/use-show-block-tools.js +8 -7
  434. package/build-module/components/block-tools/use-show-block-tools.js.map +1 -1
  435. package/build-module/components/block-tools/zoom-out-mode-inserter-button.js +1 -12
  436. package/build-module/components/block-tools/zoom-out-mode-inserter-button.js.map +1 -1
  437. package/build-module/components/block-tools/zoom-out-mode-inserters.js +14 -17
  438. package/build-module/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
  439. package/build-module/components/block-tools/zoom-out-popover.js +2 -1
  440. package/build-module/components/block-tools/zoom-out-popover.js.map +1 -1
  441. package/build-module/components/block-tools/zoom-out-toolbar.js +7 -35
  442. package/build-module/components/block-tools/zoom-out-toolbar.js.map +1 -1
  443. package/build-module/components/block-types-list/index.js +1 -2
  444. package/build-module/components/block-types-list/index.js.map +1 -1
  445. package/build-module/components/block-types-list/index.native.js +1 -2
  446. package/build-module/components/block-types-list/index.native.js.map +1 -1
  447. package/build-module/components/block-variation-picker/index.js +1 -2
  448. package/build-module/components/block-variation-picker/index.js.map +1 -1
  449. package/build-module/components/block-variation-picker/index.native.js +1 -2
  450. package/build-module/components/block-variation-picker/index.native.js.map +1 -1
  451. package/build-module/components/block-variation-transforms/index.js +4 -4
  452. package/build-module/components/block-variation-transforms/index.js.map +1 -1
  453. package/build-module/components/border-radius-control/index.js +1 -3
  454. package/build-module/components/border-radius-control/index.js.map +1 -1
  455. package/build-module/components/border-radius-control/utils.js.map +1 -1
  456. package/build-module/components/button-block-appender/index.js.map +1 -1
  457. package/build-module/components/button-block-appender/index.native.js +1 -2
  458. package/build-module/components/button-block-appender/index.native.js.map +1 -1
  459. package/build-module/components/child-layout-control/index.js +1 -3
  460. package/build-module/components/child-layout-control/index.js.map +1 -1
  461. package/build-module/components/color-style-selector/index.js.map +1 -1
  462. package/build-module/components/colors/utils.js.map +1 -1
  463. package/build-module/components/colors/with-colors.js.map +1 -1
  464. package/build-module/components/colors-gradients/control.js +1 -2
  465. package/build-module/components/colors-gradients/control.js.map +1 -1
  466. package/build-module/components/colors-gradients/dropdown.js +1 -3
  467. package/build-module/components/colors-gradients/dropdown.js.map +1 -1
  468. package/build-module/components/colors-gradients/panel-color-gradient-settings.js +1 -3
  469. package/build-module/components/colors-gradients/panel-color-gradient-settings.js.map +1 -1
  470. package/build-module/components/colors-gradients/panel-color-gradient-settings.native.js +1 -3
  471. package/build-module/components/colors-gradients/panel-color-gradient-settings.native.js.map +1 -1
  472. package/build-module/components/contrast-checker/index.native.js +1 -2
  473. package/build-module/components/contrast-checker/index.native.js.map +1 -1
  474. package/build-module/components/convert-to-group-buttons/index.js +1 -3
  475. package/build-module/components/convert-to-group-buttons/index.js.map +1 -1
  476. package/build-module/components/convert-to-group-buttons/toolbar.js +1 -2
  477. package/build-module/components/convert-to-group-buttons/toolbar.js.map +1 -1
  478. package/build-module/components/date-format-picker/index.js +2 -2
  479. package/build-module/components/date-format-picker/index.js.map +1 -1
  480. package/build-module/components/default-block-appender/index.js +1 -2
  481. package/build-module/components/default-block-appender/index.js.map +1 -1
  482. package/build-module/components/dimensions-tool/index.js +1 -3
  483. package/build-module/components/dimensions-tool/index.js.map +1 -1
  484. package/build-module/components/dimensions-tool/width-height-tool.js +1 -3
  485. package/build-module/components/dimensions-tool/width-height-tool.js.map +1 -1
  486. package/build-module/components/duotone/utils.js.map +1 -1
  487. package/build-module/components/duotone-control/index.js +1 -2
  488. package/build-module/components/duotone-control/index.js.map +1 -1
  489. package/build-module/components/editor-styles/index.js +1 -3
  490. package/build-module/components/editor-styles/index.js.map +1 -1
  491. package/build-module/components/floating-toolbar/index.native.js +1 -2
  492. package/build-module/components/floating-toolbar/index.native.js.map +1 -1
  493. package/build-module/components/floating-toolbar/nav-up-icon.js +1 -2
  494. package/build-module/components/floating-toolbar/nav-up-icon.js.map +1 -1
  495. package/build-module/components/font-sizes/fluid-utils.js.map +1 -1
  496. package/build-module/components/font-sizes/utils.js.map +1 -1
  497. package/build-module/components/font-sizes/with-font-sizes.js +2 -2
  498. package/build-module/components/font-sizes/with-font-sizes.js.map +1 -1
  499. package/build-module/components/global-styles/advanced-panel.js +1 -2
  500. package/build-module/components/global-styles/advanced-panel.js.map +1 -1
  501. package/build-module/components/global-styles/border-panel.js +2 -3
  502. package/build-module/components/global-styles/border-panel.js.map +1 -1
  503. package/build-module/components/global-styles/color-panel.js +2 -3
  504. package/build-module/components/global-styles/color-panel.js.map +1 -1
  505. package/build-module/components/global-styles/dimensions-panel.js +2 -3
  506. package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
  507. package/build-module/components/global-styles/filters-panel.js +1 -2
  508. package/build-module/components/global-styles/filters-panel.js.map +1 -1
  509. package/build-module/components/global-styles/get-block-css-selector.js.map +1 -1
  510. package/build-module/components/global-styles/get-global-styles-changes.js +2 -1
  511. package/build-module/components/global-styles/get-global-styles-changes.js.map +1 -1
  512. package/build-module/components/global-styles/hooks.js.map +1 -1
  513. package/build-module/components/global-styles/image-settings-panel.js +1 -2
  514. package/build-module/components/global-styles/image-settings-panel.js.map +1 -1
  515. package/build-module/components/global-styles/shadow-panel-components.js +1 -2
  516. package/build-module/components/global-styles/shadow-panel-components.js.map +1 -1
  517. package/build-module/components/global-styles/typography-panel.js +1 -2
  518. package/build-module/components/global-styles/typography-panel.js.map +1 -1
  519. package/build-module/components/global-styles/use-global-styles-context.native.js.map +1 -1
  520. package/build-module/components/global-styles/use-global-styles-output.js.map +1 -1
  521. package/build-module/components/global-styles/utils.js.map +1 -1
  522. package/build-module/components/gradients/use-gradient.js.map +1 -1
  523. package/build-module/components/grid/grid-item-movers.js +1 -3
  524. package/build-module/components/grid/grid-item-movers.js.map +1 -1
  525. package/build-module/components/grid/grid-visualizer.js.map +1 -1
  526. package/build-module/components/height-control/index.js +1 -2
  527. package/build-module/components/height-control/index.js.map +1 -1
  528. package/build-module/components/iframe/index.js +45 -12
  529. package/build-module/components/iframe/index.js.map +1 -1
  530. package/build-module/components/image-editor/aspect-ratio-dropdown.js +1 -3
  531. package/build-module/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
  532. package/build-module/components/image-editor/cropper.js +1 -3
  533. package/build-module/components/image-editor/cropper.js.map +1 -1
  534. package/build-module/components/image-editor/form-controls.js +1 -3
  535. package/build-module/components/image-editor/form-controls.js.map +1 -1
  536. package/build-module/components/image-editor/index.js +1 -2
  537. package/build-module/components/image-editor/index.js.map +1 -1
  538. package/build-module/components/image-editor/use-save-image.js +1 -1
  539. package/build-module/components/image-editor/use-save-image.js.map +1 -1
  540. package/build-module/components/image-link-destinations/index.native.js +1 -3
  541. package/build-module/components/image-link-destinations/index.native.js.map +1 -1
  542. package/build-module/components/image-size-control/index.js +1 -3
  543. package/build-module/components/image-size-control/index.js.map +1 -1
  544. package/build-module/components/inner-blocks/index.js +1 -9
  545. package/build-module/components/inner-blocks/index.js.map +1 -1
  546. package/build-module/components/inner-blocks/use-nested-settings-update.js +16 -9
  547. package/build-module/components/inner-blocks/use-nested-settings-update.js.map +1 -1
  548. package/build-module/components/inner-blocks/warning-max-depth-exceeded.native.js +1 -2
  549. package/build-module/components/inner-blocks/warning-max-depth-exceeded.native.js.map +1 -1
  550. package/build-module/components/inserter/block-patterns-explorer/index.js +1 -2
  551. package/build-module/components/inserter/block-patterns-explorer/index.js.map +1 -1
  552. package/build-module/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js +2 -3
  553. package/build-module/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js.map +1 -1
  554. package/build-module/components/inserter/block-patterns-explorer/pattern-list.js +3 -5
  555. package/build-module/components/inserter/block-patterns-explorer/pattern-list.js.map +1 -1
  556. package/build-module/components/inserter/block-patterns-tab/index.js +1 -3
  557. package/build-module/components/inserter/block-patterns-tab/index.js.map +1 -1
  558. package/build-module/components/inserter/block-patterns-tab/pattern-category-previews.js +1 -3
  559. package/build-module/components/inserter/block-patterns-tab/pattern-category-previews.js.map +1 -1
  560. package/build-module/components/inserter/block-patterns-tab/patterns-filter.js +1 -3
  561. package/build-module/components/inserter/block-patterns-tab/patterns-filter.js.map +1 -1
  562. package/build-module/components/inserter/block-patterns-tab/use-pattern-categories.js +1 -1
  563. package/build-module/components/inserter/block-patterns-tab/use-pattern-categories.js.map +1 -1
  564. package/build-module/components/inserter/block-types-tab.js +2 -4
  565. package/build-module/components/inserter/block-types-tab.js.map +1 -1
  566. package/build-module/components/inserter/block-types-tab.native.js.map +1 -1
  567. package/build-module/components/inserter/category-tabs/index.js +3 -13
  568. package/build-module/components/inserter/category-tabs/index.js.map +1 -1
  569. package/build-module/components/inserter/hooks/use-block-types-state.js +27 -8
  570. package/build-module/components/inserter/hooks/use-block-types-state.js.map +1 -1
  571. package/build-module/components/inserter/hooks/use-insertion-point.js +22 -12
  572. package/build-module/components/inserter/hooks/use-insertion-point.js.map +1 -1
  573. package/build-module/components/inserter/hooks/use-patterns-state.js +24 -11
  574. package/build-module/components/inserter/hooks/use-patterns-state.js.map +1 -1
  575. package/build-module/components/inserter/index.native.js +1 -3
  576. package/build-module/components/inserter/index.native.js.map +1 -1
  577. package/build-module/components/inserter/media-tab/media-panel.js +1 -2
  578. package/build-module/components/inserter/media-tab/media-panel.js.map +1 -1
  579. package/build-module/components/inserter/media-tab/media-preview.js +37 -17
  580. package/build-module/components/inserter/media-tab/media-preview.js.map +1 -1
  581. package/build-module/components/inserter/media-tab/media-tab.js +1 -3
  582. package/build-module/components/inserter/media-tab/media-tab.js.map +1 -1
  583. package/build-module/components/inserter/media-tab/utils.js.map +1 -1
  584. package/build-module/components/inserter/menu.js +5 -7
  585. package/build-module/components/inserter/menu.js.map +1 -1
  586. package/build-module/components/inserter/menu.native.js +1 -3
  587. package/build-module/components/inserter/menu.native.js.map +1 -1
  588. package/build-module/components/inserter/mobile-tab-navigation.js +7 -8
  589. package/build-module/components/inserter/mobile-tab-navigation.js.map +1 -1
  590. package/build-module/components/inserter/no-results.js +1 -2
  591. package/build-module/components/inserter/no-results.js.map +1 -1
  592. package/build-module/components/inserter/no-results.native.js +1 -2
  593. package/build-module/components/inserter/no-results.native.js.map +1 -1
  594. package/build-module/components/inserter/panel.js +1 -3
  595. package/build-module/components/inserter/panel.js.map +1 -1
  596. package/build-module/components/inserter/preview-panel.js +1 -2
  597. package/build-module/components/inserter/preview-panel.js.map +1 -1
  598. package/build-module/components/inserter/quick-inserter.js +6 -7
  599. package/build-module/components/inserter/quick-inserter.js.map +1 -1
  600. package/build-module/components/inserter/search-results.js +2 -3
  601. package/build-module/components/inserter/search-results.js.map +1 -1
  602. package/build-module/components/inserter/tabs.native.js.map +1 -1
  603. package/build-module/components/inserter-button/index.native.js +1 -2
  604. package/build-module/components/inserter-button/index.native.js.map +1 -1
  605. package/build-module/components/inserter-list-item/index.js +1 -2
  606. package/build-module/components/inserter-list-item/index.js.map +1 -1
  607. package/build-module/components/inserter-listbox/index.js +1 -2
  608. package/build-module/components/inserter-listbox/index.js.map +1 -1
  609. package/build-module/components/inspector-controls/block-support-tools-panel.js.map +1 -1
  610. package/build-module/components/inspector-controls/fill.js.map +1 -1
  611. package/build-module/components/inspector-controls/fill.native.js +1 -3
  612. package/build-module/components/inspector-controls/fill.native.js.map +1 -1
  613. package/build-module/components/inspector-controls/slot.js.map +1 -1
  614. package/build-module/components/inspector-controls/slot.native.js.map +1 -1
  615. package/build-module/components/inspector-controls-tabs/index.js +1 -2
  616. package/build-module/components/inspector-controls-tabs/index.js.map +1 -1
  617. package/build-module/components/inspector-controls-tabs/settings-tab.js +1 -3
  618. package/build-module/components/inspector-controls-tabs/settings-tab.js.map +1 -1
  619. package/build-module/components/inspector-controls-tabs/styles-tab.js +1 -3
  620. package/build-module/components/inspector-controls-tabs/styles-tab.js.map +1 -1
  621. package/build-module/components/inspector-popover-header/index.js +1 -2
  622. package/build-module/components/inspector-popover-header/index.js.map +1 -1
  623. package/build-module/components/line-height-control/index.js.map +1 -1
  624. package/build-module/components/link-control/index.js +2 -5
  625. package/build-module/components/link-control/index.js.map +1 -1
  626. package/build-module/components/link-control/is-url-like.js.map +1 -1
  627. package/build-module/components/link-control/link-preview.js +1 -3
  628. package/build-module/components/link-control/link-preview.js.map +1 -1
  629. package/build-module/components/link-control/search-create-button.js +1 -1
  630. package/build-module/components/link-control/search-create-button.js.map +1 -1
  631. package/build-module/components/link-control/search-input.js +4 -7
  632. package/build-module/components/link-control/search-input.js.map +1 -1
  633. package/build-module/components/link-control/search-results.js +6 -17
  634. package/build-module/components/link-control/search-results.js.map +1 -1
  635. package/build-module/components/link-control/settings-drawer.js +1 -3
  636. package/build-module/components/link-control/settings-drawer.js.map +1 -1
  637. package/build-module/components/link-control/settings.js +1 -2
  638. package/build-module/components/link-control/settings.js.map +1 -1
  639. package/build-module/components/link-control/use-rich-url-data.js.map +1 -1
  640. package/build-module/components/list-view/appender.js +2 -3
  641. package/build-module/components/list-view/appender.js.map +1 -1
  642. package/build-module/components/list-view/block-contents.js +2 -28
  643. package/build-module/components/list-view/block-contents.js.map +1 -1
  644. package/build-module/components/list-view/block-select-button.js +1 -2
  645. package/build-module/components/list-view/block-select-button.js.map +1 -1
  646. package/build-module/components/list-view/block.js +1 -3
  647. package/build-module/components/list-view/block.js.map +1 -1
  648. package/build-module/components/list-view/branch.js +1 -3
  649. package/build-module/components/list-view/branch.js.map +1 -1
  650. package/build-module/components/list-view/drop-indicator.js +1 -2
  651. package/build-module/components/list-view/drop-indicator.js.map +1 -1
  652. package/build-module/components/list-view/index.js +1 -2
  653. package/build-module/components/list-view/index.js.map +1 -1
  654. package/build-module/components/list-view/use-block-selection.js +2 -2
  655. package/build-module/components/list-view/use-block-selection.js.map +1 -1
  656. package/build-module/components/list-view/utils.js +1 -1
  657. package/build-module/components/list-view/utils.js.map +1 -1
  658. package/build-module/components/media-placeholder/index.js +1 -3
  659. package/build-module/components/media-placeholder/index.js.map +1 -1
  660. package/build-module/components/media-placeholder/index.native.js +2 -4
  661. package/build-module/components/media-placeholder/index.native.js.map +1 -1
  662. package/build-module/components/media-replace-flow/index.js +1 -3
  663. package/build-module/components/media-replace-flow/index.js.map +1 -1
  664. package/build-module/components/media-upload/index.native.js +1 -3
  665. package/build-module/components/media-upload/index.native.js.map +1 -1
  666. package/build-module/components/media-upload-progress/index.native.js +1 -2
  667. package/build-module/components/media-upload-progress/index.native.js.map +1 -1
  668. package/build-module/components/multi-selection-inspector/index.js +3 -4
  669. package/build-module/components/multi-selection-inspector/index.js.map +1 -1
  670. package/build-module/components/observe-typing/index.js +1 -0
  671. package/build-module/components/observe-typing/index.js.map +1 -1
  672. package/build-module/components/provider/index.js +1 -2
  673. package/build-module/components/provider/index.js.map +1 -1
  674. package/build-module/components/publish-date-time-picker/index.js +1 -2
  675. package/build-module/components/publish-date-time-picker/index.js.map +1 -1
  676. package/build-module/components/recursion-provider/index.js +1 -0
  677. package/build-module/components/recursion-provider/index.js.map +1 -1
  678. package/build-module/components/responsive-block-control/index.js +4 -5
  679. package/build-module/components/responsive-block-control/index.js.map +1 -1
  680. package/build-module/components/responsive-block-control/label.js +2 -4
  681. package/build-module/components/responsive-block-control/label.js.map +1 -1
  682. package/build-module/components/rich-text/content.js.map +1 -1
  683. package/build-module/components/rich-text/event-listeners/before-input-rules.js +2 -2
  684. package/build-module/components/rich-text/event-listeners/before-input-rules.js.map +1 -1
  685. package/build-module/components/rich-text/event-listeners/delete.js +2 -2
  686. package/build-module/components/rich-text/event-listeners/delete.js.map +1 -1
  687. package/build-module/components/rich-text/event-listeners/enter.js +2 -2
  688. package/build-module/components/rich-text/event-listeners/enter.js.map +1 -1
  689. package/build-module/components/rich-text/event-listeners/firefox-compat.js +2 -2
  690. package/build-module/components/rich-text/event-listeners/firefox-compat.js.map +1 -1
  691. package/build-module/components/rich-text/event-listeners/input-events.js +2 -2
  692. package/build-module/components/rich-text/event-listeners/input-events.js.map +1 -1
  693. package/build-module/components/rich-text/event-listeners/input-rules.js +2 -2
  694. package/build-module/components/rich-text/event-listeners/input-rules.js.map +1 -1
  695. package/build-module/components/rich-text/event-listeners/insert-replacement-text.js +2 -2
  696. package/build-module/components/rich-text/event-listeners/insert-replacement-text.js.map +1 -1
  697. package/build-module/components/rich-text/event-listeners/paste-handler.js +2 -2
  698. package/build-module/components/rich-text/event-listeners/paste-handler.js.map +1 -1
  699. package/build-module/components/rich-text/event-listeners/remove-browser-shortcuts.js +2 -2
  700. package/build-module/components/rich-text/event-listeners/remove-browser-shortcuts.js.map +1 -1
  701. package/build-module/components/rich-text/event-listeners/shortcuts.js +2 -2
  702. package/build-module/components/rich-text/event-listeners/shortcuts.js.map +1 -1
  703. package/build-module/components/rich-text/event-listeners/undo-automatic-change.js +2 -2
  704. package/build-module/components/rich-text/event-listeners/undo-automatic-change.js.map +1 -1
  705. package/build-module/components/rich-text/file-paste-handler.native.js.map +1 -1
  706. package/build-module/components/rich-text/format-toolbar/index.js +1 -3
  707. package/build-module/components/rich-text/format-toolbar/index.js.map +1 -1
  708. package/build-module/components/rich-text/format-toolbar/index.native.js +1 -3
  709. package/build-module/components/rich-text/format-toolbar/index.native.js.map +1 -1
  710. package/build-module/components/rich-text/index.js +4 -5
  711. package/build-module/components/rich-text/index.js.map +1 -1
  712. package/build-module/components/rich-text/index.native.js +1 -3
  713. package/build-module/components/rich-text/index.native.js.map +1 -1
  714. package/build-module/components/rich-text/multiline.js.map +1 -1
  715. package/build-module/components/rich-text/native/get-format-colors.native.js.map +1 -1
  716. package/build-module/components/rich-text/native/index.js +1 -1
  717. package/build-module/components/rich-text/native/index.js.map +1 -1
  718. package/build-module/components/rich-text/native/index.native.js +1 -3
  719. package/build-module/components/rich-text/native/index.native.js.map +1 -1
  720. package/build-module/components/rich-text/native/toolbar-button-with-options.native.js +1 -3
  721. package/build-module/components/rich-text/native/toolbar-button-with-options.native.js.map +1 -1
  722. package/build-module/components/rich-text/native/use-format-types.js +1 -0
  723. package/build-module/components/rich-text/native/use-format-types.js.map +1 -1
  724. package/build-module/components/rich-text/toolbar-button.js.map +1 -1
  725. package/build-module/components/rich-text/use-format-types.js +1 -0
  726. package/build-module/components/rich-text/use-format-types.js.map +1 -1
  727. package/build-module/components/spacing-sizes-control/index.js +1 -2
  728. package/build-module/components/spacing-sizes-control/index.js.map +1 -1
  729. package/build-module/components/spacing-sizes-control/input-controls/axial.js +1 -2
  730. package/build-module/components/spacing-sizes-control/input-controls/axial.js.map +1 -1
  731. package/build-module/components/spacing-sizes-control/input-controls/separated.js +1 -2
  732. package/build-module/components/spacing-sizes-control/input-controls/separated.js.map +1 -1
  733. package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js +1 -3
  734. package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
  735. package/build-module/components/spacing-sizes-control/utils.js +1 -0
  736. package/build-module/components/spacing-sizes-control/utils.js.map +1 -1
  737. package/build-module/components/tabbed-sidebar/index.js +1 -2
  738. package/build-module/components/tabbed-sidebar/index.js.map +1 -1
  739. package/build-module/components/tool-selector/index.js +14 -11
  740. package/build-module/components/tool-selector/index.js.map +1 -1
  741. package/build-module/components/typewriter/index.js +1 -0
  742. package/build-module/components/typewriter/index.js.map +1 -1
  743. package/build-module/components/unsupported-block-details/index.native.js +1 -2
  744. package/build-module/components/unsupported-block-details/index.native.js.map +1 -1
  745. package/build-module/components/url-input/button.js +1 -2
  746. package/build-module/components/url-input/button.js.map +1 -1
  747. package/build-module/components/url-input/index.js +2 -4
  748. package/build-module/components/url-input/index.js.map +1 -1
  749. package/build-module/components/url-popover/image-url-input-ui.js +1 -3
  750. package/build-module/components/url-popover/image-url-input-ui.js.map +1 -1
  751. package/build-module/components/url-popover/index.js +1 -2
  752. package/build-module/components/url-popover/index.js.map +1 -1
  753. package/build-module/components/url-popover/link-editor.js +1 -2
  754. package/build-module/components/url-popover/link-editor.js.map +1 -1
  755. package/build-module/components/url-popover/link-viewer.js +1 -2
  756. package/build-module/components/url-popover/link-viewer.js.map +1 -1
  757. package/build-module/components/use-block-commands/index.js +1 -62
  758. package/build-module/components/use-block-commands/index.js.map +1 -1
  759. package/build-module/components/use-block-drop-zone/index.js.map +1 -1
  760. package/build-module/components/use-flash-editable-blocks/index.js.map +1 -1
  761. package/build-module/components/use-moving-animation/index.js.map +1 -1
  762. package/build-module/components/video-player/index.native.js +1 -2
  763. package/build-module/components/video-player/index.native.js.map +1 -1
  764. package/build-module/components/warning/index.js +1 -2
  765. package/build-module/components/warning/index.js.map +1 -1
  766. package/build-module/components/warning/index.native.js +1 -2
  767. package/build-module/components/warning/index.native.js.map +1 -1
  768. package/build-module/components/writing-flow/index.js +1 -3
  769. package/build-module/components/writing-flow/index.js.map +1 -1
  770. package/build-module/components/writing-flow/use-tab-nav.js +24 -31
  771. package/build-module/components/writing-flow/use-tab-nav.js.map +1 -1
  772. package/build-module/hooks/align.js.map +1 -1
  773. package/build-module/hooks/anchor.js +1 -3
  774. package/build-module/hooks/anchor.js.map +1 -1
  775. package/build-module/hooks/block-bindings.js +1 -3
  776. package/build-module/hooks/block-bindings.js.map +1 -1
  777. package/build-module/hooks/block-hooks.js +2 -3
  778. package/build-module/hooks/block-hooks.js.map +1 -1
  779. package/build-module/hooks/block-style-variation.js +1 -2
  780. package/build-module/hooks/block-style-variation.js.map +1 -1
  781. package/build-module/hooks/dimensions.js +1 -3
  782. package/build-module/hooks/dimensions.js.map +1 -1
  783. package/build-module/hooks/duotone.js +5 -4
  784. package/build-module/hooks/duotone.js.map +1 -1
  785. package/build-module/hooks/font-family.js.map +1 -1
  786. package/build-module/hooks/gap.js.map +1 -1
  787. package/build-module/hooks/generated-class-name.js +1 -0
  788. package/build-module/hooks/generated-class-name.js.map +1 -1
  789. package/build-module/hooks/grid-visualizer.js +1 -3
  790. package/build-module/hooks/grid-visualizer.js.map +1 -1
  791. package/build-module/hooks/layout-child.js +5 -4
  792. package/build-module/hooks/layout-child.js.map +1 -1
  793. package/build-module/hooks/layout.js +1 -3
  794. package/build-module/hooks/layout.js.map +1 -1
  795. package/build-module/hooks/position.js +5 -2
  796. package/build-module/hooks/position.js.map +1 -1
  797. package/build-module/hooks/spacing-visualizer.js.map +1 -1
  798. package/build-module/hooks/style.js +1 -3
  799. package/build-module/hooks/style.js.map +1 -1
  800. package/build-module/hooks/text-align.js.map +1 -1
  801. package/build-module/hooks/typography.native.js +1 -2
  802. package/build-module/hooks/typography.native.js.map +1 -1
  803. package/build-module/hooks/use-bindings-attributes.js +1 -2
  804. package/build-module/hooks/use-bindings-attributes.js.map +1 -1
  805. package/build-module/hooks/use-typography-props.js.map +1 -1
  806. package/build-module/hooks/use-zoom-out.js +24 -17
  807. package/build-module/hooks/use-zoom-out.js.map +1 -1
  808. package/build-module/layouts/constrained.js +1 -3
  809. package/build-module/layouts/constrained.js.map +1 -1
  810. package/build-module/layouts/flex.js +1 -3
  811. package/build-module/layouts/flex.js.map +1 -1
  812. package/build-module/layouts/grid.js +1 -3
  813. package/build-module/layouts/grid.js.map +1 -1
  814. package/build-module/layouts/utils.js.map +1 -1
  815. package/build-module/store/actions.js +17 -18
  816. package/build-module/store/actions.js.map +1 -1
  817. package/build-module/store/private-actions.js +14 -0
  818. package/build-module/store/private-actions.js.map +1 -1
  819. package/build-module/store/private-selectors.js +98 -7
  820. package/build-module/store/private-selectors.js.map +1 -1
  821. package/build-module/store/reducer.js +22 -41
  822. package/build-module/store/reducer.js.map +1 -1
  823. package/build-module/store/selectors.js +150 -70
  824. package/build-module/store/selectors.js.map +1 -1
  825. package/build-module/store/utils.js +3 -2
  826. package/build-module/store/utils.js.map +1 -1
  827. package/build-module/utils/block-bindings.js +2 -0
  828. package/build-module/utils/block-bindings.js.map +1 -1
  829. package/build-module/utils/get-font-styles-and-weights.js +1 -1
  830. package/build-module/utils/get-font-styles-and-weights.js.map +1 -1
  831. package/build-module/utils/get-px-from-css-unit.js +1 -1
  832. package/build-module/utils/get-px-from-css-unit.js.map +1 -1
  833. package/build-module/utils/object.js +1 -0
  834. package/build-module/utils/object.js.map +1 -1
  835. package/build-module/utils/pasting.js.map +1 -1
  836. package/build-style/content-rtl.css +22 -73
  837. package/build-style/content.css +22 -73
  838. package/build-style/default-editor-styles-rtl.css +10 -1
  839. package/build-style/default-editor-styles.css +10 -1
  840. package/build-style/style-rtl.css +48 -165
  841. package/build-style/style.css +48 -165
  842. package/package.json +33 -33
  843. package/src/autocompleters/link.js +2 -1
  844. package/src/components/block-actions/index.js +1 -13
  845. package/src/components/block-canvas/style.scss +0 -1
  846. package/src/components/block-draggable/style.scss +2 -2
  847. package/src/components/block-inspector/index.js +79 -95
  848. package/src/components/block-list/block.js +7 -25
  849. package/src/components/block-list/content.scss +4 -63
  850. package/src/components/block-list/index.js +21 -29
  851. package/src/components/block-list/use-block-props/index.js +2 -8
  852. package/src/components/block-list/use-block-props/use-selected-block-event-handlers.js +25 -4
  853. package/src/components/block-list/use-in-between-inserter.js +5 -2
  854. package/src/components/block-list/zoom-out-separator.js +32 -14
  855. package/src/components/block-navigation/dropdown.js +1 -2
  856. package/src/components/block-parent-selector/index.js +13 -10
  857. package/src/components/block-pattern-setup/setup-toolbar.js +5 -10
  858. package/src/components/block-patterns-paging/index.js +8 -7
  859. package/src/components/block-patterns-paging/style.scss +10 -27
  860. package/src/components/block-popover/index.js +64 -2
  861. package/src/components/block-preview/auto.js +1 -4
  862. package/src/components/block-quick-navigation/index.js +1 -2
  863. package/src/components/block-settings-menu/block-settings-dropdown.js +120 -106
  864. package/src/components/block-settings-menu-controls/index.js +0 -15
  865. package/src/components/block-switcher/index.js +37 -30
  866. package/src/components/block-toolbar/index.js +22 -34
  867. package/src/components/block-toolbar/style.scss +10 -1
  868. package/src/components/block-toolbar/use-has-block-toolbar.js +19 -31
  869. package/src/components/block-tools/index.js +7 -27
  870. package/src/components/block-tools/insertion-point.js +1 -4
  871. package/src/components/block-tools/style.scss +0 -90
  872. package/src/components/block-tools/use-show-block-tools.js +10 -13
  873. package/src/components/block-tools/zoom-out-mode-inserter-button.js +2 -17
  874. package/src/components/block-tools/zoom-out-mode-inserters.js +11 -19
  875. package/src/components/block-tools/zoom-out-popover.js +2 -1
  876. package/src/components/block-tools/zoom-out-toolbar.js +4 -36
  877. package/src/components/font-family/README.md +5 -1
  878. package/src/components/global-styles/border-panel.js +1 -1
  879. package/src/components/global-styles/dimensions-panel.js +1 -1
  880. package/src/components/iframe/content.scss +20 -24
  881. package/src/components/iframe/index.js +56 -12
  882. package/src/components/iframe/style.scss +6 -5
  883. package/src/components/inner-blocks/index.js +1 -16
  884. package/src/components/inner-blocks/use-nested-settings-update.js +16 -10
  885. package/src/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js +1 -1
  886. package/src/components/inserter/block-types-tab.js +1 -1
  887. package/src/components/inserter/category-tabs/index.js +1 -11
  888. package/src/components/inserter/hooks/use-block-types-state.js +34 -14
  889. package/src/components/inserter/hooks/use-insertion-point.js +35 -13
  890. package/src/components/inserter/hooks/use-patterns-state.js +46 -9
  891. package/src/components/inserter/media-tab/media-preview.js +38 -12
  892. package/src/components/inserter/menu.js +4 -4
  893. package/src/components/inserter/mobile-tab-navigation.js +10 -13
  894. package/src/components/inserter/quick-inserter.js +6 -5
  895. package/src/components/inserter/style.scss +1 -69
  896. package/src/components/inspector-controls-tabs/style.scss +2 -6
  897. package/src/components/link-control/index.js +0 -1
  898. package/src/components/link-control/search-input.js +4 -5
  899. package/src/components/link-control/search-results.js +2 -13
  900. package/src/components/link-control/test/index.js +84 -46
  901. package/src/components/list-view/block-contents.js +1 -28
  902. package/src/components/list-view/style.scss +0 -14
  903. package/src/components/media-replace-flow/test/index.js +1 -1
  904. package/src/components/responsive-block-control/style.scss +0 -1
  905. package/src/components/rich-text/style.scss +5 -0
  906. package/src/components/tool-selector/index.js +15 -7
  907. package/src/components/tool-selector/style.scss +5 -0
  908. package/src/components/use-block-commands/index.js +0 -58
  909. package/src/components/writing-flow/use-tab-nav.js +32 -40
  910. package/src/content.scss +0 -1
  911. package/src/hooks/duotone.js +4 -1
  912. package/src/hooks/layout-child.js +4 -1
  913. package/src/hooks/position.js +4 -1
  914. package/src/hooks/use-zoom-out.js +36 -20
  915. package/src/store/actions.js +17 -15
  916. package/src/store/private-actions.js +14 -0
  917. package/src/store/private-selectors.js +120 -16
  918. package/src/store/reducer.js +22 -45
  919. package/src/store/selectors.js +218 -118
  920. package/src/store/test/private-actions.js +15 -0
  921. package/src/store/test/private-selectors.js +41 -1
  922. package/src/store/test/reducer.js +40 -4
  923. package/src/store/test/selectors.js +195 -21
  924. package/src/store/utils.js +4 -2
  925. package/src/style.scss +1 -0
  926. package/src/utils/block-bindings.js +2 -0
  927. package/build/components/block-controls/use-has-block-controls.js +0 -43
  928. package/build/components/block-controls/use-has-block-controls.js.map +0 -1
  929. package/build/components/block-list/use-block-props/use-nav-mode-exit.js +0 -54
  930. package/build/components/block-list/use-block-props/use-nav-mode-exit.js.map +0 -1
  931. package/build/components/block-tools/block-selection-button.js +0 -259
  932. package/build/components/block-tools/block-selection-button.js.map +0 -1
  933. package/build/components/block-tools/block-toolbar-breadcrumb.js +0 -57
  934. package/build/components/block-tools/block-toolbar-breadcrumb.js.map +0 -1
  935. package/build/components/inserter/tabs.js +0 -78
  936. package/build/components/inserter/tabs.js.map +0 -1
  937. package/build-module/components/block-controls/use-has-block-controls.js +0 -34
  938. package/build-module/components/block-controls/use-has-block-controls.js.map +0 -1
  939. package/build-module/components/block-list/use-block-props/use-nav-mode-exit.js +0 -48
  940. package/build-module/components/block-list/use-block-props/use-nav-mode-exit.js.map +0 -1
  941. package/build-module/components/block-tools/block-selection-button.js +0 -254
  942. package/build-module/components/block-tools/block-selection-button.js.map +0 -1
  943. package/build-module/components/block-tools/block-toolbar-breadcrumb.js +0 -49
  944. package/build-module/components/block-tools/block-toolbar-breadcrumb.js.map +0 -1
  945. package/build-module/components/inserter/tabs.js +0 -72
  946. package/build-module/components/inserter/tabs.js.map +0 -1
  947. package/src/components/block-controls/use-has-block-controls.js +0 -35
  948. package/src/components/block-list/use-block-props/use-nav-mode-exit.js +0 -46
  949. package/src/components/block-tools/block-selection-button.js +0 -302
  950. package/src/components/block-tools/block-toolbar-breadcrumb.js +0 -51
  951. package/src/components/inner-blocks/content.scss +0 -13
  952. package/src/components/inserter/tabs.js +0 -78
  953. package/src/components/inserter/test/block-types-tab.native.js +0 -67
@@ -1 +1 @@
1
- {"version":3,"names":["clsx","__","__experimentalToolsPanel","ToolsPanel","__experimentalToolsPanelItem","ToolsPanelItem","__experimentalBoxControl","BoxControl","__experimentalUnitControl","UnitControl","__experimentalUseCustomUnits","useCustomUnits","__experimentalInputControlPrefixWrapper","InputControlPrefixWrapper","Icon","alignNone","stretchWide","useCallback","useState","Platform","getValueFromVariable","useToolsPanelDropdownMenuProps","SpacingSizesControl","HeightControl","ChildLayoutControl","AspectRatioTool","cleanEmptyObject","setImmutably","jsx","_jsx","jsxs","_jsxs","AXIAL_SIDES","useHasDimensionsPanel","settings","hasContentSize","useHasContentSize","hasWideSize","useHasWideSize","hasPadding","useHasPadding","hasMargin","useHasMargin","hasGap","useHasGap","hasMinHeight","useHasMinHeight","hasAspectRatio","useHasAspectRatio","hasChildLayout","useHasChildLayout","OS","layout","contentSize","wideSize","spacing","padding","margin","blockGap","dimensions","minHeight","aspectRatio","_settings$parentLayou","type","parentLayoutType","default","defaultParentLayoutType","allowSizingOnChildren","parentLayout","support","useHasSpacingPresets","defaultSpacingSizes","spacingSizes","length","theme","custom","filterValuesBySides","values","sides","filteredValues","forEach","side","top","bottom","left","right","splitStyleValue","value","splitGapValue","DimensionsToolsPanel","resetAllFilter","onChange","panelId","children","dropdownMenuProps","resetAll","updatedValue","label","DEFAULT_CONTROLS","childLayout","DimensionsPanel","as","Wrapper","inheritedValue","defaultControls","onVisualize","includeLayoutControls","_defaultControls$cont","_defaultControls$wide","_defaultControls$padd","_defaultControls$marg","_defaultControls$bloc","_defaultControls$chil","_defaultControls$minH","_defaultControls$aspe","decodeValue","rawValue","Object","keys","reduce","acc","key","showSpacingPresetsControl","units","availableUnits","minimumMargin","Infinity","minMarginValue","setMinMarginValue","showContentSizeControl","contentSizeValue","setContentSizeValue","newValue","undefined","hasUserSetContentSizeValue","resetContentSizeValue","showWideSizeControl","wideSizeValue","setWideSizeValue","hasUserSetWideSizeValue","resetWideSizeValue","showPaddingControl","rawPadding","paddingValues","paddingSides","Array","isArray","isAxialPadding","some","includes","setPaddingValues","newPaddingValues","hasPaddingValue","resetPaddingValue","onMouseOverPadding","showMarginControl","rawMargin","marginValues","marginSides","isAxialMargin","setMarginValues","newMarginValues","hasMarginValue","resetMarginValue","onMouseOverMargin","showGapControl","gapValue","gapValues","gapSides","isAxialGap","setGapValue","newGapValue","setGapValues","nextBoxGapValue","hasOwnProperty","resetGapValue","hasGapValue","showMinHeightControl","minHeightValue","setMinHeightValue","tempValue","resetMinHeightValue","hasMinHeightValue","showAspectRatioControl","aspectRatioValue","setAspectRatioValue","hasAspectRatioValue","showChildLayoutControl","setChildLayout","newChildLayout","previousValue","selfStretch","flexSize","columnStart","rowStart","columnSpan","rowSpan","onMouseLeaveControls","inputProps","min","onDragStart","onDragEnd","className","hasValue","onDeselect","isShownByDefault","__next40pxDefaultSize","labelPosition","nextContentSize","prefix","variant","icon","nextWideSize","allowReset","splitOnAxis","onMouseOver","onMouseOut","minimumCustomValue","showSideInLabel"],"sources":["@wordpress/block-editor/src/components/global-styles/dimensions-panel.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\t__experimentalToolsPanel as ToolsPanel,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n\t__experimentalBoxControl as BoxControl,\n\t__experimentalUnitControl as UnitControl,\n\t__experimentalUseCustomUnits as useCustomUnits,\n\t__experimentalInputControlPrefixWrapper as InputControlPrefixWrapper,\n} from '@wordpress/components';\nimport { Icon, alignNone, stretchWide } from '@wordpress/icons';\nimport { useCallback, useState, Platform } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { getValueFromVariable, useToolsPanelDropdownMenuProps } from './utils';\nimport SpacingSizesControl from '../spacing-sizes-control';\nimport HeightControl from '../height-control';\nimport ChildLayoutControl from '../child-layout-control';\nimport AspectRatioTool from '../dimensions-tool/aspect-ratio-tool';\nimport { cleanEmptyObject } from '../../hooks/utils';\nimport { setImmutably } from '../../utils/object';\n\nconst AXIAL_SIDES = [ 'horizontal', 'vertical' ];\n\nexport function useHasDimensionsPanel( settings ) {\n\tconst hasContentSize = useHasContentSize( settings );\n\tconst hasWideSize = useHasWideSize( settings );\n\tconst hasPadding = useHasPadding( settings );\n\tconst hasMargin = useHasMargin( settings );\n\tconst hasGap = useHasGap( settings );\n\tconst hasMinHeight = useHasMinHeight( settings );\n\tconst hasAspectRatio = useHasAspectRatio( settings );\n\tconst hasChildLayout = useHasChildLayout( settings );\n\n\treturn (\n\t\tPlatform.OS === 'web' &&\n\t\t( hasContentSize ||\n\t\t\thasWideSize ||\n\t\t\thasPadding ||\n\t\t\thasMargin ||\n\t\t\thasGap ||\n\t\t\thasMinHeight ||\n\t\t\thasAspectRatio ||\n\t\t\thasChildLayout )\n\t);\n}\n\nfunction useHasContentSize( settings ) {\n\treturn settings?.layout?.contentSize;\n}\n\nfunction useHasWideSize( settings ) {\n\treturn settings?.layout?.wideSize;\n}\n\nfunction useHasPadding( settings ) {\n\treturn settings?.spacing?.padding;\n}\n\nfunction useHasMargin( settings ) {\n\treturn settings?.spacing?.margin;\n}\n\nfunction useHasGap( settings ) {\n\treturn settings?.spacing?.blockGap;\n}\n\nfunction useHasMinHeight( settings ) {\n\treturn settings?.dimensions?.minHeight;\n}\n\nfunction useHasAspectRatio( settings ) {\n\treturn settings?.dimensions?.aspectRatio;\n}\n\nfunction useHasChildLayout( settings ) {\n\tconst {\n\t\ttype: parentLayoutType = 'default',\n\t\tdefault: { type: defaultParentLayoutType = 'default' } = {},\n\t\tallowSizingOnChildren = false,\n\t} = settings?.parentLayout ?? {};\n\n\tconst support =\n\t\t( defaultParentLayoutType === 'flex' ||\n\t\t\tparentLayoutType === 'flex' ||\n\t\t\tdefaultParentLayoutType === 'grid' ||\n\t\t\tparentLayoutType === 'grid' ) &&\n\t\tallowSizingOnChildren;\n\treturn !! settings?.layout && support;\n}\n\nfunction useHasSpacingPresets( settings ) {\n\tconst { defaultSpacingSizes, spacingSizes } = settings?.spacing || {};\n\treturn (\n\t\t( defaultSpacingSizes !== false &&\n\t\t\tspacingSizes?.default?.length > 0 ) ||\n\t\tspacingSizes?.theme?.length > 0 ||\n\t\tspacingSizes?.custom?.length > 0\n\t);\n}\n\nfunction filterValuesBySides( values, sides ) {\n\t// If no custom side configuration, all sides are opted into by default.\n\t// Without any values, we have nothing to filter either.\n\tif ( ! sides || ! values ) {\n\t\treturn values;\n\t}\n\n\t// Only include sides opted into within filtered values.\n\tconst filteredValues = {};\n\tsides.forEach( ( side ) => {\n\t\tif ( side === 'vertical' ) {\n\t\t\tfilteredValues.top = values.top;\n\t\t\tfilteredValues.bottom = values.bottom;\n\t\t}\n\t\tif ( side === 'horizontal' ) {\n\t\t\tfilteredValues.left = values.left;\n\t\t\tfilteredValues.right = values.right;\n\t\t}\n\t\tfilteredValues[ side ] = values?.[ side ];\n\t} );\n\n\treturn filteredValues;\n}\n\nfunction splitStyleValue( value ) {\n\t// Check for shorthand value (a string value).\n\tif ( value && typeof value === 'string' ) {\n\t\t// Convert to value for individual sides for BoxControl.\n\t\treturn {\n\t\t\ttop: value,\n\t\t\tright: value,\n\t\t\tbottom: value,\n\t\t\tleft: value,\n\t\t};\n\t}\n\n\treturn value;\n}\n\nfunction splitGapValue( value ) {\n\t// Check for shorthand value (a string value).\n\tif ( value && typeof value === 'string' ) {\n\t\t// If the value is a string, treat it as a single side (top) for the spacing controls.\n\t\treturn {\n\t\t\ttop: value,\n\t\t};\n\t}\n\n\tif ( value ) {\n\t\treturn {\n\t\t\t...value,\n\t\t\tright: value?.left,\n\t\t\tbottom: value?.top,\n\t\t};\n\t}\n\n\treturn value;\n}\n\nfunction DimensionsToolsPanel( {\n\tresetAllFilter,\n\tonChange,\n\tvalue,\n\tpanelId,\n\tchildren,\n} ) {\n\tconst dropdownMenuProps = useToolsPanelDropdownMenuProps();\n\tconst resetAll = () => {\n\t\tconst updatedValue = resetAllFilter( value );\n\t\tonChange( updatedValue );\n\t};\n\n\treturn (\n\t\t<ToolsPanel\n\t\t\tlabel={ __( 'Dimensions' ) }\n\t\t\tresetAll={ resetAll }\n\t\t\tpanelId={ panelId }\n\t\t\tdropdownMenuProps={ dropdownMenuProps }\n\t\t>\n\t\t\t{ children }\n\t\t</ToolsPanel>\n\t);\n}\n\nconst DEFAULT_CONTROLS = {\n\tcontentSize: true,\n\twideSize: true,\n\tpadding: true,\n\tmargin: true,\n\tblockGap: true,\n\tminHeight: true,\n\taspectRatio: true,\n\tchildLayout: true,\n};\n\nexport default function DimensionsPanel( {\n\tas: Wrapper = DimensionsToolsPanel,\n\tvalue,\n\tonChange,\n\tinheritedValue = value,\n\tsettings,\n\tpanelId,\n\tdefaultControls = DEFAULT_CONTROLS,\n\tonVisualize = () => {},\n\t// Special case because the layout controls are not part of the dimensions panel\n\t// in global styles but not in block inspector.\n\tincludeLayoutControls = false,\n} ) {\n\tconst { dimensions, spacing } = settings;\n\n\tconst decodeValue = ( rawValue ) => {\n\t\tif ( rawValue && typeof rawValue === 'object' ) {\n\t\t\treturn Object.keys( rawValue ).reduce( ( acc, key ) => {\n\t\t\t\tacc[ key ] = getValueFromVariable(\n\t\t\t\t\t{ settings: { dimensions, spacing } },\n\t\t\t\t\t'',\n\t\t\t\t\trawValue[ key ]\n\t\t\t\t);\n\t\t\t\treturn acc;\n\t\t\t}, {} );\n\t\t}\n\t\treturn getValueFromVariable(\n\t\t\t{ settings: { dimensions, spacing } },\n\t\t\t'',\n\t\t\trawValue\n\t\t);\n\t};\n\n\tconst showSpacingPresetsControl = useHasSpacingPresets( settings );\n\tconst units = useCustomUnits( {\n\t\tavailableUnits: settings?.spacing?.units || [\n\t\t\t'%',\n\t\t\t'px',\n\t\t\t'em',\n\t\t\t'rem',\n\t\t\t'vw',\n\t\t],\n\t} );\n\n\t//Minimum Margin Value\n\tconst minimumMargin = -Infinity;\n\tconst [ minMarginValue, setMinMarginValue ] = useState( minimumMargin );\n\n\t// Content Width\n\tconst showContentSizeControl =\n\t\tuseHasContentSize( settings ) && includeLayoutControls;\n\tconst contentSizeValue = decodeValue( inheritedValue?.layout?.contentSize );\n\tconst setContentSizeValue = ( newValue ) => {\n\t\tonChange(\n\t\t\tsetImmutably(\n\t\t\t\tvalue,\n\t\t\t\t[ 'layout', 'contentSize' ],\n\t\t\t\tnewValue || undefined\n\t\t\t)\n\t\t);\n\t};\n\tconst hasUserSetContentSizeValue = () => !! value?.layout?.contentSize;\n\tconst resetContentSizeValue = () => setContentSizeValue( undefined );\n\n\t// Wide Width\n\tconst showWideSizeControl =\n\t\tuseHasWideSize( settings ) && includeLayoutControls;\n\tconst wideSizeValue = decodeValue( inheritedValue?.layout?.wideSize );\n\tconst setWideSizeValue = ( newValue ) => {\n\t\tonChange(\n\t\t\tsetImmutably(\n\t\t\t\tvalue,\n\t\t\t\t[ 'layout', 'wideSize' ],\n\t\t\t\tnewValue || undefined\n\t\t\t)\n\t\t);\n\t};\n\tconst hasUserSetWideSizeValue = () => !! value?.layout?.wideSize;\n\tconst resetWideSizeValue = () => setWideSizeValue( undefined );\n\n\t// Padding\n\tconst showPaddingControl = useHasPadding( settings );\n\tconst rawPadding = decodeValue( inheritedValue?.spacing?.padding );\n\tconst paddingValues = splitStyleValue( rawPadding );\n\tconst paddingSides = Array.isArray( settings?.spacing?.padding )\n\t\t? settings?.spacing?.padding\n\t\t: settings?.spacing?.padding?.sides;\n\tconst isAxialPadding =\n\t\tpaddingSides &&\n\t\tpaddingSides.some( ( side ) => AXIAL_SIDES.includes( side ) );\n\tconst setPaddingValues = ( newPaddingValues ) => {\n\t\tconst padding = filterValuesBySides( newPaddingValues, paddingSides );\n\t\tonChange( setImmutably( value, [ 'spacing', 'padding' ], padding ) );\n\t};\n\tconst hasPaddingValue = () =>\n\t\t!! value?.spacing?.padding &&\n\t\tObject.keys( value?.spacing?.padding ).length;\n\tconst resetPaddingValue = () => setPaddingValues( undefined );\n\tconst onMouseOverPadding = () => onVisualize( 'padding' );\n\n\t// Margin\n\tconst showMarginControl = useHasMargin( settings );\n\tconst rawMargin = decodeValue( inheritedValue?.spacing?.margin );\n\tconst marginValues = splitStyleValue( rawMargin );\n\tconst marginSides = Array.isArray( settings?.spacing?.margin )\n\t\t? settings?.spacing?.margin\n\t\t: settings?.spacing?.margin?.sides;\n\tconst isAxialMargin =\n\t\tmarginSides &&\n\t\tmarginSides.some( ( side ) => AXIAL_SIDES.includes( side ) );\n\tconst setMarginValues = ( newMarginValues ) => {\n\t\tconst margin = filterValuesBySides( newMarginValues, marginSides );\n\t\tonChange( setImmutably( value, [ 'spacing', 'margin' ], margin ) );\n\t};\n\tconst hasMarginValue = () =>\n\t\t!! value?.spacing?.margin &&\n\t\tObject.keys( value?.spacing?.margin ).length;\n\tconst resetMarginValue = () => setMarginValues( undefined );\n\tconst onMouseOverMargin = () => onVisualize( 'margin' );\n\n\t// Block Gap\n\tconst showGapControl = useHasGap( settings );\n\tconst gapValue = decodeValue( inheritedValue?.spacing?.blockGap );\n\tconst gapValues = splitGapValue( gapValue );\n\tconst gapSides = Array.isArray( settings?.spacing?.blockGap )\n\t\t? settings?.spacing?.blockGap\n\t\t: settings?.spacing?.blockGap?.sides;\n\tconst isAxialGap =\n\t\tgapSides && gapSides.some( ( side ) => AXIAL_SIDES.includes( side ) );\n\tconst setGapValue = ( newGapValue ) => {\n\t\tonChange(\n\t\t\tsetImmutably( value, [ 'spacing', 'blockGap' ], newGapValue )\n\t\t);\n\t};\n\tconst setGapValues = ( nextBoxGapValue ) => {\n\t\tif ( ! nextBoxGapValue ) {\n\t\t\tsetGapValue( null );\n\t\t}\n\t\t// If axial gap is not enabled, treat the 'top' value as the shorthand gap value.\n\t\tif ( ! isAxialGap && nextBoxGapValue?.hasOwnProperty( 'top' ) ) {\n\t\t\tsetGapValue( nextBoxGapValue.top );\n\t\t} else {\n\t\t\tsetGapValue( {\n\t\t\t\ttop: nextBoxGapValue?.top,\n\t\t\t\tleft: nextBoxGapValue?.left,\n\t\t\t} );\n\t\t}\n\t};\n\tconst resetGapValue = () => setGapValue( undefined );\n\tconst hasGapValue = () => !! value?.spacing?.blockGap;\n\n\t// Min Height\n\tconst showMinHeightControl = useHasMinHeight( settings );\n\tconst minHeightValue = decodeValue( inheritedValue?.dimensions?.minHeight );\n\tconst setMinHeightValue = ( newValue ) => {\n\t\tconst tempValue = setImmutably(\n\t\t\tvalue,\n\t\t\t[ 'dimensions', 'minHeight' ],\n\t\t\tnewValue\n\t\t);\n\t\t// Apply min-height, while removing any applied aspect ratio.\n\t\tonChange(\n\t\t\tsetImmutably(\n\t\t\t\ttempValue,\n\t\t\t\t[ 'dimensions', 'aspectRatio' ],\n\t\t\t\tundefined\n\t\t\t)\n\t\t);\n\t};\n\tconst resetMinHeightValue = () => {\n\t\tsetMinHeightValue( undefined );\n\t};\n\tconst hasMinHeightValue = () => !! value?.dimensions?.minHeight;\n\n\t// Aspect Ratio\n\tconst showAspectRatioControl = useHasAspectRatio( settings );\n\tconst aspectRatioValue = decodeValue(\n\t\tinheritedValue?.dimensions?.aspectRatio\n\t);\n\tconst setAspectRatioValue = ( newValue ) => {\n\t\tconst tempValue = setImmutably(\n\t\t\tvalue,\n\t\t\t[ 'dimensions', 'aspectRatio' ],\n\t\t\tnewValue\n\t\t);\n\t\t// Apply aspect-ratio, while removing any applied min-height.\n\t\tonChange(\n\t\t\tsetImmutably( tempValue, [ 'dimensions', 'minHeight' ], undefined )\n\t\t);\n\t};\n\tconst hasAspectRatioValue = () => !! value?.dimensions?.aspectRatio;\n\n\t// Child Layout\n\tconst showChildLayoutControl = useHasChildLayout( settings );\n\tconst childLayout = inheritedValue?.layout;\n\n\tconst setChildLayout = ( newChildLayout ) => {\n\t\tonChange( {\n\t\t\t...value,\n\t\t\tlayout: {\n\t\t\t\t...newChildLayout,\n\t\t\t},\n\t\t} );\n\t};\n\n\tconst resetAllFilter = useCallback( ( previousValue ) => {\n\t\treturn {\n\t\t\t...previousValue,\n\t\t\tlayout: cleanEmptyObject( {\n\t\t\t\t...previousValue?.layout,\n\t\t\t\tcontentSize: undefined,\n\t\t\t\twideSize: undefined,\n\t\t\t\tselfStretch: undefined,\n\t\t\t\tflexSize: undefined,\n\t\t\t\tcolumnStart: undefined,\n\t\t\t\trowStart: undefined,\n\t\t\t\tcolumnSpan: undefined,\n\t\t\t\trowSpan: undefined,\n\t\t\t} ),\n\t\t\tspacing: {\n\t\t\t\t...previousValue?.spacing,\n\t\t\t\tpadding: undefined,\n\t\t\t\tmargin: undefined,\n\t\t\t\tblockGap: undefined,\n\t\t\t},\n\t\t\tdimensions: {\n\t\t\t\t...previousValue?.dimensions,\n\t\t\t\tminHeight: undefined,\n\t\t\t\taspectRatio: undefined,\n\t\t\t},\n\t\t};\n\t}, [] );\n\n\tconst onMouseLeaveControls = () => onVisualize( false );\n\n\tconst inputProps = {\n\t\tmin: minMarginValue,\n\t\tonDragStart: () => {\n\t\t\t//Reset to 0 in case the value was negative.\n\t\t\tsetMinMarginValue( 0 );\n\t\t},\n\t\tonDragEnd: () => {\n\t\t\tsetMinMarginValue( minimumMargin );\n\t\t},\n\t};\n\n\treturn (\n\t\t<Wrapper\n\t\t\tresetAllFilter={ resetAllFilter }\n\t\t\tvalue={ value }\n\t\t\tonChange={ onChange }\n\t\t\tpanelId={ panelId }\n\t\t>\n\t\t\t{ ( showContentSizeControl || showWideSizeControl ) && (\n\t\t\t\t<span className=\"span-columns\">\n\t\t\t\t\t{ __( 'Set the width of the main content area.' ) }\n\t\t\t\t</span>\n\t\t\t) }\n\t\t\t{ showContentSizeControl && (\n\t\t\t\t<ToolsPanelItem\n\t\t\t\t\tlabel={ __( 'Content width' ) }\n\t\t\t\t\thasValue={ hasUserSetContentSizeValue }\n\t\t\t\t\tonDeselect={ resetContentSizeValue }\n\t\t\t\t\tisShownByDefault={\n\t\t\t\t\t\tdefaultControls.contentSize ??\n\t\t\t\t\t\tDEFAULT_CONTROLS.contentSize\n\t\t\t\t\t}\n\t\t\t\t\tpanelId={ panelId }\n\t\t\t\t>\n\t\t\t\t\t<UnitControl\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tlabel={ __( 'Content width' ) }\n\t\t\t\t\t\tlabelPosition=\"top\"\n\t\t\t\t\t\tvalue={ contentSizeValue || '' }\n\t\t\t\t\t\tonChange={ ( nextContentSize ) => {\n\t\t\t\t\t\t\tsetContentSizeValue( nextContentSize );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tunits={ units }\n\t\t\t\t\t\tprefix={\n\t\t\t\t\t\t\t<InputControlPrefixWrapper variant=\"icon\">\n\t\t\t\t\t\t\t\t<Icon icon={ alignNone } />\n\t\t\t\t\t\t\t</InputControlPrefixWrapper>\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t</ToolsPanelItem>\n\t\t\t) }\n\t\t\t{ showWideSizeControl && (\n\t\t\t\t<ToolsPanelItem\n\t\t\t\t\tlabel={ __( 'Wide width' ) }\n\t\t\t\t\thasValue={ hasUserSetWideSizeValue }\n\t\t\t\t\tonDeselect={ resetWideSizeValue }\n\t\t\t\t\tisShownByDefault={\n\t\t\t\t\t\tdefaultControls.wideSize ?? DEFAULT_CONTROLS.wideSize\n\t\t\t\t\t}\n\t\t\t\t\tpanelId={ panelId }\n\t\t\t\t>\n\t\t\t\t\t<UnitControl\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tlabel={ __( 'Wide width' ) }\n\t\t\t\t\t\tlabelPosition=\"top\"\n\t\t\t\t\t\tvalue={ wideSizeValue || '' }\n\t\t\t\t\t\tonChange={ ( nextWideSize ) => {\n\t\t\t\t\t\t\tsetWideSizeValue( nextWideSize );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tunits={ units }\n\t\t\t\t\t\tprefix={\n\t\t\t\t\t\t\t<InputControlPrefixWrapper variant=\"icon\">\n\t\t\t\t\t\t\t\t<Icon icon={ stretchWide } />\n\t\t\t\t\t\t\t</InputControlPrefixWrapper>\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t</ToolsPanelItem>\n\t\t\t) }\n\t\t\t{ showPaddingControl && (\n\t\t\t\t<ToolsPanelItem\n\t\t\t\t\thasValue={ hasPaddingValue }\n\t\t\t\t\tlabel={ __( 'Padding' ) }\n\t\t\t\t\tonDeselect={ resetPaddingValue }\n\t\t\t\t\tisShownByDefault={\n\t\t\t\t\t\tdefaultControls.padding ?? DEFAULT_CONTROLS.padding\n\t\t\t\t\t}\n\t\t\t\t\tclassName={ clsx( {\n\t\t\t\t\t\t'tools-panel-item-spacing': showSpacingPresetsControl,\n\t\t\t\t\t} ) }\n\t\t\t\t\tpanelId={ panelId }\n\t\t\t\t>\n\t\t\t\t\t{ ! showSpacingPresetsControl && (\n\t\t\t\t\t\t<BoxControl\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tvalues={ paddingValues }\n\t\t\t\t\t\t\tonChange={ setPaddingValues }\n\t\t\t\t\t\t\tlabel={ __( 'Padding' ) }\n\t\t\t\t\t\t\tsides={ paddingSides }\n\t\t\t\t\t\t\tunits={ units }\n\t\t\t\t\t\t\tallowReset={ false }\n\t\t\t\t\t\t\tsplitOnAxis={ isAxialPadding }\n\t\t\t\t\t\t\tonMouseOver={ onMouseOverPadding }\n\t\t\t\t\t\t\tonMouseOut={ onMouseLeaveControls }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ showSpacingPresetsControl && (\n\t\t\t\t\t\t<SpacingSizesControl\n\t\t\t\t\t\t\tvalues={ paddingValues }\n\t\t\t\t\t\t\tonChange={ setPaddingValues }\n\t\t\t\t\t\t\tlabel={ __( 'Padding' ) }\n\t\t\t\t\t\t\tsides={ paddingSides }\n\t\t\t\t\t\t\tunits={ units }\n\t\t\t\t\t\t\tallowReset={ false }\n\t\t\t\t\t\t\tonMouseOver={ onMouseOverPadding }\n\t\t\t\t\t\t\tonMouseOut={ onMouseLeaveControls }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</ToolsPanelItem>\n\t\t\t) }\n\t\t\t{ showMarginControl && (\n\t\t\t\t<ToolsPanelItem\n\t\t\t\t\thasValue={ hasMarginValue }\n\t\t\t\t\tlabel={ __( 'Margin' ) }\n\t\t\t\t\tonDeselect={ resetMarginValue }\n\t\t\t\t\tisShownByDefault={\n\t\t\t\t\t\tdefaultControls.margin ?? DEFAULT_CONTROLS.margin\n\t\t\t\t\t}\n\t\t\t\t\tclassName={ clsx( {\n\t\t\t\t\t\t'tools-panel-item-spacing': showSpacingPresetsControl,\n\t\t\t\t\t} ) }\n\t\t\t\t\tpanelId={ panelId }\n\t\t\t\t>\n\t\t\t\t\t{ ! showSpacingPresetsControl && (\n\t\t\t\t\t\t<BoxControl\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tvalues={ marginValues }\n\t\t\t\t\t\t\tonChange={ setMarginValues }\n\t\t\t\t\t\t\tinputProps={ inputProps }\n\t\t\t\t\t\t\tlabel={ __( 'Margin' ) }\n\t\t\t\t\t\t\tsides={ marginSides }\n\t\t\t\t\t\t\tunits={ units }\n\t\t\t\t\t\t\tallowReset={ false }\n\t\t\t\t\t\t\tsplitOnAxis={ isAxialMargin }\n\t\t\t\t\t\t\tonMouseOver={ onMouseOverMargin }\n\t\t\t\t\t\t\tonMouseOut={ onMouseLeaveControls }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ showSpacingPresetsControl && (\n\t\t\t\t\t\t<SpacingSizesControl\n\t\t\t\t\t\t\tvalues={ marginValues }\n\t\t\t\t\t\t\tonChange={ setMarginValues }\n\t\t\t\t\t\t\tminimumCustomValue={ -Infinity }\n\t\t\t\t\t\t\tlabel={ __( 'Margin' ) }\n\t\t\t\t\t\t\tsides={ marginSides }\n\t\t\t\t\t\t\tunits={ units }\n\t\t\t\t\t\t\tallowReset={ false }\n\t\t\t\t\t\t\tonMouseOver={ onMouseOverMargin }\n\t\t\t\t\t\t\tonMouseOut={ onMouseLeaveControls }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</ToolsPanelItem>\n\t\t\t) }\n\t\t\t{ showGapControl && (\n\t\t\t\t<ToolsPanelItem\n\t\t\t\t\thasValue={ hasGapValue }\n\t\t\t\t\tlabel={ __( 'Block spacing' ) }\n\t\t\t\t\tonDeselect={ resetGapValue }\n\t\t\t\t\tisShownByDefault={\n\t\t\t\t\t\tdefaultControls.blockGap ?? DEFAULT_CONTROLS.blockGap\n\t\t\t\t\t}\n\t\t\t\t\tclassName={ clsx( {\n\t\t\t\t\t\t'tools-panel-item-spacing': showSpacingPresetsControl,\n\t\t\t\t\t\t'single-column':\n\t\t\t\t\t\t\t// If UnitControl is used, should be single-column.\n\t\t\t\t\t\t\t! showSpacingPresetsControl && ! isAxialGap,\n\t\t\t\t\t} ) }\n\t\t\t\t\tpanelId={ panelId }\n\t\t\t\t>\n\t\t\t\t\t{ ! showSpacingPresetsControl &&\n\t\t\t\t\t\t( isAxialGap ? (\n\t\t\t\t\t\t\t<BoxControl\n\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\tlabel={ __( 'Block spacing' ) }\n\t\t\t\t\t\t\t\tmin={ 0 }\n\t\t\t\t\t\t\t\tonChange={ setGapValues }\n\t\t\t\t\t\t\t\tunits={ units }\n\t\t\t\t\t\t\t\tsides={ gapSides }\n\t\t\t\t\t\t\t\tvalues={ gapValues }\n\t\t\t\t\t\t\t\tallowReset={ false }\n\t\t\t\t\t\t\t\tsplitOnAxis={ isAxialGap }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<UnitControl\n\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\tlabel={ __( 'Block spacing' ) }\n\t\t\t\t\t\t\t\tmin={ 0 }\n\t\t\t\t\t\t\t\tonChange={ setGapValue }\n\t\t\t\t\t\t\t\tunits={ units }\n\t\t\t\t\t\t\t\tvalue={ gapValue }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) ) }\n\t\t\t\t\t{ showSpacingPresetsControl && (\n\t\t\t\t\t\t<SpacingSizesControl\n\t\t\t\t\t\t\tlabel={ __( 'Block spacing' ) }\n\t\t\t\t\t\t\tmin={ 0 }\n\t\t\t\t\t\t\tonChange={ setGapValues }\n\t\t\t\t\t\t\tshowSideInLabel={ false }\n\t\t\t\t\t\t\tsides={ isAxialGap ? gapSides : [ 'top' ] } // Use 'top' as the shorthand property in non-axial configurations.\n\t\t\t\t\t\t\tvalues={ gapValues }\n\t\t\t\t\t\t\tallowReset={ false }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</ToolsPanelItem>\n\t\t\t) }\n\t\t\t{ showChildLayoutControl && (\n\t\t\t\t<ChildLayoutControl\n\t\t\t\t\tvalue={ childLayout }\n\t\t\t\t\tonChange={ setChildLayout }\n\t\t\t\t\tparentLayout={ settings?.parentLayout }\n\t\t\t\t\tpanelId={ panelId }\n\t\t\t\t\tisShownByDefault={\n\t\t\t\t\t\tdefaultControls.childLayout ??\n\t\t\t\t\t\tDEFAULT_CONTROLS.childLayout\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ showMinHeightControl && (\n\t\t\t\t<ToolsPanelItem\n\t\t\t\t\thasValue={ hasMinHeightValue }\n\t\t\t\t\tlabel={ __( 'Minimum height' ) }\n\t\t\t\t\tonDeselect={ resetMinHeightValue }\n\t\t\t\t\tisShownByDefault={\n\t\t\t\t\t\tdefaultControls.minHeight ?? DEFAULT_CONTROLS.minHeight\n\t\t\t\t\t}\n\t\t\t\t\tpanelId={ panelId }\n\t\t\t\t>\n\t\t\t\t\t<HeightControl\n\t\t\t\t\t\tlabel={ __( 'Minimum height' ) }\n\t\t\t\t\t\tvalue={ minHeightValue }\n\t\t\t\t\t\tonChange={ setMinHeightValue }\n\t\t\t\t\t/>\n\t\t\t\t</ToolsPanelItem>\n\t\t\t) }\n\t\t\t{ showAspectRatioControl && (\n\t\t\t\t<AspectRatioTool\n\t\t\t\t\thasValue={ hasAspectRatioValue }\n\t\t\t\t\tvalue={ aspectRatioValue }\n\t\t\t\t\tonChange={ setAspectRatioValue }\n\t\t\t\t\tpanelId={ panelId }\n\t\t\t\t\tisShownByDefault={\n\t\t\t\t\t\tdefaultControls.aspectRatio ??\n\t\t\t\t\t\tDEFAULT_CONTROLS.aspectRatio\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t) }\n\t\t</Wrapper>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SACCC,wBAAwB,IAAIC,UAAU,EACtCC,4BAA4B,IAAIC,cAAc,EAC9CC,wBAAwB,IAAIC,UAAU,EACtCC,yBAAyB,IAAIC,WAAW,EACxCC,4BAA4B,IAAIC,cAAc,EAC9CC,uCAAuC,IAAIC,yBAAyB,QAC9D,uBAAuB;AAC9B,SAASC,IAAI,EAAEC,SAAS,EAAEC,WAAW,QAAQ,kBAAkB;AAC/D,SAASC,WAAW,EAAEC,QAAQ,EAAEC,QAAQ,QAAQ,oBAAoB;;AAEpE;AACA;AACA;AACA,SAASC,oBAAoB,EAAEC,8BAA8B,QAAQ,SAAS;AAC9E,OAAOC,mBAAmB,MAAM,0BAA0B;AAC1D,OAAOC,aAAa,MAAM,mBAAmB;AAC7C,OAAOC,kBAAkB,MAAM,yBAAyB;AACxD,OAAOC,eAAe,MAAM,sCAAsC;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AC,QAAA,eAEnBhE,IAAA,CAACN,aAAa;QACb0E,KAAK,EAAGhG,EAAE,CAAE,gBAAiB,CAAG;QAChCsF,KAAK,EAAG2F,cAAgB;QACxBvF,QAAQ,EAAGwF;MAAmB,CAC9B;IAAC,CACa,CAChB,EACCI,sBAAsB,iBACvB1J,IAAA,CAACJ,eAAe;MACfkL,QAAQ,EAAGjB,mBAAqB;MAChCnG,KAAK,EAAGiG,gBAAkB;MAC1B7F,QAAQ,EAAG8F,mBAAqB;MAChC7F,OAAO,EAAGA,OAAS;MACnBiH,gBAAgB,GAAA3F,qBAAA,GACfV,eAAe,CAAC3C,WAAW,cAAAqD,qBAAA,cAAAA,qBAAA,GAC3BhB,gBAAgB,CAACrC;IACjB,CACD,CACD;EAAA,CACO,CAAC;AAEZ","ignoreList":[]}
1
+ {"version":3,"names":["clsx","__","__experimentalToolsPanel","ToolsPanel","__experimentalToolsPanelItem","ToolsPanelItem","BoxControl","__experimentalUnitControl","UnitControl","__experimentalUseCustomUnits","useCustomUnits","__experimentalInputControlPrefixWrapper","InputControlPrefixWrapper","Icon","alignNone","stretchWide","useCallback","useState","Platform","getValueFromVariable","useToolsPanelDropdownMenuProps","SpacingSizesControl","HeightControl","ChildLayoutControl","AspectRatioTool","cleanEmptyObject","setImmutably","jsx","_jsx","jsxs","_jsxs","AXIAL_SIDES","useHasDimensionsPanel","settings","hasContentSize","useHasContentSize","hasWideSize","useHasWideSize","hasPadding","useHasPadding","hasMargin","useHasMargin","hasGap","useHasGap","hasMinHeight","useHasMinHeight","hasAspectRatio","useHasAspectRatio","hasChildLayout","useHasChildLayout","OS","layout","contentSize","wideSize","spacing","padding","margin","blockGap","dimensions","minHeight","aspectRatio","_settings$parentLayou","type","parentLayoutType","default","defaultParentLayoutType","allowSizingOnChildren","parentLayout","support","useHasSpacingPresets","defaultSpacingSizes","spacingSizes","length","theme","custom","filterValuesBySides","values","sides","filteredValues","forEach","side","top","bottom","left","right","splitStyleValue","value","splitGapValue","DimensionsToolsPanel","resetAllFilter","onChange","panelId","children","dropdownMenuProps","resetAll","updatedValue","label","DEFAULT_CONTROLS","childLayout","DimensionsPanel","as","Wrapper","inheritedValue","defaultControls","onVisualize","includeLayoutControls","_defaultControls$cont","_defaultControls$wide","_defaultControls$padd","_defaultControls$marg","_defaultControls$bloc","_defaultControls$chil","_defaultControls$minH","_defaultControls$aspe","decodeValue","rawValue","Object","keys","reduce","acc","key","showSpacingPresetsControl","units","availableUnits","minimumMargin","Infinity","minMarginValue","setMinMarginValue","showContentSizeControl","contentSizeValue","setContentSizeValue","newValue","undefined","hasUserSetContentSizeValue","resetContentSizeValue","showWideSizeControl","wideSizeValue","setWideSizeValue","hasUserSetWideSizeValue","resetWideSizeValue","showPaddingControl","rawPadding","paddingValues","paddingSides","Array","isArray","isAxialPadding","some","includes","setPaddingValues","newPaddingValues","hasPaddingValue","resetPaddingValue","onMouseOverPadding","showMarginControl","rawMargin","marginValues","marginSides","isAxialMargin","setMarginValues","newMarginValues","hasMarginValue","resetMarginValue","onMouseOverMargin","showGapControl","gapValue","gapValues","gapSides","isAxialGap","setGapValue","newGapValue","setGapValues","nextBoxGapValue","hasOwnProperty","resetGapValue","hasGapValue","showMinHeightControl","minHeightValue","setMinHeightValue","tempValue","resetMinHeightValue","hasMinHeightValue","showAspectRatioControl","aspectRatioValue","setAspectRatioValue","hasAspectRatioValue","showChildLayoutControl","setChildLayout","newChildLayout","previousValue","selfStretch","flexSize","columnStart","rowStart","columnSpan","rowSpan","onMouseLeaveControls","inputProps","min","onDragStart","onDragEnd","className","hasValue","onDeselect","isShownByDefault","__next40pxDefaultSize","labelPosition","nextContentSize","prefix","variant","icon","nextWideSize","allowReset","splitOnAxis","onMouseOver","onMouseOut","minimumCustomValue","showSideInLabel"],"sources":["@wordpress/block-editor/src/components/global-styles/dimensions-panel.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\t__experimentalToolsPanel as ToolsPanel,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n\tBoxControl,\n\t__experimentalUnitControl as UnitControl,\n\t__experimentalUseCustomUnits as useCustomUnits,\n\t__experimentalInputControlPrefixWrapper as InputControlPrefixWrapper,\n} from '@wordpress/components';\nimport { Icon, alignNone, stretchWide } from '@wordpress/icons';\nimport { useCallback, useState, Platform } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { getValueFromVariable, useToolsPanelDropdownMenuProps } from './utils';\nimport SpacingSizesControl from '../spacing-sizes-control';\nimport HeightControl from '../height-control';\nimport ChildLayoutControl from '../child-layout-control';\nimport AspectRatioTool from '../dimensions-tool/aspect-ratio-tool';\nimport { cleanEmptyObject } from '../../hooks/utils';\nimport { setImmutably } from '../../utils/object';\n\nconst AXIAL_SIDES = [ 'horizontal', 'vertical' ];\n\nexport function useHasDimensionsPanel( settings ) {\n\tconst hasContentSize = useHasContentSize( settings );\n\tconst hasWideSize = useHasWideSize( settings );\n\tconst hasPadding = useHasPadding( settings );\n\tconst hasMargin = useHasMargin( settings );\n\tconst hasGap = useHasGap( settings );\n\tconst hasMinHeight = useHasMinHeight( settings );\n\tconst hasAspectRatio = useHasAspectRatio( settings );\n\tconst hasChildLayout = useHasChildLayout( settings );\n\n\treturn (\n\t\tPlatform.OS === 'web' &&\n\t\t( hasContentSize ||\n\t\t\thasWideSize ||\n\t\t\thasPadding ||\n\t\t\thasMargin ||\n\t\t\thasGap ||\n\t\t\thasMinHeight ||\n\t\t\thasAspectRatio ||\n\t\t\thasChildLayout )\n\t);\n}\n\nfunction useHasContentSize( settings ) {\n\treturn settings?.layout?.contentSize;\n}\n\nfunction useHasWideSize( settings ) {\n\treturn settings?.layout?.wideSize;\n}\n\nfunction useHasPadding( settings ) {\n\treturn settings?.spacing?.padding;\n}\n\nfunction useHasMargin( settings ) {\n\treturn settings?.spacing?.margin;\n}\n\nfunction useHasGap( settings ) {\n\treturn settings?.spacing?.blockGap;\n}\n\nfunction useHasMinHeight( settings ) {\n\treturn settings?.dimensions?.minHeight;\n}\n\nfunction useHasAspectRatio( settings ) {\n\treturn settings?.dimensions?.aspectRatio;\n}\n\nfunction useHasChildLayout( settings ) {\n\tconst {\n\t\ttype: parentLayoutType = 'default',\n\t\tdefault: { type: defaultParentLayoutType = 'default' } = {},\n\t\tallowSizingOnChildren = false,\n\t} = settings?.parentLayout ?? {};\n\n\tconst support =\n\t\t( defaultParentLayoutType === 'flex' ||\n\t\t\tparentLayoutType === 'flex' ||\n\t\t\tdefaultParentLayoutType === 'grid' ||\n\t\t\tparentLayoutType === 'grid' ) &&\n\t\tallowSizingOnChildren;\n\treturn !! settings?.layout && support;\n}\n\nfunction useHasSpacingPresets( settings ) {\n\tconst { defaultSpacingSizes, spacingSizes } = settings?.spacing || {};\n\treturn (\n\t\t( defaultSpacingSizes !== false &&\n\t\t\tspacingSizes?.default?.length > 0 ) ||\n\t\tspacingSizes?.theme?.length > 0 ||\n\t\tspacingSizes?.custom?.length > 0\n\t);\n}\n\nfunction filterValuesBySides( values, sides ) {\n\t// If no custom side configuration, all sides are opted into by default.\n\t// Without any values, we have nothing to filter either.\n\tif ( ! sides || ! values ) {\n\t\treturn values;\n\t}\n\n\t// Only include sides opted into within filtered values.\n\tconst filteredValues = {};\n\tsides.forEach( ( side ) => {\n\t\tif ( side === 'vertical' ) {\n\t\t\tfilteredValues.top = values.top;\n\t\t\tfilteredValues.bottom = values.bottom;\n\t\t}\n\t\tif ( side === 'horizontal' ) {\n\t\t\tfilteredValues.left = values.left;\n\t\t\tfilteredValues.right = values.right;\n\t\t}\n\t\tfilteredValues[ side ] = values?.[ side ];\n\t} );\n\n\treturn filteredValues;\n}\n\nfunction splitStyleValue( value ) {\n\t// Check for shorthand value (a string value).\n\tif ( value && typeof value === 'string' ) {\n\t\t// Convert to value for individual sides for BoxControl.\n\t\treturn {\n\t\t\ttop: value,\n\t\t\tright: value,\n\t\t\tbottom: value,\n\t\t\tleft: value,\n\t\t};\n\t}\n\n\treturn value;\n}\n\nfunction splitGapValue( value ) {\n\t// Check for shorthand value (a string value).\n\tif ( value && typeof value === 'string' ) {\n\t\t// If the value is a string, treat it as a single side (top) for the spacing controls.\n\t\treturn {\n\t\t\ttop: value,\n\t\t};\n\t}\n\n\tif ( value ) {\n\t\treturn {\n\t\t\t...value,\n\t\t\tright: value?.left,\n\t\t\tbottom: value?.top,\n\t\t};\n\t}\n\n\treturn value;\n}\n\nfunction DimensionsToolsPanel( {\n\tresetAllFilter,\n\tonChange,\n\tvalue,\n\tpanelId,\n\tchildren,\n} ) {\n\tconst dropdownMenuProps = useToolsPanelDropdownMenuProps();\n\tconst resetAll = () => {\n\t\tconst updatedValue = resetAllFilter( value );\n\t\tonChange( updatedValue );\n\t};\n\n\treturn (\n\t\t<ToolsPanel\n\t\t\tlabel={ __( 'Dimensions' ) }\n\t\t\tresetAll={ resetAll }\n\t\t\tpanelId={ panelId }\n\t\t\tdropdownMenuProps={ dropdownMenuProps }\n\t\t>\n\t\t\t{ children }\n\t\t</ToolsPanel>\n\t);\n}\n\nconst DEFAULT_CONTROLS = {\n\tcontentSize: true,\n\twideSize: true,\n\tpadding: true,\n\tmargin: true,\n\tblockGap: true,\n\tminHeight: true,\n\taspectRatio: true,\n\tchildLayout: true,\n};\n\nexport default function DimensionsPanel( {\n\tas: Wrapper = DimensionsToolsPanel,\n\tvalue,\n\tonChange,\n\tinheritedValue = value,\n\tsettings,\n\tpanelId,\n\tdefaultControls = DEFAULT_CONTROLS,\n\tonVisualize = () => {},\n\t// Special case because the layout controls are not part of the dimensions panel\n\t// in global styles but not in block inspector.\n\tincludeLayoutControls = false,\n} ) {\n\tconst { dimensions, spacing } = settings;\n\n\tconst decodeValue = ( rawValue ) => {\n\t\tif ( rawValue && typeof rawValue === 'object' ) {\n\t\t\treturn Object.keys( rawValue ).reduce( ( acc, key ) => {\n\t\t\t\tacc[ key ] = getValueFromVariable(\n\t\t\t\t\t{ settings: { dimensions, spacing } },\n\t\t\t\t\t'',\n\t\t\t\t\trawValue[ key ]\n\t\t\t\t);\n\t\t\t\treturn acc;\n\t\t\t}, {} );\n\t\t}\n\t\treturn getValueFromVariable(\n\t\t\t{ settings: { dimensions, spacing } },\n\t\t\t'',\n\t\t\trawValue\n\t\t);\n\t};\n\n\tconst showSpacingPresetsControl = useHasSpacingPresets( settings );\n\tconst units = useCustomUnits( {\n\t\tavailableUnits: settings?.spacing?.units || [\n\t\t\t'%',\n\t\t\t'px',\n\t\t\t'em',\n\t\t\t'rem',\n\t\t\t'vw',\n\t\t],\n\t} );\n\n\t//Minimum Margin Value\n\tconst minimumMargin = -Infinity;\n\tconst [ minMarginValue, setMinMarginValue ] = useState( minimumMargin );\n\n\t// Content Width\n\tconst showContentSizeControl =\n\t\tuseHasContentSize( settings ) && includeLayoutControls;\n\tconst contentSizeValue = decodeValue( inheritedValue?.layout?.contentSize );\n\tconst setContentSizeValue = ( newValue ) => {\n\t\tonChange(\n\t\t\tsetImmutably(\n\t\t\t\tvalue,\n\t\t\t\t[ 'layout', 'contentSize' ],\n\t\t\t\tnewValue || undefined\n\t\t\t)\n\t\t);\n\t};\n\tconst hasUserSetContentSizeValue = () => !! value?.layout?.contentSize;\n\tconst resetContentSizeValue = () => setContentSizeValue( undefined );\n\n\t// Wide Width\n\tconst showWideSizeControl =\n\t\tuseHasWideSize( settings ) && includeLayoutControls;\n\tconst wideSizeValue = decodeValue( inheritedValue?.layout?.wideSize );\n\tconst setWideSizeValue = ( newValue ) => {\n\t\tonChange(\n\t\t\tsetImmutably(\n\t\t\t\tvalue,\n\t\t\t\t[ 'layout', 'wideSize' ],\n\t\t\t\tnewValue || undefined\n\t\t\t)\n\t\t);\n\t};\n\tconst hasUserSetWideSizeValue = () => !! value?.layout?.wideSize;\n\tconst resetWideSizeValue = () => setWideSizeValue( undefined );\n\n\t// Padding\n\tconst showPaddingControl = useHasPadding( settings );\n\tconst rawPadding = decodeValue( inheritedValue?.spacing?.padding );\n\tconst paddingValues = splitStyleValue( rawPadding );\n\tconst paddingSides = Array.isArray( settings?.spacing?.padding )\n\t\t? settings?.spacing?.padding\n\t\t: settings?.spacing?.padding?.sides;\n\tconst isAxialPadding =\n\t\tpaddingSides &&\n\t\tpaddingSides.some( ( side ) => AXIAL_SIDES.includes( side ) );\n\tconst setPaddingValues = ( newPaddingValues ) => {\n\t\tconst padding = filterValuesBySides( newPaddingValues, paddingSides );\n\t\tonChange( setImmutably( value, [ 'spacing', 'padding' ], padding ) );\n\t};\n\tconst hasPaddingValue = () =>\n\t\t!! value?.spacing?.padding &&\n\t\tObject.keys( value?.spacing?.padding ).length;\n\tconst resetPaddingValue = () => setPaddingValues( undefined );\n\tconst onMouseOverPadding = () => onVisualize( 'padding' );\n\n\t// Margin\n\tconst showMarginControl = useHasMargin( settings );\n\tconst rawMargin = decodeValue( inheritedValue?.spacing?.margin );\n\tconst marginValues = splitStyleValue( rawMargin );\n\tconst marginSides = Array.isArray( settings?.spacing?.margin )\n\t\t? settings?.spacing?.margin\n\t\t: settings?.spacing?.margin?.sides;\n\tconst isAxialMargin =\n\t\tmarginSides &&\n\t\tmarginSides.some( ( side ) => AXIAL_SIDES.includes( side ) );\n\tconst setMarginValues = ( newMarginValues ) => {\n\t\tconst margin = filterValuesBySides( newMarginValues, marginSides );\n\t\tonChange( setImmutably( value, [ 'spacing', 'margin' ], margin ) );\n\t};\n\tconst hasMarginValue = () =>\n\t\t!! value?.spacing?.margin &&\n\t\tObject.keys( value?.spacing?.margin ).length;\n\tconst resetMarginValue = () => setMarginValues( undefined );\n\tconst onMouseOverMargin = () => onVisualize( 'margin' );\n\n\t// Block Gap\n\tconst showGapControl = useHasGap( settings );\n\tconst gapValue = decodeValue( inheritedValue?.spacing?.blockGap );\n\tconst gapValues = splitGapValue( gapValue );\n\tconst gapSides = Array.isArray( settings?.spacing?.blockGap )\n\t\t? settings?.spacing?.blockGap\n\t\t: settings?.spacing?.blockGap?.sides;\n\tconst isAxialGap =\n\t\tgapSides && gapSides.some( ( side ) => AXIAL_SIDES.includes( side ) );\n\tconst setGapValue = ( newGapValue ) => {\n\t\tonChange(\n\t\t\tsetImmutably( value, [ 'spacing', 'blockGap' ], newGapValue )\n\t\t);\n\t};\n\tconst setGapValues = ( nextBoxGapValue ) => {\n\t\tif ( ! nextBoxGapValue ) {\n\t\t\tsetGapValue( null );\n\t\t}\n\t\t// If axial gap is not enabled, treat the 'top' value as the shorthand gap value.\n\t\tif ( ! isAxialGap && nextBoxGapValue?.hasOwnProperty( 'top' ) ) {\n\t\t\tsetGapValue( nextBoxGapValue.top );\n\t\t} else {\n\t\t\tsetGapValue( {\n\t\t\t\ttop: nextBoxGapValue?.top,\n\t\t\t\tleft: nextBoxGapValue?.left,\n\t\t\t} );\n\t\t}\n\t};\n\tconst resetGapValue = () => setGapValue( undefined );\n\tconst hasGapValue = () => !! value?.spacing?.blockGap;\n\n\t// Min Height\n\tconst showMinHeightControl = useHasMinHeight( settings );\n\tconst minHeightValue = decodeValue( inheritedValue?.dimensions?.minHeight );\n\tconst setMinHeightValue = ( newValue ) => {\n\t\tconst tempValue = setImmutably(\n\t\t\tvalue,\n\t\t\t[ 'dimensions', 'minHeight' ],\n\t\t\tnewValue\n\t\t);\n\t\t// Apply min-height, while removing any applied aspect ratio.\n\t\tonChange(\n\t\t\tsetImmutably(\n\t\t\t\ttempValue,\n\t\t\t\t[ 'dimensions', 'aspectRatio' ],\n\t\t\t\tundefined\n\t\t\t)\n\t\t);\n\t};\n\tconst resetMinHeightValue = () => {\n\t\tsetMinHeightValue( undefined );\n\t};\n\tconst hasMinHeightValue = () => !! value?.dimensions?.minHeight;\n\n\t// Aspect Ratio\n\tconst showAspectRatioControl = useHasAspectRatio( settings );\n\tconst aspectRatioValue = decodeValue(\n\t\tinheritedValue?.dimensions?.aspectRatio\n\t);\n\tconst setAspectRatioValue = ( newValue ) => {\n\t\tconst tempValue = setImmutably(\n\t\t\tvalue,\n\t\t\t[ 'dimensions', 'aspectRatio' ],\n\t\t\tnewValue\n\t\t);\n\t\t// Apply aspect-ratio, while removing any applied min-height.\n\t\tonChange(\n\t\t\tsetImmutably( tempValue, [ 'dimensions', 'minHeight' ], undefined )\n\t\t);\n\t};\n\tconst hasAspectRatioValue = () => !! value?.dimensions?.aspectRatio;\n\n\t// Child Layout\n\tconst showChildLayoutControl = useHasChildLayout( settings );\n\tconst childLayout = inheritedValue?.layout;\n\n\tconst setChildLayout = ( newChildLayout ) => {\n\t\tonChange( {\n\t\t\t...value,\n\t\t\tlayout: {\n\t\t\t\t...newChildLayout,\n\t\t\t},\n\t\t} );\n\t};\n\n\tconst resetAllFilter = useCallback( ( previousValue ) => {\n\t\treturn {\n\t\t\t...previousValue,\n\t\t\tlayout: cleanEmptyObject( {\n\t\t\t\t...previousValue?.layout,\n\t\t\t\tcontentSize: undefined,\n\t\t\t\twideSize: undefined,\n\t\t\t\tselfStretch: undefined,\n\t\t\t\tflexSize: undefined,\n\t\t\t\tcolumnStart: undefined,\n\t\t\t\trowStart: undefined,\n\t\t\t\tcolumnSpan: undefined,\n\t\t\t\trowSpan: undefined,\n\t\t\t} ),\n\t\t\tspacing: {\n\t\t\t\t...previousValue?.spacing,\n\t\t\t\tpadding: undefined,\n\t\t\t\tmargin: undefined,\n\t\t\t\tblockGap: undefined,\n\t\t\t},\n\t\t\tdimensions: {\n\t\t\t\t...previousValue?.dimensions,\n\t\t\t\tminHeight: undefined,\n\t\t\t\taspectRatio: undefined,\n\t\t\t},\n\t\t};\n\t}, [] );\n\n\tconst onMouseLeaveControls = () => onVisualize( false );\n\n\tconst inputProps = {\n\t\tmin: minMarginValue,\n\t\tonDragStart: () => {\n\t\t\t//Reset to 0 in case the value was negative.\n\t\t\tsetMinMarginValue( 0 );\n\t\t},\n\t\tonDragEnd: () => {\n\t\t\tsetMinMarginValue( minimumMargin );\n\t\t},\n\t};\n\n\treturn (\n\t\t<Wrapper\n\t\t\tresetAllFilter={ resetAllFilter }\n\t\t\tvalue={ value }\n\t\t\tonChange={ onChange }\n\t\t\tpanelId={ panelId }\n\t\t>\n\t\t\t{ ( showContentSizeControl || showWideSizeControl ) && (\n\t\t\t\t<span className=\"span-columns\">\n\t\t\t\t\t{ __( 'Set the width of the main content area.' ) }\n\t\t\t\t</span>\n\t\t\t) }\n\t\t\t{ showContentSizeControl && (\n\t\t\t\t<ToolsPanelItem\n\t\t\t\t\tlabel={ __( 'Content width' ) }\n\t\t\t\t\thasValue={ hasUserSetContentSizeValue }\n\t\t\t\t\tonDeselect={ resetContentSizeValue }\n\t\t\t\t\tisShownByDefault={\n\t\t\t\t\t\tdefaultControls.contentSize ??\n\t\t\t\t\t\tDEFAULT_CONTROLS.contentSize\n\t\t\t\t\t}\n\t\t\t\t\tpanelId={ panelId }\n\t\t\t\t>\n\t\t\t\t\t<UnitControl\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tlabel={ __( 'Content width' ) }\n\t\t\t\t\t\tlabelPosition=\"top\"\n\t\t\t\t\t\tvalue={ contentSizeValue || '' }\n\t\t\t\t\t\tonChange={ ( nextContentSize ) => {\n\t\t\t\t\t\t\tsetContentSizeValue( nextContentSize );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tunits={ units }\n\t\t\t\t\t\tprefix={\n\t\t\t\t\t\t\t<InputControlPrefixWrapper variant=\"icon\">\n\t\t\t\t\t\t\t\t<Icon icon={ alignNone } />\n\t\t\t\t\t\t\t</InputControlPrefixWrapper>\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t</ToolsPanelItem>\n\t\t\t) }\n\t\t\t{ showWideSizeControl && (\n\t\t\t\t<ToolsPanelItem\n\t\t\t\t\tlabel={ __( 'Wide width' ) }\n\t\t\t\t\thasValue={ hasUserSetWideSizeValue }\n\t\t\t\t\tonDeselect={ resetWideSizeValue }\n\t\t\t\t\tisShownByDefault={\n\t\t\t\t\t\tdefaultControls.wideSize ?? DEFAULT_CONTROLS.wideSize\n\t\t\t\t\t}\n\t\t\t\t\tpanelId={ panelId }\n\t\t\t\t>\n\t\t\t\t\t<UnitControl\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tlabel={ __( 'Wide width' ) }\n\t\t\t\t\t\tlabelPosition=\"top\"\n\t\t\t\t\t\tvalue={ wideSizeValue || '' }\n\t\t\t\t\t\tonChange={ ( nextWideSize ) => {\n\t\t\t\t\t\t\tsetWideSizeValue( nextWideSize );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tunits={ units }\n\t\t\t\t\t\tprefix={\n\t\t\t\t\t\t\t<InputControlPrefixWrapper variant=\"icon\">\n\t\t\t\t\t\t\t\t<Icon icon={ stretchWide } />\n\t\t\t\t\t\t\t</InputControlPrefixWrapper>\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t</ToolsPanelItem>\n\t\t\t) }\n\t\t\t{ showPaddingControl && (\n\t\t\t\t<ToolsPanelItem\n\t\t\t\t\thasValue={ hasPaddingValue }\n\t\t\t\t\tlabel={ __( 'Padding' ) }\n\t\t\t\t\tonDeselect={ resetPaddingValue }\n\t\t\t\t\tisShownByDefault={\n\t\t\t\t\t\tdefaultControls.padding ?? DEFAULT_CONTROLS.padding\n\t\t\t\t\t}\n\t\t\t\t\tclassName={ clsx( {\n\t\t\t\t\t\t'tools-panel-item-spacing': showSpacingPresetsControl,\n\t\t\t\t\t} ) }\n\t\t\t\t\tpanelId={ panelId }\n\t\t\t\t>\n\t\t\t\t\t{ ! showSpacingPresetsControl && (\n\t\t\t\t\t\t<BoxControl\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tvalues={ paddingValues }\n\t\t\t\t\t\t\tonChange={ setPaddingValues }\n\t\t\t\t\t\t\tlabel={ __( 'Padding' ) }\n\t\t\t\t\t\t\tsides={ paddingSides }\n\t\t\t\t\t\t\tunits={ units }\n\t\t\t\t\t\t\tallowReset={ false }\n\t\t\t\t\t\t\tsplitOnAxis={ isAxialPadding }\n\t\t\t\t\t\t\tonMouseOver={ onMouseOverPadding }\n\t\t\t\t\t\t\tonMouseOut={ onMouseLeaveControls }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ showSpacingPresetsControl && (\n\t\t\t\t\t\t<SpacingSizesControl\n\t\t\t\t\t\t\tvalues={ paddingValues }\n\t\t\t\t\t\t\tonChange={ setPaddingValues }\n\t\t\t\t\t\t\tlabel={ __( 'Padding' ) }\n\t\t\t\t\t\t\tsides={ paddingSides }\n\t\t\t\t\t\t\tunits={ units }\n\t\t\t\t\t\t\tallowReset={ false }\n\t\t\t\t\t\t\tonMouseOver={ onMouseOverPadding }\n\t\t\t\t\t\t\tonMouseOut={ onMouseLeaveControls }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</ToolsPanelItem>\n\t\t\t) }\n\t\t\t{ showMarginControl && (\n\t\t\t\t<ToolsPanelItem\n\t\t\t\t\thasValue={ hasMarginValue }\n\t\t\t\t\tlabel={ __( 'Margin' ) }\n\t\t\t\t\tonDeselect={ resetMarginValue }\n\t\t\t\t\tisShownByDefault={\n\t\t\t\t\t\tdefaultControls.margin ?? DEFAULT_CONTROLS.margin\n\t\t\t\t\t}\n\t\t\t\t\tclassName={ clsx( {\n\t\t\t\t\t\t'tools-panel-item-spacing': showSpacingPresetsControl,\n\t\t\t\t\t} ) }\n\t\t\t\t\tpanelId={ panelId }\n\t\t\t\t>\n\t\t\t\t\t{ ! showSpacingPresetsControl && (\n\t\t\t\t\t\t<BoxControl\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tvalues={ marginValues }\n\t\t\t\t\t\t\tonChange={ setMarginValues }\n\t\t\t\t\t\t\tinputProps={ inputProps }\n\t\t\t\t\t\t\tlabel={ __( 'Margin' ) }\n\t\t\t\t\t\t\tsides={ marginSides }\n\t\t\t\t\t\t\tunits={ units }\n\t\t\t\t\t\t\tallowReset={ false }\n\t\t\t\t\t\t\tsplitOnAxis={ isAxialMargin }\n\t\t\t\t\t\t\tonMouseOver={ onMouseOverMargin }\n\t\t\t\t\t\t\tonMouseOut={ onMouseLeaveControls }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ showSpacingPresetsControl && (\n\t\t\t\t\t\t<SpacingSizesControl\n\t\t\t\t\t\t\tvalues={ marginValues }\n\t\t\t\t\t\t\tonChange={ setMarginValues }\n\t\t\t\t\t\t\tminimumCustomValue={ -Infinity }\n\t\t\t\t\t\t\tlabel={ __( 'Margin' ) }\n\t\t\t\t\t\t\tsides={ marginSides }\n\t\t\t\t\t\t\tunits={ units }\n\t\t\t\t\t\t\tallowReset={ false }\n\t\t\t\t\t\t\tonMouseOver={ onMouseOverMargin }\n\t\t\t\t\t\t\tonMouseOut={ onMouseLeaveControls }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</ToolsPanelItem>\n\t\t\t) }\n\t\t\t{ showGapControl && (\n\t\t\t\t<ToolsPanelItem\n\t\t\t\t\thasValue={ hasGapValue }\n\t\t\t\t\tlabel={ __( 'Block spacing' ) }\n\t\t\t\t\tonDeselect={ resetGapValue }\n\t\t\t\t\tisShownByDefault={\n\t\t\t\t\t\tdefaultControls.blockGap ?? DEFAULT_CONTROLS.blockGap\n\t\t\t\t\t}\n\t\t\t\t\tclassName={ clsx( {\n\t\t\t\t\t\t'tools-panel-item-spacing': showSpacingPresetsControl,\n\t\t\t\t\t\t'single-column':\n\t\t\t\t\t\t\t// If UnitControl is used, should be single-column.\n\t\t\t\t\t\t\t! showSpacingPresetsControl && ! isAxialGap,\n\t\t\t\t\t} ) }\n\t\t\t\t\tpanelId={ panelId }\n\t\t\t\t>\n\t\t\t\t\t{ ! showSpacingPresetsControl &&\n\t\t\t\t\t\t( isAxialGap ? (\n\t\t\t\t\t\t\t<BoxControl\n\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\tlabel={ __( 'Block spacing' ) }\n\t\t\t\t\t\t\t\tmin={ 0 }\n\t\t\t\t\t\t\t\tonChange={ setGapValues }\n\t\t\t\t\t\t\t\tunits={ units }\n\t\t\t\t\t\t\t\tsides={ gapSides }\n\t\t\t\t\t\t\t\tvalues={ gapValues }\n\t\t\t\t\t\t\t\tallowReset={ false }\n\t\t\t\t\t\t\t\tsplitOnAxis={ isAxialGap }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<UnitControl\n\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\tlabel={ __( 'Block spacing' ) }\n\t\t\t\t\t\t\t\tmin={ 0 }\n\t\t\t\t\t\t\t\tonChange={ setGapValue }\n\t\t\t\t\t\t\t\tunits={ units }\n\t\t\t\t\t\t\t\tvalue={ gapValue }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) ) }\n\t\t\t\t\t{ showSpacingPresetsControl && (\n\t\t\t\t\t\t<SpacingSizesControl\n\t\t\t\t\t\t\tlabel={ __( 'Block spacing' ) }\n\t\t\t\t\t\t\tmin={ 0 }\n\t\t\t\t\t\t\tonChange={ setGapValues }\n\t\t\t\t\t\t\tshowSideInLabel={ false }\n\t\t\t\t\t\t\tsides={ isAxialGap ? gapSides : [ 'top' ] } // Use 'top' as the shorthand property in non-axial configurations.\n\t\t\t\t\t\t\tvalues={ gapValues }\n\t\t\t\t\t\t\tallowReset={ false }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</ToolsPanelItem>\n\t\t\t) }\n\t\t\t{ showChildLayoutControl && (\n\t\t\t\t<ChildLayoutControl\n\t\t\t\t\tvalue={ childLayout }\n\t\t\t\t\tonChange={ setChildLayout }\n\t\t\t\t\tparentLayout={ settings?.parentLayout }\n\t\t\t\t\tpanelId={ panelId }\n\t\t\t\t\tisShownByDefault={\n\t\t\t\t\t\tdefaultControls.childLayout ??\n\t\t\t\t\t\tDEFAULT_CONTROLS.childLayout\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ showMinHeightControl && (\n\t\t\t\t<ToolsPanelItem\n\t\t\t\t\thasValue={ hasMinHeightValue }\n\t\t\t\t\tlabel={ __( 'Minimum height' ) }\n\t\t\t\t\tonDeselect={ resetMinHeightValue }\n\t\t\t\t\tisShownByDefault={\n\t\t\t\t\t\tdefaultControls.minHeight ?? DEFAULT_CONTROLS.minHeight\n\t\t\t\t\t}\n\t\t\t\t\tpanelId={ panelId }\n\t\t\t\t>\n\t\t\t\t\t<HeightControl\n\t\t\t\t\t\tlabel={ __( 'Minimum height' ) }\n\t\t\t\t\t\tvalue={ minHeightValue }\n\t\t\t\t\t\tonChange={ setMinHeightValue }\n\t\t\t\t\t/>\n\t\t\t\t</ToolsPanelItem>\n\t\t\t) }\n\t\t\t{ showAspectRatioControl && (\n\t\t\t\t<AspectRatioTool\n\t\t\t\t\thasValue={ hasAspectRatioValue }\n\t\t\t\t\tvalue={ aspectRatioValue }\n\t\t\t\t\tonChange={ setAspectRatioValue }\n\t\t\t\t\tpanelId={ panelId }\n\t\t\t\t\tisShownByDefault={\n\t\t\t\t\t\tdefaultControls.aspectRatio ??\n\t\t\t\t\t\tDEFAULT_CONTROLS.aspectRatio\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t) }\n\t\t</Wrapper>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SACCC,wBAAwB,IAAIC,UAAU,EACtCC,4BAA4B,IAAIC,cAAc,EAC9CC,UAAU,EACVC,yBAAyB,IAAIC,WAAW,EACxCC,4BAA4B,IAAIC,cAAc,EAC9CC,uCAAuC,IAAIC,yBAAyB,QAC9D,uBAAuB;AAC9B,SAASC,IAAI,EAAEC,SAAS,EAAEC,WAAW,QAAQ,kBAAkB;AAC/D,SAASC,WAAW,EAAEC,QAAQ,EAAEC,QAAQ,QAAQ,oBAAoB;;AAEpE;AACA;AACA;A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AChC0M,UAAU,EAAGvB,mBAAqB;MAClCwB,gBAAgB,GAAA5F,qBAAA,GACfT,eAAe,CAAC5C,SAAS,cAAAqD,qBAAA,cAAAA,qBAAA,GAAIf,gBAAgB,CAACtC,SAC9C;MACDgC,OAAO,EAAGA,OAAS;MAAAC,QAAA,eAEnBhE,IAAA,CAACN,aAAa;QACb0E,KAAK,EAAG/F,EAAE,CAAE,gBAAiB,CAAG;QAChCqF,KAAK,EAAG2F,cAAgB;QACxBvF,QAAQ,EAAGwF;MAAmB,CAC9B;IAAC,CACa,CAChB,EACCI,sBAAsB,iBACvB1J,IAAA,CAACJ,eAAe;MACfkL,QAAQ,EAAGjB,mBAAqB;MAChCnG,KAAK,EAAGiG,gBAAkB;MAC1B7F,QAAQ,EAAG8F,mBAAqB;MAChC7F,OAAO,EAAGA,OAAS;MACnBiH,gBAAgB,GAAA3F,qBAAA,GACfV,eAAe,CAAC3C,WAAW,cAAAqD,qBAAA,cAAAA,qBAAA,GAC3BhB,gBAAgB,CAACrC;IACjB,CACD,CACD;EAAA,CACO,CAAC;AAEZ","ignoreList":[]}
@@ -15,8 +15,7 @@ import { useCallback, useMemo } from '@wordpress/element';
15
15
  */
16
16
  import { getValueFromVariable, useToolsPanelDropdownMenuProps } from './utils';
17
17
  import { setImmutably } from '../../utils/object';
18
- import { jsx as _jsx } from "react/jsx-runtime";
19
- import { jsxs as _jsxs } from "react/jsx-runtime";
18
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
20
19
  const EMPTY_ARRAY = [];
21
20
  function useMultiOriginColorPresets(settings, {
22
21
  presetSetting,
@@ -1 +1 @@
1
- {"version":3,"names":["clsx","__experimentalToolsPanel","ToolsPanel","__experimentalToolsPanelItem","ToolsPanelItem","__experimentalItemGroup","ItemGroup","__experimentalHStack","HStack","__experimentalZStack","ZStack","__experimentalDropdownContentWrapper","DropdownContentWrapper","Button","MenuGroup","ColorIndicator","DuotonePicker","DuotoneSwatch","Dropdown","Flex","FlexItem","__","_x","useCallback","useMemo","getValueFromVariable","useToolsPanelDropdownMenuProps","setImmutably","jsx","_jsx","jsxs","_jsxs","EMPTY_ARRAY","useMultiOriginColorPresets","settings","presetSetting","defaultSetting","disableDefault","color","userPresets","custom","themePresets","theme","defaultPresets","default","useHasFiltersPanel","useHasDuotoneControl","customDuotone","defaultDuotone","duotone","length","FiltersToolsPanel","resetAllFilter","onChange","value","panelId","children","dropdownMenuProps","resetAll","updatedValue","label","DEFAULT_CONTROLS","popoverProps","placement","offset","shift","className","headerTitle","LabeledColorIndicator","indicator","justify","isLayered","expanded","values","title","FiltersPanel","as","Wrapper","inheritedValue","defaultControls","decodeValue","rawValue","hasDuotoneEnabled","duotonePalette","colorPalette","filter","setDuotone","newValue","duotonePreset","find","colors","settedValue","slug","hasDuotone","resetDuotone","undefined","previousValue","hasValue","onDeselect","isShownByDefault","renderToggle","onToggle","isOpen","toggleProps","onClick","isBordered","isSeparated","__next40pxDefaultSize","renderContent","paddingSize","disableCustomColors","disableCustomDuotone"],"sources":["@wordpress/block-editor/src/components/global-styles/filters-panel.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalToolsPanel as ToolsPanel,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n\t__experimentalItemGroup as ItemGroup,\n\t__experimentalHStack as HStack,\n\t__experimentalZStack as ZStack,\n\t__experimentalDropdownContentWrapper as DropdownContentWrapper,\n\tButton,\n\tMenuGroup,\n\tColorIndicator,\n\tDuotonePicker,\n\tDuotoneSwatch,\n\tDropdown,\n\tFlex,\n\tFlexItem,\n} from '@wordpress/components';\nimport { __, _x } from '@wordpress/i18n';\nimport { useCallback, useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { getValueFromVariable, useToolsPanelDropdownMenuProps } from './utils';\nimport { setImmutably } from '../../utils/object';\n\nconst EMPTY_ARRAY = [];\nfunction useMultiOriginColorPresets(\n\tsettings,\n\t{ presetSetting, defaultSetting }\n) {\n\tconst disableDefault = ! settings?.color?.[ defaultSetting ];\n\tconst userPresets =\n\t\tsettings?.color?.[ presetSetting ]?.custom || EMPTY_ARRAY;\n\tconst themePresets =\n\t\tsettings?.color?.[ presetSetting ]?.theme || EMPTY_ARRAY;\n\tconst defaultPresets =\n\t\tsettings?.color?.[ presetSetting ]?.default || EMPTY_ARRAY;\n\treturn useMemo(\n\t\t() => [\n\t\t\t...userPresets,\n\t\t\t...themePresets,\n\t\t\t...( disableDefault ? EMPTY_ARRAY : defaultPresets ),\n\t\t],\n\t\t[ disableDefault, userPresets, themePresets, defaultPresets ]\n\t);\n}\n\nexport function useHasFiltersPanel( settings ) {\n\treturn useHasDuotoneControl( settings );\n}\n\nfunction useHasDuotoneControl( settings ) {\n\treturn (\n\t\tsettings.color.customDuotone ||\n\t\tsettings.color.defaultDuotone ||\n\t\tsettings.color.duotone.length > 0\n\t);\n}\n\nfunction FiltersToolsPanel( {\n\tresetAllFilter,\n\tonChange,\n\tvalue,\n\tpanelId,\n\tchildren,\n} ) {\n\tconst dropdownMenuProps = useToolsPanelDropdownMenuProps();\n\tconst resetAll = () => {\n\t\tconst updatedValue = resetAllFilter( value );\n\t\tonChange( updatedValue );\n\t};\n\n\treturn (\n\t\t<ToolsPanel\n\t\t\tlabel={ _x( 'Filters', 'Name for applying graphical effects' ) }\n\t\t\tresetAll={ resetAll }\n\t\t\tpanelId={ panelId }\n\t\t\tdropdownMenuProps={ dropdownMenuProps }\n\t\t>\n\t\t\t{ children }\n\t\t</ToolsPanel>\n\t);\n}\n\nconst DEFAULT_CONTROLS = {\n\tduotone: true,\n};\n\nconst popoverProps = {\n\tplacement: 'left-start',\n\toffset: 36,\n\tshift: true,\n\tclassName: 'block-editor-duotone-control__popover',\n\theaderTitle: __( 'Duotone' ),\n};\n\nconst LabeledColorIndicator = ( { indicator, label } ) => (\n\t<HStack justify=\"flex-start\">\n\t\t<ZStack isLayered={ false } offset={ -8 }>\n\t\t\t<Flex expanded={ false }>\n\t\t\t\t{ indicator === 'unset' || ! indicator ? (\n\t\t\t\t\t<ColorIndicator className=\"block-editor-duotone-control__unset-indicator\" />\n\t\t\t\t) : (\n\t\t\t\t\t<DuotoneSwatch values={ indicator } />\n\t\t\t\t) }\n\t\t\t</Flex>\n\t\t</ZStack>\n\t\t<FlexItem title={ label }>{ label }</FlexItem>\n\t</HStack>\n);\n\nexport default function FiltersPanel( {\n\tas: Wrapper = FiltersToolsPanel,\n\tvalue,\n\tonChange,\n\tinheritedValue = value,\n\tsettings,\n\tpanelId,\n\tdefaultControls = DEFAULT_CONTROLS,\n} ) {\n\tconst decodeValue = ( rawValue ) =>\n\t\tgetValueFromVariable( { settings }, '', rawValue );\n\n\t// Duotone\n\tconst hasDuotoneEnabled = useHasDuotoneControl( settings );\n\tconst duotonePalette = useMultiOriginColorPresets( settings, {\n\t\tpresetSetting: 'duotone',\n\t\tdefaultSetting: 'defaultDuotone',\n\t} );\n\tconst colorPalette = useMultiOriginColorPresets( settings, {\n\t\tpresetSetting: 'palette',\n\t\tdefaultSetting: 'defaultPalette',\n\t} );\n\tconst duotone = decodeValue( inheritedValue?.filter?.duotone );\n\tconst setDuotone = ( newValue ) => {\n\t\tconst duotonePreset = duotonePalette.find( ( { colors } ) => {\n\t\t\treturn colors === newValue;\n\t\t} );\n\t\tconst settedValue = duotonePreset\n\t\t\t? `var:preset|duotone|${ duotonePreset.slug }`\n\t\t\t: newValue;\n\t\tonChange( setImmutably( value, [ 'filter', 'duotone' ], settedValue ) );\n\t};\n\tconst hasDuotone = () => !! value?.filter?.duotone;\n\tconst resetDuotone = () => setDuotone( undefined );\n\n\tconst resetAllFilter = useCallback( ( previousValue ) => {\n\t\treturn {\n\t\t\t...previousValue,\n\t\t\tfilter: {\n\t\t\t\t...previousValue.filter,\n\t\t\t\tduotone: undefined,\n\t\t\t},\n\t\t};\n\t}, [] );\n\n\treturn (\n\t\t<Wrapper\n\t\t\tresetAllFilter={ resetAllFilter }\n\t\t\tvalue={ value }\n\t\t\tonChange={ onChange }\n\t\t\tpanelId={ panelId }\n\t\t>\n\t\t\t{ hasDuotoneEnabled && (\n\t\t\t\t<ToolsPanelItem\n\t\t\t\t\tlabel={ __( 'Duotone' ) }\n\t\t\t\t\thasValue={ hasDuotone }\n\t\t\t\t\tonDeselect={ resetDuotone }\n\t\t\t\t\tisShownByDefault={ defaultControls.duotone }\n\t\t\t\t\tpanelId={ panelId }\n\t\t\t\t>\n\t\t\t\t\t<Dropdown\n\t\t\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\t\t\tclassName=\"block-editor-global-styles-filters-panel__dropdown\"\n\t\t\t\t\t\trenderToggle={ ( { onToggle, isOpen } ) => {\n\t\t\t\t\t\t\tconst toggleProps = {\n\t\t\t\t\t\t\t\tonClick: onToggle,\n\t\t\t\t\t\t\t\tclassName: clsx( { 'is-open': isOpen } ),\n\t\t\t\t\t\t\t\t'aria-expanded': isOpen,\n\t\t\t\t\t\t\t};\n\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<ItemGroup isBordered isSeparated>\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\t\t\t{ ...toggleProps }\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<LabeledColorIndicator\n\t\t\t\t\t\t\t\t\t\t\tindicator={ duotone }\n\t\t\t\t\t\t\t\t\t\t\tlabel={ __( 'Duotone' ) }\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t</ItemGroup>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} }\n\t\t\t\t\t\trenderContent={ () => (\n\t\t\t\t\t\t\t<DropdownContentWrapper paddingSize=\"small\">\n\t\t\t\t\t\t\t\t<MenuGroup label={ __( 'Duotone' ) }>\n\t\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t\t'Create a two-tone color effect without losing your original image.'\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t<DuotonePicker\n\t\t\t\t\t\t\t\t\t\tcolorPalette={ colorPalette }\n\t\t\t\t\t\t\t\t\t\tduotonePalette={ duotonePalette }\n\t\t\t\t\t\t\t\t\t\t// TODO: Re-enable both when custom colors are supported for block-level styles.\n\t\t\t\t\t\t\t\t\t\tdisableCustomColors\n\t\t\t\t\t\t\t\t\t\tdisableCustomDuotone\n\t\t\t\t\t\t\t\t\t\tvalue={ duotone }\n\t\t\t\t\t\t\t\t\t\tonChange={ setDuotone }\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t\t\t</DropdownContentWrapper>\n\t\t\t\t\t\t) }\n\t\t\t\t\t/>\n\t\t\t\t</ToolsPanelItem>\n\t\t\t) }\n\t\t</Wrapper>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SACCC,wBAAwB,IAAIC,UAAU,EACtCC,4BAA4B,IAAIC,cAAc,EAC9CC,uBAAuB,IAAIC,SAAS,EACpCC,oBAAoB,IAAIC,MAAM,EAC9BC,oBAAoB,IAAIC,MAAM,EAC9BC,oCAAoC,IAAIC,sBAAsB,EAC9DC,MAAM,EACNC,SAAS,EACTC,cAAc,EACdC,aAAa,EACbC,aAAa,EACbC,QAAQ,EACRC,IAAI,EACJC,QAAQ,QACF,uBAAuB;AAC9B,SAASC,EAAE,EAAEC,EAAE,QAAQ,iBAAiB;AACxC,SAASC,WAAW,EAAEC,OAAO,QAAQ,oBAAoB;;AAEzD;AACA;AACA;AACA,SAASC,oBAAoB,EAAEC,8BAA8B,QAAQ,SAAS;AAC9E,SAASC,YAAY,QAAQ,oBAAoB;AAAC,SAAAC,GA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jB,SAAS;YAAC8C,KAAK,EAAGvC,EAAE,CAAE,SAAU,CAAG;YAAAmC,QAAA,gBACnC3B,IAAA;cAAA2B,QAAA,EACGnC,EAAE,CACH,oEACD;YAAC,CACC,CAAC,eACJQ,IAAA,CAACb,aAAa;cACboE,YAAY,EAAGA,YAAc;cAC7BD,cAAc,EAAGA;cACjB;cAAA;cACA2B,mBAAmB;cACnBC,oBAAoB;cACpBzD,KAAK,EAAGL,OAAS;cACjBI,QAAQ,EAAGiC;YAAY,CACvB,CAAC;UAAA,CACQ;QAAC,CACW;MACtB,CACH;IAAC,CACa;EAChB,CACO,CAAC;AAEZ","ignoreList":[]}
1
+ {"version":3,"names":["clsx","__experimentalToolsPanel","ToolsPanel","__experimentalToolsPanelItem","ToolsPanelItem","__experimentalItemGroup","ItemGroup","__experimentalHStack","HStack","__experimentalZStack","ZStack","__experimentalDropdownContentWrapper","DropdownContentWrapper","Button","MenuGroup","ColorIndicator","DuotonePicker","DuotoneSwatch","Dropdown","Flex","FlexItem","__","_x","useCallback","useMemo","getValueFromVariable","useToolsPanelDropdownMenuProps","setImmutably","jsx","_jsx","jsxs","_jsxs","EMPTY_ARRAY","useMultiOriginColorPresets","settings","presetSetting","defaultSetting","disableDefault","color","userPresets","custom","themePresets","theme","defaultPresets","default","useHasFiltersPanel","useHasDuotoneControl","customDuotone","defaultDuotone","duotone","length","FiltersToolsPanel","resetAllFilter","onChange","value","panelId","children","dropdownMenuProps","resetAll","updatedValue","label","DEFAULT_CONTROLS","popoverProps","placement","offset","shift","className","headerTitle","LabeledColorIndicator","indicator","justify","isLayered","expanded","values","title","FiltersPanel","as","Wrapper","inheritedValue","defaultControls","decodeValue","rawValue","hasDuotoneEnabled","duotonePalette","colorPalette","filter","setDuotone","newValue","duotonePreset","find","colors","settedValue","slug","hasDuotone","resetDuotone","undefined","previousValue","hasValue","onDeselect","isShownByDefault","renderToggle","onToggle","isOpen","toggleProps","onClick","isBordered","isSeparated","__next40pxDefaultSize","renderContent","paddingSize","disableCustomColors","disableCustomDuotone"],"sources":["@wordpress/block-editor/src/components/global-styles/filters-panel.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalToolsPanel as ToolsPanel,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n\t__experimentalItemGroup as ItemGroup,\n\t__experimentalHStack as HStack,\n\t__experimentalZStack as ZStack,\n\t__experimentalDropdownContentWrapper as DropdownContentWrapper,\n\tButton,\n\tMenuGroup,\n\tColorIndicator,\n\tDuotonePicker,\n\tDuotoneSwatch,\n\tDropdown,\n\tFlex,\n\tFlexItem,\n} from '@wordpress/components';\nimport { __, _x } from '@wordpress/i18n';\nimport { useCallback, useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { getValueFromVariable, useToolsPanelDropdownMenuProps } from './utils';\nimport { setImmutably } from '../../utils/object';\n\nconst EMPTY_ARRAY = [];\nfunction useMultiOriginColorPresets(\n\tsettings,\n\t{ presetSetting, defaultSetting }\n) {\n\tconst disableDefault = ! settings?.color?.[ defaultSetting ];\n\tconst userPresets =\n\t\tsettings?.color?.[ presetSetting ]?.custom || EMPTY_ARRAY;\n\tconst themePresets =\n\t\tsettings?.color?.[ presetSetting ]?.theme || EMPTY_ARRAY;\n\tconst defaultPresets =\n\t\tsettings?.color?.[ presetSetting ]?.default || EMPTY_ARRAY;\n\treturn useMemo(\n\t\t() => [\n\t\t\t...userPresets,\n\t\t\t...themePresets,\n\t\t\t...( disableDefault ? EMPTY_ARRAY : defaultPresets ),\n\t\t],\n\t\t[ disableDefault, userPresets, themePresets, defaultPresets ]\n\t);\n}\n\nexport function useHasFiltersPanel( settings ) {\n\treturn useHasDuotoneControl( settings );\n}\n\nfunction useHasDuotoneControl( settings ) {\n\treturn (\n\t\tsettings.color.customDuotone ||\n\t\tsettings.color.defaultDuotone ||\n\t\tsettings.color.duotone.length > 0\n\t);\n}\n\nfunction FiltersToolsPanel( {\n\tresetAllFilter,\n\tonChange,\n\tvalue,\n\tpanelId,\n\tchildren,\n} ) {\n\tconst dropdownMenuProps = useToolsPanelDropdownMenuProps();\n\tconst resetAll = () => {\n\t\tconst updatedValue = resetAllFilter( value );\n\t\tonChange( updatedValue );\n\t};\n\n\treturn (\n\t\t<ToolsPanel\n\t\t\tlabel={ _x( 'Filters', 'Name for applying graphical effects' ) }\n\t\t\tresetAll={ resetAll }\n\t\t\tpanelId={ panelId }\n\t\t\tdropdownMenuProps={ dropdownMenuProps }\n\t\t>\n\t\t\t{ children }\n\t\t</ToolsPanel>\n\t);\n}\n\nconst DEFAULT_CONTROLS = {\n\tduotone: true,\n};\n\nconst popoverProps = {\n\tplacement: 'left-start',\n\toffset: 36,\n\tshift: true,\n\tclassName: 'block-editor-duotone-control__popover',\n\theaderTitle: __( 'Duotone' ),\n};\n\nconst LabeledColorIndicator = ( { indicator, label } ) => (\n\t<HStack justify=\"flex-start\">\n\t\t<ZStack isLayered={ false } offset={ -8 }>\n\t\t\t<Flex expanded={ false }>\n\t\t\t\t{ indicator === 'unset' || ! indicator ? (\n\t\t\t\t\t<ColorIndicator className=\"block-editor-duotone-control__unset-indicator\" />\n\t\t\t\t) : (\n\t\t\t\t\t<DuotoneSwatch values={ indicator } />\n\t\t\t\t) }\n\t\t\t</Flex>\n\t\t</ZStack>\n\t\t<FlexItem title={ label }>{ label }</FlexItem>\n\t</HStack>\n);\n\nexport default function FiltersPanel( {\n\tas: Wrapper = FiltersToolsPanel,\n\tvalue,\n\tonChange,\n\tinheritedValue = value,\n\tsettings,\n\tpanelId,\n\tdefaultControls = DEFAULT_CONTROLS,\n} ) {\n\tconst decodeValue = ( rawValue ) =>\n\t\tgetValueFromVariable( { settings }, '', rawValue );\n\n\t// Duotone\n\tconst hasDuotoneEnabled = useHasDuotoneControl( settings );\n\tconst duotonePalette = useMultiOriginColorPresets( settings, {\n\t\tpresetSetting: 'duotone',\n\t\tdefaultSetting: 'defaultDuotone',\n\t} );\n\tconst colorPalette = useMultiOriginColorPresets( settings, {\n\t\tpresetSetting: 'palette',\n\t\tdefaultSetting: 'defaultPalette',\n\t} );\n\tconst duotone = decodeValue( inheritedValue?.filter?.duotone );\n\tconst setDuotone = ( newValue ) => {\n\t\tconst duotonePreset = duotonePalette.find( ( { colors } ) => {\n\t\t\treturn colors === newValue;\n\t\t} );\n\t\tconst settedValue = duotonePreset\n\t\t\t? `var:preset|duotone|${ duotonePreset.slug }`\n\t\t\t: newValue;\n\t\tonChange( setImmutably( value, [ 'filter', 'duotone' ], settedValue ) );\n\t};\n\tconst hasDuotone = () => !! value?.filter?.duotone;\n\tconst resetDuotone = () => setDuotone( undefined );\n\n\tconst resetAllFilter = useCallback( ( previousValue ) => {\n\t\treturn {\n\t\t\t...previousValue,\n\t\t\tfilter: {\n\t\t\t\t...previousValue.filter,\n\t\t\t\tduotone: undefined,\n\t\t\t},\n\t\t};\n\t}, [] );\n\n\treturn (\n\t\t<Wrapper\n\t\t\tresetAllFilter={ resetAllFilter }\n\t\t\tvalue={ value }\n\t\t\tonChange={ onChange }\n\t\t\tpanelId={ panelId }\n\t\t>\n\t\t\t{ hasDuotoneEnabled && (\n\t\t\t\t<ToolsPanelItem\n\t\t\t\t\tlabel={ __( 'Duotone' ) }\n\t\t\t\t\thasValue={ hasDuotone }\n\t\t\t\t\tonDeselect={ resetDuotone }\n\t\t\t\t\tisShownByDefault={ defaultControls.duotone }\n\t\t\t\t\tpanelId={ panelId }\n\t\t\t\t>\n\t\t\t\t\t<Dropdown\n\t\t\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\t\t\tclassName=\"block-editor-global-styles-filters-panel__dropdown\"\n\t\t\t\t\t\trenderToggle={ ( { onToggle, isOpen } ) => {\n\t\t\t\t\t\t\tconst toggleProps = {\n\t\t\t\t\t\t\t\tonClick: onToggle,\n\t\t\t\t\t\t\t\tclassName: clsx( { 'is-open': isOpen } ),\n\t\t\t\t\t\t\t\t'aria-expanded': isOpen,\n\t\t\t\t\t\t\t};\n\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<ItemGroup isBordered isSeparated>\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\t\t\t{ ...toggleProps }\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<LabeledColorIndicator\n\t\t\t\t\t\t\t\t\t\t\tindicator={ duotone }\n\t\t\t\t\t\t\t\t\t\t\tlabel={ __( 'Duotone' ) }\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t</ItemGroup>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} }\n\t\t\t\t\t\trenderContent={ () => (\n\t\t\t\t\t\t\t<DropdownContentWrapper paddingSize=\"small\">\n\t\t\t\t\t\t\t\t<MenuGroup label={ __( 'Duotone' ) }>\n\t\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t\t'Create a two-tone color effect without losing your original image.'\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t<DuotonePicker\n\t\t\t\t\t\t\t\t\t\tcolorPalette={ colorPalette }\n\t\t\t\t\t\t\t\t\t\tduotonePalette={ duotonePalette }\n\t\t\t\t\t\t\t\t\t\t// TODO: Re-enable both when custom colors are supported for block-level styles.\n\t\t\t\t\t\t\t\t\t\tdisableCustomColors\n\t\t\t\t\t\t\t\t\t\tdisableCustomDuotone\n\t\t\t\t\t\t\t\t\t\tvalue={ duotone }\n\t\t\t\t\t\t\t\t\t\tonChange={ setDuotone }\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t\t\t</DropdownContentWrapper>\n\t\t\t\t\t\t) }\n\t\t\t\t\t/>\n\t\t\t\t</Tools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A,CAAE;UAAEC,QAAQ;UAAEC;QAAO,CAAC,KAAM;UAC1C,MAAMC,WAAW,GAAG;YACnBC,OAAO,EAAEH,QAAQ;YACjBnC,SAAS,EAAElE,IAAI,CAAE;cAAE,SAAS,EAAEsG;YAAO,CAAE,CAAC;YACxC,eAAe,EAAEA;UAClB,CAAC;UAED,oBACCzE,IAAA,CAACvB,SAAS;YAACmG,UAAU;YAACC,WAAW;YAAAlD,QAAA,eAChC3B,IAAA,CAAChB,MAAM;cACN8F,qBAAqB;cAAA,GAChBJ,WAAW;cAAA/C,QAAA,eAEhB3B,IAAA,CAACuC,qBAAqB;gBACrBC,SAAS,EAAGpB,OAAS;gBACrBW,KAAK,EAAGvC,EAAE,CAAE,SAAU;cAAG,CACzB;YAAC,CACK;UAAC,CACC,CAAC;QAEd,CAAG;QACHuF,aAAa,EAAGA,CAAA,kBACf/E,IAAA,CAACjB,sBAAsB;UAACiG,WAAW,EAAC,OAAO;UAAArD,QAAA,eAC1CzB,KAAA,CAACjB,SAAS;YAAC8C,KAAK,EAAGvC,EAAE,CAAE,SAAU,CAAG;YAAAmC,QAAA,gBACnC3B,IAAA;cAAA2B,QAAA,EACGnC,EAAE,CACH,oEACD;YAAC,CACC,CAAC,eACJQ,IAAA,CAACb,aAAa;cACboE,YAAY,EAAGA,YAAc;cAC7BD,cAAc,EAAGA;cACjB;cAAA;cACA2B,mBAAmB;cACnBC,oBAAoB;cACpBzD,KAAK,EAAGL,OAAS;cACjBI,QAAQ,EAAGiC;YAAY,CACvB,CAAC;UAAA,CACQ;QAAC,CACW;MACtB,CACH;IAAC,CACa;EAChB,CACO,CAAC;AAEZ","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["scopeSelector","getValueFromObjectPath","getBlockCSSSelector","blockType","target","options","fallback","name","selectors","supports","hasSelectors","Object","keys","length","path","Array","isArray","join","rootSelector","root","__experimentalSelector","replace","pathArray","split","fallbackSelector","featureSelector","subfeatureSelector"],"sources":["@wordpress/block-editor/src/components/global-styles/get-block-css-selector.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport { scopeSelector } from './utils';\nimport { getValueFromObjectPath } from '../../utils/object';\n\n/**\n * Determine the CSS selector for the block type and target provided, returning\n * it if available.\n *\n * @param {import('@wordpress/blocks').Block} blockType The block's type.\n * @param {string|string[]} target The desired selector's target e.g. `root`, delimited string, or array path.\n * @param {Object} options Options object.\n * @param {boolean} options.fallback Whether or not to fallback to broader selector.\n *\n * @return {?string} The CSS selector or `null` if no selector available.\n */\nexport function getBlockCSSSelector(\n\tblockType,\n\ttarget = 'root',\n\toptions = {}\n) {\n\tif ( ! target ) {\n\t\treturn null;\n\t}\n\n\tconst { fallback = false } = options;\n\tconst { name, selectors, supports } = blockType;\n\n\tconst hasSelectors = selectors && Object.keys( selectors ).length > 0;\n\tconst path = Array.isArray( target ) ? target.join( '.' ) : target;\n\n\t// Root selector.\n\n\t// Calculated before returning as it can be used as a fallback for feature\n\t// selectors later on.\n\tlet rootSelector = null;\n\n\tif ( hasSelectors && selectors.root ) {\n\t\t// Use the selectors API if available.\n\t\trootSelector = selectors?.root;\n\t} else if ( supports?.__experimentalSelector ) {\n\t\t// Use the old experimental selector supports property if set.\n\t\trootSelector = supports.__experimentalSelector;\n\t} else {\n\t\t// If no root selector found, generate default block class selector.\n\t\trootSelector =\n\t\t\t'.wp-block-' + name.replace( 'core/', '' ).replace( '/', '-' );\n\t}\n\n\t// Return selector if it's the root target we are looking for.\n\tif ( path === 'root' ) {\n\t\treturn rootSelector;\n\t}\n\n\t// If target is not `root` or `duotone` we have a feature or subfeature\n\t// as the target. If the target is a string convert to an array.\n\tconst pathArray = Array.isArray( target ) ? target : target.split( '.' );\n\n\t// Feature selectors ( may fallback to root selector );\n\tif ( pathArray.length === 1 ) {\n\t\tconst fallbackSelector = fallback ? rootSelector : null;\n\n\t\t// Prefer the selectors API if available.\n\t\tif ( hasSelectors ) {\n\t\t\t// Get selector from either `feature.root` or shorthand path.\n\t\t\tconst featureSelector =\n\t\t\t\tgetValueFromObjectPath( selectors, `${ path }.root`, null ) ||\n\t\t\t\tgetValueFromObjectPath( selectors, path, null );\n\n\t\t\t// Return feature selector if found or any available fallback.\n\t\t\treturn featureSelector || fallbackSelector;\n\t\t}\n\n\t\t// Try getting old experimental supports selector value.\n\t\tconst featureSelector = getValueFromObjectPath(\n\t\t\tsupports,\n\t\t\t`${ path }.__experimentalSelector`,\n\t\t\tnull\n\t\t);\n\n\t\t// If nothing to work with, provide fallback selector if available.\n\t\tif ( ! featureSelector ) {\n\t\t\treturn fallbackSelector;\n\t\t}\n\n\t\t// Scope the feature selector by the block's root selector.\n\t\treturn scopeSelector( rootSelector, featureSelector );\n\t}\n\n\t// Subfeature selector.\n\t// This may fallback either to parent feature or root selector.\n\tlet subfeatureSelector;\n\n\t// Use selectors API if available.\n\tif ( hasSelectors ) {\n\t\tsubfeatureSelector = getValueFromObjectPath( selectors, path, null );\n\t}\n\n\t// Only return if we have a subfeature selector.\n\tif ( subfeatureSelector ) {\n\t\treturn subfeatureSelector;\n\t}\n\n\t// To this point we don't have a subfeature selector. If a fallback has been\n\t// requested, remove subfeature from target path and return results of a\n\t// call for the parent feature's selector.\n\tif ( fallback ) {\n\t\treturn getBlockCSSSelector( blockType, pathArray[ 0 ], options );\n\t}\n\n\t// We tried.\n\treturn null;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,aAAa,QAAQ,SAAS;AACvC,SAASC,sBAAsB,QAAQ,oBAAoB;;AAE3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,mBAAmBA,CAClCC,SAAS,EACTC,MAAM,GAAG,MAAM,EACfC,OAAO,GAAG,CAAC,CAAC,EACX;EACD,IAAK,CAAED,MAAM,EAAG;IACf,OAAO,IAAI;EACZ;EAEA,MAAM;IAAEE,QAAQ,GAAG;EAAM,CAAC,GAAGD,OAAO;EACpC,MAAM;IAAEE,IAAI;IAAEC,SAAS;IAAEC;EAA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GAAGxB,sBAAsB,CAC7CQ,QAAQ,EACP,GAAGK,IAAM,yBAAwB,EAClC,IACD,CAAC;;IAED;IACA,IAAK,CAAEW,eAAe,EAAG;MACxB,OAAOD,gBAAgB;IACxB;;IAEA;IACA,OAAOxB,aAAa,CAAEkB,YAAY,EAAEO,eAAgB,CAAC;EACtD;;EAEA;EACA;EACA,IAAIC,kBAAkB;;EAEtB;EACA,IAAKhB,YAAY,EAAG;IACnBgB,kBAAkB,GAAGzB,sBAAsB,CAAEO,SAAS,EAAEM,IAAI,EAAE,IAAK,CAAC;EACrE;;EAEA;EACA,IAAKY,kBAAkB,EAAG;IACzB,OAAOA,kBAAkB;EAC1B;;EAEA;EACA;EACA;EACA,IAAKpB,QAAQ,EAAG;IACf,OAAOJ,mBAAmB,CAAEC,SAAS,EAAEmB,SAAS,CAAE,CAAC,CAAE,EAAEjB,OAAQ,CAAC;EACjE;;EAEA;EACA,OAAO,IAAI;AACZ","ignoreList":[]}
1
+ {"version":3,"names":["scopeSelector","getValueFromObjectPath","getBlockCSSSelector","blockType","target","options","fallback","name","selectors","supports","hasSelectors","Object","keys","length","path","Array","isArray","join","rootSelector","root","__experimentalSelector","replace","pathArray","split","fallbackSelector","featureSelector","subfeatureSelector"],"sources":["@wordpress/block-editor/src/components/global-styles/get-block-css-selector.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport { scopeSelector } from './utils';\nimport { getValueFromObjectPath } from '../../utils/object';\n\n/**\n * Determine the CSS selector for the block type and target provided, returning\n * it if available.\n *\n * @param {import('@wordpress/blocks').Block} blockType The block's type.\n * @param {string|string[]} target The desired selector's target e.g. `root`, delimited string, or array path.\n * @param {Object} options Options object.\n * @param {boolean} options.fallback Whether or not to fallback to broader selector.\n *\n * @return {?string} The CSS selector or `null` if no selector available.\n */\nexport function getBlockCSSSelector(\n\tblockType,\n\ttarget = 'root',\n\toptions = {}\n) {\n\tif ( ! target ) {\n\t\treturn null;\n\t}\n\n\tconst { fallback = false } = options;\n\tconst { name, selectors, supports } = blockType;\n\n\tconst hasSelectors = selectors && Object.keys( selectors ).length > 0;\n\tconst path = Array.isArray( target ) ? target.join( '.' ) : target;\n\n\t// Root selector.\n\n\t// Calculated before returning as it can be used as a fallback for feature\n\t// selectors later on.\n\tlet rootSelector = null;\n\n\tif ( hasSelectors && selectors.root ) {\n\t\t// Use the selectors API if available.\n\t\trootSelector = selectors?.root;\n\t} else if ( supports?.__experimentalSelector ) {\n\t\t// Use the old experimental selector supports property if set.\n\t\trootSelector = supports.__experimentalSelector;\n\t} else {\n\t\t// If no root selector found, generate default block class selector.\n\t\trootSelector =\n\t\t\t'.wp-block-' + name.replace( 'core/', '' ).replace( '/', '-' );\n\t}\n\n\t// Return selector if it's the root target we are looking for.\n\tif ( path === 'root' ) {\n\t\treturn rootSelector;\n\t}\n\n\t// If target is not `root` or `duotone` we have a feature or subfeature\n\t// as the target. If the target is a string convert to an array.\n\tconst pathArray = Array.isArray( target ) ? target : target.split( '.' );\n\n\t// Feature selectors ( may fallback to root selector );\n\tif ( pathArray.length === 1 ) {\n\t\tconst fallbackSelector = fallback ? rootSelector : null;\n\n\t\t// Prefer the selectors API if available.\n\t\tif ( hasSelectors ) {\n\t\t\t// Get selector from either `feature.root` or shorthand path.\n\t\t\tconst featureSelector =\n\t\t\t\tgetValueFromObjectPath( selectors, `${ path }.root`, null ) ||\n\t\t\t\tgetValueFromObjectPath( selectors, path, null );\n\n\t\t\t// Return feature selector if found or any available fallback.\n\t\t\treturn featureSelector || fallbackSelector;\n\t\t}\n\n\t\t// Try getting old experimental supports selector value.\n\t\tconst featureSelector = getValueFromObjectPath(\n\t\t\tsupports,\n\t\t\t`${ path }.__experimentalSelector`,\n\t\t\tnull\n\t\t);\n\n\t\t// If nothing to work with, provide fallback selector if available.\n\t\tif ( ! featureSelector ) {\n\t\t\treturn fallbackSelector;\n\t\t}\n\n\t\t// Scope the feature selector by the block's root selector.\n\t\treturn scopeSelector( rootSelector, featureSelector );\n\t}\n\n\t// Subfeature selector.\n\t// This may fallback either to parent feature or root selector.\n\tlet subfeatureSelector;\n\n\t// Use selectors API if available.\n\tif ( hasSelectors ) {\n\t\tsubfeatureSelector = getValueFromObjectPath( selectors, path, null );\n\t}\n\n\t// Only return if we have a subfeature selector.\n\tif ( subfeatureSelector ) {\n\t\treturn subfeatureSelector;\n\t}\n\n\t// To this point we don't have a subfeature selector. If a fallback has been\n\t// requested, remove subfeature from target path and return results of a\n\t// call for the parent feature's selector.\n\tif ( fallback ) {\n\t\treturn getBlockCSSSelector( blockType, pathArray[ 0 ], options );\n\t}\n\n\t// We tried.\n\treturn null;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,aAAa,QAAQ,SAAS;AACvC,SAASC,sBAAsB,QAAQ,oBAAoB;;AAE3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,mBAAmBA,CAClCC,SAAS,EACTC,MAAM,GAAG,MAAM,EACfC,OAAO,GAAG,CAAC,CAAC,EACX;EACD,IAAK,CAAED,MAAM,EAAG;IACf,OAAO,IAAI;EACZ;EAEA,MAAM;IAAEE,QAAQ,GAAG;EAAM,CAAC,GAAGD,OAAO;EACpC,MAAM;IAAEE,IAAI;IAAEC,SAAS;IAAEC;EAAS,CAAC,GAAGN,SAAS;EAE/C,MAAMO,YAAY,GAAGF,SAAS,IAAIG,MAAM,CAACC,IAAI,CAAEJ,SAAU,CAAC,CAACK,MAAM,GAAG,CAAC;EACrE,MAAMC,IAAI,GAAGC,KAAK,CAACC,OAAO,CAAEZ,MAAO,CAAC,GAAGA,MAAM,CAACa,IAAI,CAAE,GAAI,CAAC,GAAGb,MAAM;;EAElE;;EAEA;EACA;EACA,IAAIc,YAAY,GAAG,IAAI;EAEvB,IAAKR,YAAY,IAAIF,SAAS,CAACW,IAAI,EAAG;IACrC;IACAD,YAAY,GAAGV,SAAS,EAAEW,IAAI;EAC/B,CAAC,MAAM,IAAKV,QAAQ,EAAEW,sBAAsB,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A,IAAKpB,QAAQ,EAAG;IACf,OAAOJ,mBAAmB,CAAEC,SAAS,EAAEmB,SAAS,CAAE,CAAC,CAAE,EAAEjB,OAAQ,CAAC;EACjE;;EAEA;EACA,OAAO,IAAI;AACZ","ignoreList":[]}
@@ -1,3 +1,4 @@
1
+ /* wp:polyfill */
1
2
  /**
2
3
  * External dependencies
3
4
  */
@@ -181,7 +182,7 @@ export default function getGlobalStylesChanges(next, previous, options = {}) {
181
182
  return acc;
182
183
  }, {})).map(([key, changeValues]) => {
183
184
  const changeValuesLength = changeValues.length;
184
- const joinedChangesValue = changeValues.join( /* translators: Used between list items, there is a space after the comma. */
185
+ const joinedChangesValue = changeValues.join(/* translators: Used between list items, there is a space after the comma. */
185
186
  __(', ') // eslint-disable-line @wordpress/i18n-no-flanking-whitespace
186
187
  );
187
188
  switch (key) {
@@ -1 +1 @@
1
- {"version":3,"names":["memoize","__","_n","sprintf","getBlockTypes","globalStylesChangesCache","Map","EMPTY_ARRAY","translationMap","caption","link","button","heading","h1","h2","h3","h4","h5","h6","getBlockNames","reduce","accumulator","name","title","isObject","obj","getTranslation","key","keyArray","split","blockName","undefined","deepCompare","changedObject","originalObject","parentPath","slice","join","allKeys","Set","Object","keys","diffs","path","changedPath","concat","getGlobalStylesChangelist","next","previous","cacheKey","JSON","stringify","has","get","changedValueTree","styles","background","color","typography","spacing","blocks","elements","settings","length","set","result","acc","curr","translation","push","getGlobalStylesChanges","options","changeList","changesLength","maxResults","entries","group","includes","map","changeValues","changeValuesLength","joinedChangesValue"],"sources":["@wordpress/block-editor/src/components/global-styles/get-global-styles-changes.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport memoize from 'memize';\n\n/**\n * WordPress dependencies\n */\nimport { __, _n, sprintf } from '@wordpress/i18n';\nimport { getBlockTypes } from '@wordpress/blocks';\n\nconst globalStylesChangesCache = new Map();\nconst EMPTY_ARRAY = [];\nconst translationMap = {\n\tcaption: __( 'Caption' ),\n\tlink: __( 'Link' ),\n\tbutton: __( 'Button' ),\n\theading: __( 'Heading' ),\n\th1: __( 'H1' ),\n\th2: __( 'H2' ),\n\th3: __( 'H3' ),\n\th4: __( 'H4' ),\n\th5: __( 'H5' ),\n\th6: __( 'H6' ),\n\t'settings.color': __( 'Color' ),\n\t'settings.typography': __( 'Typography' ),\n\t'styles.color': __( 'Colors' ),\n\t'styles.spacing': __( 'Spacing' ),\n\t'styles.background': __( 'Background' ),\n\t'styles.typography': __( 'Typography' ),\n};\nconst getBlockNames = memoize( () =>\n\tgetBlockTypes().reduce( ( accumulator, { name, title } ) => {\n\t\taccumulator[ name ] = title;\n\t\treturn accumulator;\n\t}, {} )\n);\nconst isObject = ( obj ) => obj !== null && typeof obj === 'object';\n\n/**\n * Get the translation for a given global styles key.\n * @param {string} key A key representing a path to a global style property or setting.\n * @return {string|undefined} A translated key or undefined if no translation exists.\n */\nfunction getTranslation( key ) {\n\tif ( translationMap[ key ] ) {\n\t\treturn translationMap[ key ];\n\t}\n\n\tconst keyArray = key.split( '.' );\n\n\tif ( keyArray?.[ 0 ] === 'blocks' ) {\n\t\tconst blockName = getBlockNames()?.[ keyArray[ 1 ] ];\n\t\treturn blockName || keyArray[ 1 ];\n\t}\n\n\tif ( keyArray?.[ 0 ] === 'elements' ) {\n\t\treturn translationMap[ keyArray[ 1 ] ] || keyArray[ 1 ];\n\t}\n\n\treturn undefined;\n}\n\n/**\n * A deep comparison of two objects, optimized for comparing global styles.\n * @param {Object} changedObject The changed object to compare.\n * @param {Object} originalObject The original object to compare against.\n * @param {string} parentPath A key/value pair object of block names and their rendered titles.\n * @return {string[]} An array of paths whose values have changed.\n */\nfunction deepCompare( changedObject, originalObject, parentPath = '' ) {\n\t// We have two non-object values to compare.\n\tif ( ! isObject( changedObject ) && ! isObject( originalObject ) ) {\n\t\t/*\n\t\t * Only return a path if the value has changed.\n\t\t * And then only the path name up to 2 levels deep.\n\t\t */\n\t\treturn changedObject !== originalObject\n\t\t\t? parentPath.split( '.' ).slice( 0, 2 ).join( '.' )\n\t\t\t: undefined;\n\t}\n\n\t// Enable comparison when an object doesn't have a corresponding property to compare.\n\tchangedObject = isObject( changedObject ) ? changedObject : {};\n\toriginalObject = isObject( originalObject ) ? originalObject : {};\n\n\tconst allKeys = new Set( [\n\t\t...Object.keys( changedObject ),\n\t\t...Object.keys( originalObject ),\n\t] );\n\n\tlet diffs = [];\n\tfor ( const key of allKeys ) {\n\t\tconst path = parentPath ? parentPath + '.' + key : key;\n\t\tconst changedPath = deepCompare(\n\t\t\tchangedObject[ key ],\n\t\t\toriginalObject[ key ],\n\t\t\tpath\n\t\t);\n\t\tif ( changedPath ) {\n\t\t\tdiffs = diffs.concat( changedPath );\n\t\t}\n\t}\n\treturn diffs;\n}\n\n/**\n * Returns an array of translated summarized global styles changes.\n * Results are cached using a Map() key of `JSON.stringify( { next, previous } )`.\n *\n * @param {Object} next The changed object to compare.\n * @param {Object} previous The original object to compare against.\n * @return {Array[]} A 2-dimensional array of tuples: [ \"group\", \"translated change\" ].\n */\nexport function getGlobalStylesChangelist( next, previous ) {\n\tconst cacheKey = JSON.stringify( { next, previous } );\n\n\tif ( globalStylesChangesCache.has( cacheKey ) ) {\n\t\treturn globalStylesChangesCache.get( cacheKey );\n\t}\n\n\t/*\n\t * Compare the two changesets with normalized keys.\n\t * The order of these keys determines the order in which\n\t * they'll appear in the results.\n\t */\n\tconst changedValueTree = deepCompare(\n\t\t{\n\t\t\tstyles: {\n\t\t\t\tbackground: next?.styles?.background,\n\t\t\t\tcolor: next?.styles?.color,\n\t\t\t\ttypography: next?.styles?.typography,\n\t\t\t\tspacing: next?.styles?.spacing,\n\t\t\t},\n\t\t\tblocks: next?.styles?.blocks,\n\t\t\telements: next?.styles?.elements,\n\t\t\tsettings: next?.settings,\n\t\t},\n\t\t{\n\t\t\tstyles: {\n\t\t\t\tbackground: previous?.styles?.background,\n\t\t\t\tcolor: previous?.styles?.color,\n\t\t\t\ttypography: previous?.styles?.typography,\n\t\t\t\tspacing: previous?.styles?.spacing,\n\t\t\t},\n\t\t\tblocks: previous?.styles?.blocks,\n\t\t\telements: previous?.styles?.elements,\n\t\t\tsettings: previous?.settings,\n\t\t}\n\t);\n\n\tif ( ! changedValueTree.length ) {\n\t\tglobalStylesChangesCache.set( cacheKey, EMPTY_ARRAY );\n\t\treturn EMPTY_ARRAY;\n\t}\n\n\t// Remove duplicate results.\n\tconst result = [ ...new Set( changedValueTree ) ]\n\t\t/*\n\t\t * Translate the keys.\n\t\t * Remove empty translations.\n\t\t */\n\t\t.reduce( ( acc, curr ) => {\n\t\t\tconst translation = getTranslation( curr );\n\t\t\tif ( translation ) {\n\t\t\t\tacc.push( [ curr.split( '.' )[ 0 ], translation ] );\n\t\t\t}\n\t\t\treturn acc;\n\t\t}, [] );\n\n\tglobalStylesChangesCache.set( cacheKey, result );\n\n\treturn result;\n}\n\n/**\n * From a getGlobalStylesChangelist() result, returns an array of translated global styles changes, grouped by type.\n * The types are 'blocks', 'elements', 'settings', and 'styles'.\n *\n * @param {Object} next The changed object to compare.\n * @param {Object} previous The original object to compare against.\n * @param {{maxResults:number}} options Options. maxResults: results to return before truncating.\n * @return {string[]} An array of translated changes.\n */\nexport default function getGlobalStylesChanges( next, previous, options = {} ) {\n\tlet changeList = getGlobalStylesChangelist( next, previous );\n\tconst changesLength = changeList.length;\n\tconst { maxResults } = options;\n\n\tif ( changesLength ) {\n\t\t// Truncate to `n` results if necessary.\n\t\tif ( !! maxResults && changesLength > maxResults ) {\n\t\t\tchangeList = changeList.slice( 0, maxResults );\n\t\t}\n\t\treturn Object.entries(\n\t\t\tchangeList.reduce( ( acc, curr ) => {\n\t\t\t\tconst group = acc[ curr[ 0 ] ] || [];\n\t\t\t\tif ( ! group.includes( curr[ 1 ] ) ) {\n\t\t\t\t\tacc[ curr[ 0 ] ] = [ ...group, curr[ 1 ] ];\n\t\t\t\t}\n\t\t\t\treturn acc;\n\t\t\t}, {} )\n\t\t).map( ( [ key, changeValues ] ) => {\n\t\t\tconst changeValuesLength = changeValues.length;\n\t\t\tconst joinedChangesValue = changeValues.join(\n\t\t\t\t/* translators: Used between list items, there is a space after the comma. */\n\t\t\t\t__( ', ' ) // eslint-disable-line @wordpress/i18n-no-flanking-whitespace\n\t\t\t);\n\t\t\tswitch ( key ) {\n\t\t\t\tcase 'blocks': {\n\t\t\t\t\treturn sprintf(\n\t\t\t\t\t\t// translators: %s: a list of block names separated by a comma.\n\t\t\t\t\t\t_n( '%s block.', '%s blocks.', changeValuesLength ),\n\t\t\t\t\t\tjoinedChangesValue\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tcase 'elements': {\n\t\t\t\t\treturn sprintf(\n\t\t\t\t\t\t// translators: %s: a list of element names separated by a comma.\n\t\t\t\t\t\t_n( '%s element.', '%s elements.', changeValuesLength ),\n\t\t\t\t\t\tjoinedChangesValue\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tcase 'settings': {\n\t\t\t\t\treturn sprintf(\n\t\t\t\t\t\t// translators: %s: a list of theme.json setting labels separated by a comma.\n\t\t\t\t\t\t__( '%s settings.' ),\n\t\t\t\t\t\tjoinedChangesValue\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tcase 'styles': {\n\t\t\t\t\treturn sprintf(\n\t\t\t\t\t\t// translators: %s: a list of theme.json top-level styles labels separated by a comma.\n\t\t\t\t\t\t__( '%s styles.' ),\n\t\t\t\t\t\tjoinedChangesValue\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tdefault: {\n\t\t\t\t\treturn sprintf(\n\t\t\t\t\t\t// translators: %s: a list of global styles changes separated by a comma.\n\t\t\t\t\t\t__( '%s.' ),\n\t\t\t\t\t\tjoinedChangesValue\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n\n\treturn EMPTY_ARRAY;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,OAAO,MAAM,QAAQ;;AAE5B;AACA;AACA;AACA,SAASC,EAAE,EAAEC,EAAE,E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kBAAmB,CAAC,EACvDC,kBACD,CAAC;UACF;QACA,KAAK,UAAU;UAAE;YAChB,OAAO9E,OAAO;YACb;YACAF,EAAE,CAAE,cAAe,CAAC,EACpBgF,kBACD,CAAC;UACF;QACA,KAAK,QAAQ;UAAE;YACd,OAAO9E,OAAO;YACb;YACAF,EAAE,CAAE,YAAa,CAAC,EAClBgF,kBACD,CAAC;UACF;QACA;UAAS;YACR,OAAO9E,OAAO;YACb;YACAF,EAAE,CAAE,KAAM,CAAC,EACXgF,kBACD,CAAC;UACF;MACD;IACD,CAAE,CAAC;EACJ;EAEA,OAAO1E,WAAW;AACnB","ignoreList":[]}
1
+ {"version":3,"names":["memoize","__","_n","sprintf","getBlockTypes","globalStylesChangesCache","Map","EMPTY_ARRAY","translationMap","caption","link","button","heading","h1","h2","h3","h4","h5","h6","getBlockNames","reduce","accumulator","name","title","isObject","obj","getTranslation","key","keyArray","split","blockName","undefined","deepCompare","changedObject","originalObject","parentPath","slice","join","allKeys","Set","Object","keys","diffs","path","changedPath","concat","getGlobalStylesChangelist","next","previous","cacheKey","JSON","stringify","has","get","changedValueTree","styles","background","color","typography","spacing","blocks","elements","settings","length","set","result","acc","curr","translation","push","getGlobalStylesChanges","options","changeList","changesLength","maxResults","entries","group","includes","map","changeValues","changeValuesLength","joinedChangesValue"],"sources":["@wordpress/block-editor/src/components/global-styles/get-global-styles-changes.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport memoize from 'memize';\n\n/**\n * WordPress dependencies\n */\nimport { __, _n, sprintf } from '@wordpress/i18n';\nimport { getBlockTypes } from '@wordpress/blocks';\n\nconst globalStylesChangesCache = new Map();\nconst EMPTY_ARRAY = [];\nconst translationMap = {\n\tcaption: __( 'Caption' ),\n\tlink: __( 'Link' ),\n\tbutton: __( 'Button' ),\n\theading: __( 'Heading' ),\n\th1: __( 'H1' ),\n\th2: __( 'H2' ),\n\th3: __( 'H3' ),\n\th4: __( 'H4' ),\n\th5: __( 'H5' ),\n\th6: __( 'H6' ),\n\t'settings.color': __( 'Color' ),\n\t'settings.typography': __( 'Typography' ),\n\t'styles.color': __( 'Colors' ),\n\t'styles.spacing': __( 'Spacing' ),\n\t'styles.background': __( 'Background' ),\n\t'styles.typography': __( 'Typography' ),\n};\nconst getBlockNames = memoize( () =>\n\tgetBlockTypes().reduce( ( accumulator, { name, title } ) => {\n\t\taccumulator[ name ] = title;\n\t\treturn accumulator;\n\t}, {} )\n);\nconst isObject = ( obj ) => obj !== null && typeof obj === 'object';\n\n/**\n * Get the translation for a given global styles key.\n * @param {string} key A key representing a path to a global style property or setting.\n * @return {string|undefined} A translated key or undefined if no translation exists.\n */\nfunction getTranslation( key ) {\n\tif ( translationMap[ key ] ) {\n\t\treturn translationMap[ key ];\n\t}\n\n\tconst keyArray = key.split( '.' );\n\n\tif ( keyArray?.[ 0 ] === 'blocks' ) {\n\t\tconst blockName = getBlockNames()?.[ keyArray[ 1 ] ];\n\t\treturn blockName || keyArray[ 1 ];\n\t}\n\n\tif ( keyArray?.[ 0 ] === 'elements' ) {\n\t\treturn translationMap[ keyArray[ 1 ] ] || keyArray[ 1 ];\n\t}\n\n\treturn undefined;\n}\n\n/**\n * A deep comparison of two objects, optimized for comparing global styles.\n * @param {Object} changedObject The changed object to compare.\n * @param {Object} originalObject The original object to compare against.\n * @param {string} parentPath A key/value pair object of block names and their rendered titles.\n * @return {string[]} An array of paths whose values have changed.\n */\nfunction deepCompare( changedObject, originalObject, parentPath = '' ) {\n\t// We have two non-object values to compare.\n\tif ( ! isObject( changedObject ) && ! isObject( originalObject ) ) {\n\t\t/*\n\t\t * Only return a path if the value has changed.\n\t\t * And then only the path name up to 2 levels deep.\n\t\t */\n\t\treturn changedObject !== originalObject\n\t\t\t? parentPath.split( '.' ).slice( 0, 2 ).join( '.' )\n\t\t\t: undefined;\n\t}\n\n\t// Enable comparison when an object doesn't have a corresponding property to compare.\n\tchangedObject = isObject( changedObject ) ? changedObject : {};\n\toriginalObject = isObject( originalObject ) ? originalObject : {};\n\n\tconst allKeys = new Set( [\n\t\t...Object.keys( changedObject ),\n\t\t...Object.keys( originalObject ),\n\t] );\n\n\tlet diffs = [];\n\tfor ( const key of allKeys ) {\n\t\tconst path = parentPath ? parentPath + '.' + key : key;\n\t\tconst changedPath = deepCompare(\n\t\t\tchangedObject[ key ],\n\t\t\toriginalObject[ key ],\n\t\t\tpath\n\t\t);\n\t\tif ( changedPath ) {\n\t\t\tdiffs = diffs.concat( changedPath );\n\t\t}\n\t}\n\treturn diffs;\n}\n\n/**\n * Returns an array of translated summarized global styles changes.\n * Results are cached using a Map() key of `JSON.stringify( { next, previous } )`.\n *\n * @param {Object} next The changed object to compare.\n * @param {Object} previous The original object to compare against.\n * @return {Array[]} A 2-dimensional array of tuples: [ \"group\", \"translated change\" ].\n */\nexport function getGlobalStylesChangelist( next, previous ) {\n\tconst cacheKey = JSON.stringify( { next, previous } );\n\n\tif ( globalStylesChangesCache.has( cacheKey ) ) {\n\t\treturn globalStylesChangesCache.get( cacheKey );\n\t}\n\n\t/*\n\t * Compare the two changesets with normalized keys.\n\t * The order of these keys determines the order in which\n\t * they'll appear in the results.\n\t */\n\tconst changedValueTree = deepCompare(\n\t\t{\n\t\t\tstyles: {\n\t\t\t\tbackground: next?.styles?.background,\n\t\t\t\tcolor: next?.styles?.color,\n\t\t\t\ttypography: next?.styles?.typography,\n\t\t\t\tspacing: next?.styles?.spacing,\n\t\t\t},\n\t\t\tblocks: next?.styles?.blocks,\n\t\t\telements: next?.styles?.elements,\n\t\t\tsettings: next?.settings,\n\t\t},\n\t\t{\n\t\t\tstyles: {\n\t\t\t\tbackground: previous?.styles?.background,\n\t\t\t\tcolor: previous?.styles?.color,\n\t\t\t\ttypography: previous?.styles?.typography,\n\t\t\t\tspacing: previous?.styles?.spacing,\n\t\t\t},\n\t\t\tblocks: previous?.styles?.blocks,\n\t\t\telements: previous?.styles?.elements,\n\t\t\tsettings: previous?.settings,\n\t\t}\n\t);\n\n\tif ( ! changedValueTree.length ) {\n\t\tglobalStylesChangesCache.set( cacheKey, EMPTY_ARRAY );\n\t\treturn EMPTY_ARRAY;\n\t}\n\n\t// Remove duplicate results.\n\tconst result = [ ...new Set( changedValueTree ) ]\n\t\t/*\n\t\t * Translate the keys.\n\t\t * Remove empty translations.\n\t\t */\n\t\t.reduce( ( acc, curr ) => {\n\t\t\tconst translation = getTranslation( curr );\n\t\t\tif ( translation ) {\n\t\t\t\tacc.push( [ curr.split( '.' )[ 0 ], translation ] );\n\t\t\t}\n\t\t\treturn acc;\n\t\t}, [] );\n\n\tglobalStylesChangesCache.set( cacheKey, result );\n\n\treturn result;\n}\n\n/**\n * From a getGlobalStylesChangelist() result, returns an array of translated global styles changes, grouped by type.\n * The types are 'blocks', 'elements', 'settings', and 'styles'.\n *\n * @param {Object} next The changed object to compare.\n * @param {Object} previous The original object to compare against.\n * @param {{maxResults:number}} options Options. maxResults: results to return before truncating.\n * @return {string[]} An array of translated changes.\n */\nexport default function getGlobalStylesChanges( next, previous, options = {} ) {\n\tlet changeList = getGlobalStylesChangelist( next, previous );\n\tconst changesLength = changeList.length;\n\tconst { maxResults } = options;\n\n\tif ( changesLength ) {\n\t\t// Truncate to `n` results if necessary.\n\t\tif ( !! maxResults && changesLength > maxResults ) {\n\t\t\tchangeList = changeList.slice( 0, maxResults );\n\t\t}\n\t\treturn Object.entries(\n\t\t\tchangeList.reduce( ( acc, curr ) => {\n\t\t\t\tconst group = acc[ curr[ 0 ] ] || [];\n\t\t\t\tif ( ! group.includes( curr[ 1 ] ) ) {\n\t\t\t\t\tacc[ curr[ 0 ] ] = [ ...group, curr[ 1 ] ];\n\t\t\t\t}\n\t\t\t\treturn acc;\n\t\t\t}, {} )\n\t\t).map( ( [ key, changeValues ] ) => {\n\t\t\tconst changeValuesLength = changeValues.length;\n\t\t\tconst joinedChangesValue = changeValues.join(\n\t\t\t\t/* translators: Used between list items, there is a space after the comma. */\n\t\t\t\t__( ', ' ) // eslint-disable-line @wordpress/i18n-no-flanking-whitespace\n\t\t\t);\n\t\t\tswitch ( key ) {\n\t\t\t\tcase 'blocks': {\n\t\t\t\t\treturn sprintf(\n\t\t\t\t\t\t// translators: %s: a list of block names separated by a comma.\n\t\t\t\t\t\t_n( '%s block.', '%s blocks.', changeValuesLength ),\n\t\t\t\t\t\tjoinedChangesValue\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tcase 'elements': {\n\t\t\t\t\treturn sprintf(\n\t\t\t\t\t\t// translators: %s: a list of element names separated by a comma.\n\t\t\t\t\t\t_n( '%s element.', '%s elements.', changeValuesLength ),\n\t\t\t\t\t\tjoinedChangesValue\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tcase 'settings': {\n\t\t\t\t\treturn sprintf(\n\t\t\t\t\t\t// translators: %s: a list of theme.json setting labels separated by a comma.\n\t\t\t\t\t\t__( '%s settings.' ),\n\t\t\t\t\t\tjoinedChangesValue\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tcase 'styles': {\n\t\t\t\t\treturn sprintf(\n\t\t\t\t\t\t// translators: %s: a list of theme.json top-level styles labels separated by a comma.\n\t\t\t\t\t\t__( '%s styles.' ),\n\t\t\t\t\t\tjoinedChangesValue\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tdefault: {\n\t\t\t\t\treturn sprintf(\n\t\t\t\t\t\t// translators: %s: a list of global styles changes separated by a comma.\n\t\t\t\t\t\t__( '%s.' ),\n\t\t\t\t\t\tjoinedChangesValue\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n\n\treturn EMPTY_ARRAY;\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,OAAO,MAAM,QAAQ;;AAE5B;AACA;AACA;AACA,SAASC,EAAE,EAAEC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AACjD,SAASC,aAAa,QAAQ,mBAAmB;AAEjD,MAAMC,wBAAwB,GAAG,IAAIC,GAAG,CAAC,CAAC;AAC1C,MAAMC,WAAW,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;UACF;QACA,KAAK,QAAQ;UAAE;YACd,OAAO9E,OAAO;YACb;YACAF,EAAE,CAAE,YAAa,CAAC,EAClBgF,kBACD,CAAC;UACF;QACA;UAAS;YACR,OAAO9E,OAAO;YACb;YACAF,EAAE,CAAE,KAAM,CAAC,EACXgF,kBACD,CAAC;UACF;MACD;IACD,CAAE,CAAC;EACJ;EAEA,OAAO1E,WAAW;AACnB","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["fastDeepEqual","useContext","useCallback","useMemo","useSelect","store","blocksStore","_x","getValueFromVariable","getPresetVariableFromValue","getValueFromObjectPath","setImmutably","GlobalStylesContext","unlock","EMPTY_CONFIG","settings","styles","VALID_SETTINGS","useGlobalStylesReset","user","setUserConfig","config","canReset","useGlobalSetting","propertyPath","blockName","source","configs","appendedBlockPath","appendedPropertyPath","contextualPath","globalPath","sourceKey","settingValue","configToUse","_getValueFromObjectPa","result","forEach","setting","_getValueFromObjectPa2","value","undefined","split","setSetting","newValue","currentConfig","useGlobalStyle","path","shouldDecodeEncode","merged","mergedConfig","base","baseConfig","userConfig","appendedPath","finalPath","setStyle","rawResult","useSettingsForBlockElement","parentSettings","element","supportedStyles","supports","select","getSupportedStyles","getBlockType","updatedSettings","includes","typography","fontSizes","customFontSize","defaultFontSizes","fontFamilies","color","text","background","button","heading","link","caption","gradients","customGradient","defaultDuotone","customDuotone","key","textColumns","layout","spacing","sides","Array","isArray","length","dimensions","charAt","toUpperCase","slice","border","shadow","textAlign","useColorsPerOrigin","customColors","palette","custom","themeColors","theme","defaultColors","default","shouldDisplayDefaultColors","defaultPalette","push","name","colors","useGradientsPerOrigin","customGradients","themeGradients","defaultGradients","shouldDisplayDefaultGradients"],"sources":["@wordpress/block-editor/src/components/global-styles/hooks.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport fastDeepEqual from 'fast-deep-equal/es6';\n\n/**\n * WordPress dependencies\n */\nimport { useContext, useCallback, useMemo } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { store as blocksStore } from '@wordpress/blocks';\nimport { _x } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { getValueFromVariable, getPresetVariableFromValue } from './utils';\nimport { getValueFromObjectPath, setImmutably } from '../../utils/object';\nimport { GlobalStylesContext } from './context';\nimport { unlock } from '../../lock-unlock';\n\nconst EMPTY_CONFIG = { settings: {}, styles: {} };\n\nconst VALID_SETTINGS = [\n\t'appearanceTools',\n\t'useRootPaddingAwareAlignments',\n\t'background.backgroundImage',\n\t'background.backgroundRepeat',\n\t'background.backgroundSize',\n\t'background.backgroundPosition',\n\t'border.color',\n\t'border.radius',\n\t'border.style',\n\t'border.width',\n\t'shadow.presets',\n\t'shadow.defaultPresets',\n\t'color.background',\n\t'color.button',\n\t'color.caption',\n\t'color.custom',\n\t'color.customDuotone',\n\t'color.customGradient',\n\t'color.defaultDuotone',\n\t'color.defaultGradients',\n\t'color.defaultPalette',\n\t'color.duotone',\n\t'color.gradients',\n\t'color.heading',\n\t'color.link',\n\t'color.palette',\n\t'color.text',\n\t'custom',\n\t'dimensions.aspectRatio',\n\t'dimensions.minHeight',\n\t'layout.contentSize',\n\t'layout.definitions',\n\t'layout.wideSize',\n\t'lightbox.enabled',\n\t'lightbox.allowEditing',\n\t'position.fixed',\n\t'position.sticky',\n\t'spacing.customSpacingSize',\n\t'spacing.defaultSpacingSizes',\n\t'spacing.spacingSizes',\n\t'spacing.spacingScale',\n\t'spacing.blockGap',\n\t'spacing.margin',\n\t'spacing.padding',\n\t'spacing.units',\n\t'typography.fluid',\n\t'typography.customFontSize',\n\t'typography.defaultFontSizes',\n\t'typography.dropCap',\n\t'typography.fontFamilies',\n\t'typography.fontSizes',\n\t'typography.fontStyle',\n\t'typography.fontWeight',\n\t'typography.letterSpacing',\n\t'typography.lineHeight',\n\t'typography.textAlign',\n\t'typography.textColumns',\n\t'typography.textDecoration',\n\t'typography.textTransform',\n\t'typography.writingMode',\n];\n\nexport const useGlobalStylesReset = () => {\n\tconst { user, setUserConfig } = useContext( GlobalStylesContext );\n\tconst config = {\n\t\tsettings: user.settings,\n\t\tstyles: user.styles,\n\t};\n\tconst canReset = !! config && ! fastDeepEqual( config, EMPTY_CONFIG );\n\treturn [\n\t\tcanReset,\n\t\tuseCallback( () => setUserConfig( EMPTY_CONFIG ), [ setUserConfig ] ),\n\t];\n};\n\nexport function useGlobalSetting( propertyPath, blockName, source = 'all' ) {\n\tconst { setUserConfig, ...configs } = useContext( GlobalStylesContext );\n\tconst appendedBlockPath = blockName ? '.blocks.' + blockName : '';\n\tconst appendedPropertyPath = propertyPath ? '.' + propertyPath : '';\n\tconst contextualPath = `settings${ appendedBlockPath }${ appendedPropertyPath }`;\n\tconst globalPath = `settings${ appendedPropertyPath }`;\n\tconst sourceKey = source === 'all' ? 'merged' : source;\n\n\tconst settingValue = useMemo( () => {\n\t\tconst configToUse = configs[ sourceKey ];\n\t\tif ( ! configToUse ) {\n\t\t\tthrow 'Unsupported source';\n\t\t}\n\n\t\tif ( propertyPath ) {\n\t\t\treturn (\n\t\t\t\tgetValueFromObjectPath( configToUse, contextualPath ) ??\n\t\t\t\tgetValueFromObjectPath( configToUse, globalPath )\n\t\t\t);\n\t\t}\n\n\t\tlet result = {};\n\t\tVALID_SETTINGS.forEach( ( setting ) => {\n\t\t\tconst value =\n\t\t\t\tgetValueFromObjectPath(\n\t\t\t\t\tconfigToUse,\n\t\t\t\t\t`settings${ appendedBlockPath }.${ setting }`\n\t\t\t\t) ??\n\t\t\t\tgetValueFromObjectPath( configToUse, `settings.${ setting }` );\n\t\t\tif ( value !== undefined ) {\n\t\t\t\tresult = setImmutably( result, setting.split( '.' ), value );\n\t\t\t}\n\t\t} );\n\t\treturn result;\n\t}, [\n\t\tconfigs,\n\t\tsourceKey,\n\t\tpropertyPath,\n\t\tcontextualPath,\n\t\tglobalPath,\n\t\tappendedBlockPath,\n\t] );\n\n\tconst setSetting = ( newValue ) => {\n\t\tsetUserConfig( ( currentConfig ) =>\n\t\t\tsetImmutably( currentConfig, contextualPath.split( '.' ), newValue )\n\t\t);\n\t};\n\treturn [ settingValue, setSetting ];\n}\n\nexport function useGlobalStyle(\n\tpath,\n\tblockName,\n\tsource = 'all',\n\t{ shouldDecodeEncode = true } = {}\n) {\n\tconst {\n\t\tmerged: mergedConfig,\n\t\tbase: baseConfig,\n\t\tuser: userConfig,\n\t\tsetUserConfig,\n\t} = useContext( GlobalStylesContext );\n\tconst appendedPath = path ? '.' + path : '';\n\tconst finalPath = ! blockName\n\t\t? `styles${ appendedPath }`\n\t\t: `styles.blocks.${ blockName }${ appendedPath }`;\n\n\tconst setStyle = ( newValue ) => {\n\t\tsetUserConfig( ( currentConfig ) =>\n\t\t\tsetImmutably(\n\t\t\t\tcurrentConfig,\n\t\t\t\tfinalPath.split( '.' ),\n\t\t\t\tshouldDecodeEncode\n\t\t\t\t\t? getPresetVariableFromValue(\n\t\t\t\t\t\t\tmergedConfig.settings,\n\t\t\t\t\t\t\tblockName,\n\t\t\t\t\t\t\tpath,\n\t\t\t\t\t\t\tnewValue\n\t\t\t\t\t )\n\t\t\t\t\t: newValue\n\t\t\t)\n\t\t);\n\t};\n\n\tlet rawResult, result;\n\tswitch ( source ) {\n\t\tcase 'all':\n\t\t\trawResult = getValueFromObjectPath( mergedConfig, finalPath );\n\t\t\tresult = shouldDecodeEncode\n\t\t\t\t? getValueFromVariable( mergedConfig, blockName, rawResult )\n\t\t\t\t: rawResult;\n\t\t\tbreak;\n\t\tcase 'user':\n\t\t\trawResult = getValueFromObjectPath( userConfig, finalPath );\n\t\t\tresult = shouldDecodeEncode\n\t\t\t\t? getValueFromVariable( mergedConfig, blockName, rawResult )\n\t\t\t\t: rawResult;\n\t\t\tbreak;\n\t\tcase 'base':\n\t\t\trawResult = getValueFromObjectPath( baseConfig, finalPath );\n\t\t\tresult = shouldDecodeEncode\n\t\t\t\t? getValueFromVariable( baseConfig, blockName, rawResult )\n\t\t\t\t: rawResult;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tthrow 'Unsupported source';\n\t}\n\n\treturn [ result, setStyle ];\n}\n\n/**\n * React hook that overrides a global settings object with block and element specific settings.\n *\n * @param {Object} parentSettings Settings object.\n * @param {blockName?} blockName Block name.\n * @param {element?} element Element name.\n *\n * @return {Object} Merge of settings and supports.\n */\nexport function useSettingsForBlockElement(\n\tparentSettings,\n\tblockName,\n\telement\n) {\n\tconst { supportedStyles, supports } = useSelect(\n\t\t( select ) => {\n\t\t\treturn {\n\t\t\t\tsupportedStyles: unlock(\n\t\t\t\t\tselect( blocksStore )\n\t\t\t\t).getSupportedStyles( blockName, element ),\n\t\t\t\tsupports:\n\t\t\t\t\tselect( blocksStore ).getBlockType( blockName )?.supports,\n\t\t\t};\n\t\t},\n\t\t[ blockName, element ]\n\t);\n\n\treturn useMemo( () => {\n\t\tconst updatedSettings = { ...parentSettings };\n\n\t\tif ( ! supportedStyles.includes( 'fontSize' ) ) {\n\t\t\tupdatedSettings.typography = {\n\t\t\t\t...updatedSettings.typography,\n\t\t\t\tfontSizes: {},\n\t\t\t\tcustomFontSize: false,\n\t\t\t\tdefaultFontSizes: false,\n\t\t\t};\n\t\t}\n\n\t\tif ( ! supportedStyles.includes( 'fontFamily' ) ) {\n\t\t\tupdatedSettings.typography = {\n\t\t\t\t...updatedSettings.typography,\n\t\t\t\tfontFamilies: {},\n\t\t\t};\n\t\t}\n\n\t\tupdatedSettings.color = {\n\t\t\t...updatedSettings.color,\n\t\t\ttext:\n\t\t\t\tupdatedSettings.color?.text &&\n\t\t\t\tsupportedStyles.includes( 'color' ),\n\t\t\tbackground:\n\t\t\t\tupdatedSettings.color?.background &&\n\t\t\t\t( supportedStyles.includes( 'background' ) ||\n\t\t\t\t\tsupportedStyles.includes( 'backgroundColor' ) ),\n\t\t\tbutton:\n\t\t\t\tupdatedSettings.color?.button &&\n\t\t\t\tsupportedStyles.includes( 'buttonColor' ),\n\t\t\theading:\n\t\t\t\tupdatedSettings.color?.heading &&\n\t\t\t\tsupportedStyles.includes( 'headingColor' ),\n\t\t\tlink:\n\t\t\t\tupdatedSettings.color?.link &&\n\t\t\t\tsupportedStyles.includes( 'linkColor' ),\n\t\t\tcaption:\n\t\t\t\tupdatedSettings.color?.caption &&\n\t\t\t\tsupportedStyles.includes( 'captionColor' ),\n\t\t};\n\n\t\t// Some blocks can enable background colors but disable gradients.\n\t\tif ( ! supportedStyles.includes( 'background' ) ) {\n\t\t\tupdatedSettings.color.gradients = [];\n\t\t\tupdatedSettings.color.customGradient = false;\n\t\t}\n\n\t\t// If filters are not supported by the block/element, disable duotone.\n\t\tif ( ! supportedStyles.includes( 'filter' ) ) {\n\t\t\tupdatedSettings.color.defaultDuotone = false;\n\t\t\tupdatedSettings.color.customDuotone = false;\n\t\t}\n\n\t\t[\n\t\t\t'lineHeight',\n\t\t\t'fontStyle',\n\t\t\t'fontWeight',\n\t\t\t'letterSpacing',\n\t\t\t'textAlign',\n\t\t\t'textTransform',\n\t\t\t'textDecoration',\n\t\t\t'writingMode',\n\t\t].forEach( ( key ) => {\n\t\t\tif ( ! supportedStyles.includes( key ) ) {\n\t\t\t\tupdatedSettings.typography = {\n\t\t\t\t\t...updatedSettings.typography,\n\t\t\t\t\t[ key ]: false,\n\t\t\t\t};\n\t\t\t}\n\t\t} );\n\n\t\t// The column-count style is named text column to reduce confusion with\n\t\t// the columns block and manage expectations from the support.\n\t\t// See: https://github.com/WordPress/gutenberg/pull/33587\n\t\tif ( ! supportedStyles.includes( 'columnCount' ) ) {\n\t\t\tupdatedSettings.typography = {\n\t\t\t\t...updatedSettings.typography,\n\t\t\t\ttextColumns: false,\n\t\t\t};\n\t\t}\n\n\t\t[ 'contentSize', 'wideSize' ].forEach( ( key ) => {\n\t\t\tif ( ! supportedStyles.includes( key ) ) {\n\t\t\t\tupdatedSettings.layout = {\n\t\t\t\t\t...updatedSettings.layout,\n\t\t\t\t\t[ key ]: false,\n\t\t\t\t};\n\t\t\t}\n\t\t} );\n\n\t\t[ 'padding', 'margin', 'blockGap' ].forEach( ( key ) => {\n\t\t\tif ( ! supportedStyles.includes( key ) ) {\n\t\t\t\tupdatedSettings.spacing = {\n\t\t\t\t\t...updatedSettings.spacing,\n\t\t\t\t\t[ key ]: false,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tconst sides = Array.isArray( supports?.spacing?.[ key ] )\n\t\t\t\t? supports?.spacing?.[ key ]\n\t\t\t\t: supports?.spacing?.[ key ]?.sides;\n\t\t\t// Check if spacing type is supported before adding sides.\n\t\t\tif ( sides?.length && updatedSettings.spacing?.[ key ] ) {\n\t\t\t\tupdatedSettings.spacing = {\n\t\t\t\t\t...updatedSettings.spacing,\n\t\t\t\t\t[ key ]: {\n\t\t\t\t\t\t...updatedSettings.spacing?.[ key ],\n\t\t\t\t\t\tsides,\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t}\n\t\t} );\n\n\t\t[ 'aspectRatio', 'minHeight' ].forEach( ( key ) => {\n\t\t\tif ( ! supportedStyles.includes( key ) ) {\n\t\t\t\tupdatedSettings.dimensions = {\n\t\t\t\t\t...updatedSettings.dimensions,\n\t\t\t\t\t[ key ]: false,\n\t\t\t\t};\n\t\t\t}\n\t\t} );\n\n\t\t[ 'radius', 'color', 'style', 'width' ].forEach( ( key ) => {\n\t\t\tif (\n\t\t\t\t! supportedStyles.includes(\n\t\t\t\t\t'border' + key.charAt( 0 ).toUpperCase() + key.slice( 1 )\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\tupdatedSettings.border = {\n\t\t\t\t\t...updatedSettings.border,\n\t\t\t\t\t[ key ]: false,\n\t\t\t\t};\n\t\t\t}\n\t\t} );\n\n\t\t[ 'backgroundImage', 'backgroundSize' ].forEach( ( key ) => {\n\t\t\tif ( ! supportedStyles.includes( key ) ) {\n\t\t\t\tupdatedSettings.background = {\n\t\t\t\t\t...updatedSettings.background,\n\t\t\t\t\t[ key ]: false,\n\t\t\t\t};\n\t\t\t}\n\t\t} );\n\n\t\tupdatedSettings.shadow = supportedStyles.includes( 'shadow' )\n\t\t\t? updatedSettings.shadow\n\t\t\t: false;\n\n\t\t// Text alignment is only available for blocks.\n\t\tif ( element ) {\n\t\t\tupdatedSettings.typography.textAlign = false;\n\t\t}\n\n\t\treturn updatedSettings;\n\t}, [ parentSettings, supportedStyles, supports, element ] );\n}\n\nexport function useColorsPerOrigin( settings ) {\n\tconst customColors = settings?.color?.palette?.custom;\n\tconst themeColors = settings?.color?.palette?.theme;\n\tconst defaultColors = settings?.color?.palette?.default;\n\tconst shouldDisplayDefaultColors = settings?.color?.defaultPalette;\n\n\treturn useMemo( () => {\n\t\tconst result = [];\n\t\tif ( themeColors && themeColors.length ) {\n\t\t\tresult.push( {\n\t\t\t\tname: _x(\n\t\t\t\t\t'Theme',\n\t\t\t\t\t'Indicates this palette comes from the theme.'\n\t\t\t\t),\n\t\t\t\tcolors: themeColors,\n\t\t\t} );\n\t\t}\n\t\tif (\n\t\t\tshouldDisplayDefaultColors &&\n\t\t\tdefaultColors &&\n\t\t\tdefaultColors.length\n\t\t) {\n\t\t\tresult.push( {\n\t\t\t\tname: _x(\n\t\t\t\t\t'Default',\n\t\t\t\t\t'Indicates this palette comes from WordPress.'\n\t\t\t\t),\n\t\t\t\tcolors: defaultColors,\n\t\t\t} );\n\t\t}\n\t\tif ( customColors && customColors.length ) {\n\t\t\tresult.push( {\n\t\t\t\tname: _x(\n\t\t\t\t\t'Custom',\n\t\t\t\t\t'Indicates this palette is created by the user.'\n\t\t\t\t),\n\t\t\t\tcolors: customColors,\n\t\t\t} );\n\t\t}\n\t\treturn result;\n\t}, [\n\t\tcustomColors,\n\t\tthemeColors,\n\t\tdefaultColors,\n\t\tshouldDisplayDefaultColors,\n\t] );\n}\n\nexport function useGradientsPerOrigin( settings ) {\n\tconst customGradients = settings?.color?.gradients?.custom;\n\tconst themeGradients = settings?.color?.gradients?.theme;\n\tconst defaultGradients = settings?.color?.gradients?.default;\n\tconst shouldDisplayDefaultGradients = settings?.color?.defaultGradients;\n\n\treturn useMemo( () => {\n\t\tconst result = [];\n\t\tif ( themeGradients && themeGradients.length ) {\n\t\t\tresult.push( {\n\t\t\t\tname: _x(\n\t\t\t\t\t'Theme',\n\t\t\t\t\t'Indicates this palette comes from the theme.'\n\t\t\t\t),\n\t\t\t\tgradients: themeGradients,\n\t\t\t} );\n\t\t}\n\t\tif (\n\t\t\tshouldDisplayDefaultGradients &&\n\t\t\tdefaultGradients &&\n\t\t\tdefaultGradients.length\n\t\t) {\n\t\t\tresult.push( {\n\t\t\t\tname: _x(\n\t\t\t\t\t'Default',\n\t\t\t\t\t'Indicates this palette comes from WordPress.'\n\t\t\t\t),\n\t\t\t\tgradients: defaultGradients,\n\t\t\t} );\n\t\t}\n\t\tif ( customGradients && customGradients.length ) {\n\t\t\tresult.push( {\n\t\t\t\tname: _x(\n\t\t\t\t\t'Custom',\n\t\t\t\t\t'Indicates this palette is created by the user.'\n\t\t\t\t),\n\t\t\t\tgradients: customGradients,\n\t\t\t} );\n\t\t}\n\t\treturn result;\n\t}, [\n\t\tcustomGradients,\n\t\tthemeGradients,\n\t\tdefaultGradients,\n\t\tshouldDisplayDefaultGradients,\n\t] );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,aAAa,MAAM,qBAAqB;;AAE/C;AACA;AACA;AACA,SAASC,UAAU,EAAEC,WAAW,EAAEC,OAAO,QAAQ,oBAAoB;AACrE,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,KAAK,IAAIC,WAAW,QAAQ,mBAAmB;AACxD,SAASC,EAAE,QAAQ,iBAAiB;;AAEpC;AACA;AACA;AACA,SAASC,oBAAoB,EAAEC,0BAA0B,QAAQ,SAAS;AAC1E,SAASC,sBAAsB,EAAEC,YAAY,QAAQ,oBAAoB;AACzE,SAASC,mBAAmB,QAAQ,WAAW;AAC/C,SAASC,MAAM,QAAQ,mBAAmB;AAE1C,MAAMC,YAAY,GAAG;EAAEC,QAAQ,EAAE,CAAC,CAAC;EAAEC,MAAM,EAAE,CAAC;AAAE,C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,EAAEvG,EAAE,CACP,SAAS,EACT,8CACD,CAAC;QACDyE,SAAS,EAAEmC;MACZ,CAAE,CAAC;IACJ;IACA,IAAKF,eAAe,IAAIA,eAAe,CAACtB,MAAM,EAAG;MAChDvD,MAAM,CAACyE,IAAI,CAAE;QACZC,IAAI,EAAEvG,EAAE,CACP,QAAQ,EACR,gDACD,CAAC;QACDyE,SAAS,EAAEiC;MACZ,CAAE,CAAC;IACJ;IACA,OAAO7E,MAAM;EACd,CAAC,EAAE,CACF6E,eAAe,EACfC,cAAc,EACdC,gBAAgB,EAChBC,6BAA6B,CAC5B,CAAC;AACJ","ignoreList":[]}
1
+ {"version":3,"names":["fastDeepEqual","useContext","useCallback","useMemo","useSelect","store","blocksStore","_x","getValueFromVariable","getPresetVariableFromValue","getValueFromObjectPath","setImmutably","GlobalStylesContext","unlock","EMPTY_CONFIG","settings","styles","VALID_SETTINGS","useGlobalStylesReset","user","setUserConfig","config","canReset","useGlobalSetting","propertyPath","blockName","source","configs","appendedBlockPath","appendedPropertyPath","contextualPath","globalPath","sourceKey","settingValue","configToUse","_getValueFromObjectPa","result","forEach","setting","_getValueFromObjectPa2","value","undefined","split","setSetting","newValue","currentConfig","useGlobalStyle","path","shouldDecodeEncode","merged","mergedConfig","base","baseConfig","userConfig","appendedPath","finalPath","setStyle","rawResult","useSettingsForBlockElement","parentSettings","element","supportedStyles","supports","select","getSupportedStyles","getBlockType","updatedSettings","includes","typography","fontSizes","customFontSize","defaultFontSizes","fontFamilies","color","text","background","button","heading","link","caption","gradients","customGradient","defaultDuotone","customDuotone","key","textColumns","layout","spacing","sides","Array","isArray","length","dimensions","charAt","toUpperCase","slice","border","shadow","textAlign","useColorsPerOrigin","customColors","palette","custom","themeColors","theme","defaultColors","default","shouldDisplayDefaultColors","defaultPalette","push","name","colors","useGradientsPerOrigin","customGradients","themeGradients","defaultGradients","shouldDisplayDefaultGradients"],"sources":["@wordpress/block-editor/src/components/global-styles/hooks.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport fastDeepEqual from 'fast-deep-equal/es6';\n\n/**\n * WordPress dependencies\n */\nimport { useContext, useCallback, useMemo } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { store as blocksStore } from '@wordpress/blocks';\nimport { _x } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { getValueFromVariable, getPresetVariableFromValue } from './utils';\nimport { getValueFromObjectPath, setImmutably } from '../../utils/object';\nimport { GlobalStylesContext } from './context';\nimport { unlock } from '../../lock-unlock';\n\nconst EMPTY_CONFIG = { settings: {}, styles: {} };\n\nconst VALID_SETTINGS = [\n\t'appearanceTools',\n\t'useRootPaddingAwareAlignments',\n\t'background.backgroundImage',\n\t'background.backgroundRepeat',\n\t'background.backgroundSize',\n\t'background.backgroundPosition',\n\t'border.color',\n\t'border.radius',\n\t'border.style',\n\t'border.width',\n\t'shadow.presets',\n\t'shadow.defaultPresets',\n\t'color.background',\n\t'color.button',\n\t'color.caption',\n\t'color.custom',\n\t'color.customDuotone',\n\t'color.customGradient',\n\t'color.defaultDuotone',\n\t'color.defaultGradients',\n\t'color.defaultPalette',\n\t'color.duotone',\n\t'color.gradients',\n\t'color.heading',\n\t'color.link',\n\t'color.palette',\n\t'color.text',\n\t'custom',\n\t'dimensions.aspectRatio',\n\t'dimensions.minHeight',\n\t'layout.contentSize',\n\t'layout.definitions',\n\t'layout.wideSize',\n\t'lightbox.enabled',\n\t'lightbox.allowEditing',\n\t'position.fixed',\n\t'position.sticky',\n\t'spacing.customSpacingSize',\n\t'spacing.defaultSpacingSizes',\n\t'spacing.spacingSizes',\n\t'spacing.spacingScale',\n\t'spacing.blockGap',\n\t'spacing.margin',\n\t'spacing.padding',\n\t'spacing.units',\n\t'typography.fluid',\n\t'typography.customFontSize',\n\t'typography.defaultFontSizes',\n\t'typography.dropCap',\n\t'typography.fontFamilies',\n\t'typography.fontSizes',\n\t'typography.fontStyle',\n\t'typography.fontWeight',\n\t'typography.letterSpacing',\n\t'typography.lineHeight',\n\t'typography.textAlign',\n\t'typography.textColumns',\n\t'typography.textDecoration',\n\t'typography.textTransform',\n\t'typography.writingMode',\n];\n\nexport const useGlobalStylesReset = () => {\n\tconst { user, setUserConfig } = useContext( GlobalStylesContext );\n\tconst config = {\n\t\tsettings: user.settings,\n\t\tstyles: user.styles,\n\t};\n\tconst canReset = !! config && ! fastDeepEqual( config, EMPTY_CONFIG );\n\treturn [\n\t\tcanReset,\n\t\tuseCallback( () => setUserConfig( EMPTY_CONFIG ), [ setUserConfig ] ),\n\t];\n};\n\nexport function useGlobalSetting( propertyPath, blockName, source = 'all' ) {\n\tconst { setUserConfig, ...configs } = useContext( GlobalStylesContext );\n\tconst appendedBlockPath = blockName ? '.blocks.' + blockName : '';\n\tconst appendedPropertyPath = propertyPath ? '.' + propertyPath : '';\n\tconst contextualPath = `settings${ appendedBlockPath }${ appendedPropertyPath }`;\n\tconst globalPath = `settings${ appendedPropertyPath }`;\n\tconst sourceKey = source === 'all' ? 'merged' : source;\n\n\tconst settingValue = useMemo( () => {\n\t\tconst configToUse = configs[ sourceKey ];\n\t\tif ( ! configToUse ) {\n\t\t\tthrow 'Unsupported source';\n\t\t}\n\n\t\tif ( propertyPath ) {\n\t\t\treturn (\n\t\t\t\tgetValueFromObjectPath( configToUse, contextualPath ) ??\n\t\t\t\tgetValueFromObjectPath( configToUse, globalPath )\n\t\t\t);\n\t\t}\n\n\t\tlet result = {};\n\t\tVALID_SETTINGS.forEach( ( setting ) => {\n\t\t\tconst value =\n\t\t\t\tgetValueFromObjectPath(\n\t\t\t\t\tconfigToUse,\n\t\t\t\t\t`settings${ appendedBlockPath }.${ setting }`\n\t\t\t\t) ??\n\t\t\t\tgetValueFromObjectPath( configToUse, `settings.${ setting }` );\n\t\t\tif ( value !== undefined ) {\n\t\t\t\tresult = setImmutably( result, setting.split( '.' ), value );\n\t\t\t}\n\t\t} );\n\t\treturn result;\n\t}, [\n\t\tconfigs,\n\t\tsourceKey,\n\t\tpropertyPath,\n\t\tcontextualPath,\n\t\tglobalPath,\n\t\tappendedBlockPath,\n\t] );\n\n\tconst setSetting = ( newValue ) => {\n\t\tsetUserConfig( ( currentConfig ) =>\n\t\t\tsetImmutably( currentConfig, contextualPath.split( '.' ), newValue )\n\t\t);\n\t};\n\treturn [ settingValue, setSetting ];\n}\n\nexport function useGlobalStyle(\n\tpath,\n\tblockName,\n\tsource = 'all',\n\t{ shouldDecodeEncode = true } = {}\n) {\n\tconst {\n\t\tmerged: mergedConfig,\n\t\tbase: baseConfig,\n\t\tuser: userConfig,\n\t\tsetUserConfig,\n\t} = useContext( GlobalStylesContext );\n\tconst appendedPath = path ? '.' + path : '';\n\tconst finalPath = ! blockName\n\t\t? `styles${ appendedPath }`\n\t\t: `styles.blocks.${ blockName }${ appendedPath }`;\n\n\tconst setStyle = ( newValue ) => {\n\t\tsetUserConfig( ( currentConfig ) =>\n\t\t\tsetImmutably(\n\t\t\t\tcurrentConfig,\n\t\t\t\tfinalPath.split( '.' ),\n\t\t\t\tshouldDecodeEncode\n\t\t\t\t\t? getPresetVariableFromValue(\n\t\t\t\t\t\t\tmergedConfig.settings,\n\t\t\t\t\t\t\tblockName,\n\t\t\t\t\t\t\tpath,\n\t\t\t\t\t\t\tnewValue\n\t\t\t\t\t )\n\t\t\t\t\t: newValue\n\t\t\t)\n\t\t);\n\t};\n\n\tlet rawResult, result;\n\tswitch ( source ) {\n\t\tcase 'all':\n\t\t\trawResult = getValueFromObjectPath( mergedConfig, finalPath );\n\t\t\tresult = shouldDecodeEncode\n\t\t\t\t? getValueFromVariable( mergedConfig, blockName, rawResult )\n\t\t\t\t: rawResult;\n\t\t\tbreak;\n\t\tcase 'user':\n\t\t\trawResult = getValueFromObjectPath( userConfig, finalPath );\n\t\t\tresult = shouldDecodeEncode\n\t\t\t\t? getValueFromVariable( mergedConfig, blockName, rawResult )\n\t\t\t\t: rawResult;\n\t\t\tbreak;\n\t\tcase 'base':\n\t\t\trawResult = getValueFromObjectPath( baseConfig, finalPath );\n\t\t\tresult = shouldDecodeEncode\n\t\t\t\t? getValueFromVariable( baseConfig, blockName, rawResult )\n\t\t\t\t: rawResult;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tthrow 'Unsupported source';\n\t}\n\n\treturn [ result, setStyle ];\n}\n\n/**\n * React hook that overrides a global settings object with block and element specific settings.\n *\n * @param {Object} parentSettings Settings object.\n * @param {blockName?} blockName Block name.\n * @param {element?} element Element name.\n *\n * @return {Object} Merge of settings and supports.\n */\nexport function useSettingsForBlockElement(\n\tparentSettings,\n\tblockName,\n\telement\n) {\n\tconst { supportedStyles, supports } = useSelect(\n\t\t( select ) => {\n\t\t\treturn {\n\t\t\t\tsupportedStyles: unlock(\n\t\t\t\t\tselect( blocksStore )\n\t\t\t\t).getSupportedStyles( blockName, element ),\n\t\t\t\tsupports:\n\t\t\t\t\tselect( blocksStore ).getBlockType( blockName )?.supports,\n\t\t\t};\n\t\t},\n\t\t[ blockName, element ]\n\t);\n\n\treturn useMemo( () => {\n\t\tconst updatedSettings = { ...parentSettings };\n\n\t\tif ( ! supportedStyles.includes( 'fontSize' ) ) {\n\t\t\tupdatedSettings.typography = {\n\t\t\t\t...updatedSettings.typography,\n\t\t\t\tfontSizes: {},\n\t\t\t\tcustomFontSize: false,\n\t\t\t\tdefaultFontSizes: false,\n\t\t\t};\n\t\t}\n\n\t\tif ( ! supportedStyles.includes( 'fontFamily' ) ) {\n\t\t\tupdatedSettings.typography = {\n\t\t\t\t...updatedSettings.typography,\n\t\t\t\tfontFamilies: {},\n\t\t\t};\n\t\t}\n\n\t\tupdatedSettings.color = {\n\t\t\t...updatedSettings.color,\n\t\t\ttext:\n\t\t\t\tupdatedSettings.color?.text &&\n\t\t\t\tsupportedStyles.includes( 'color' ),\n\t\t\tbackground:\n\t\t\t\tupdatedSettings.color?.background &&\n\t\t\t\t( supportedStyles.includes( 'background' ) ||\n\t\t\t\t\tsupportedStyles.includes( 'backgroundColor' ) ),\n\t\t\tbutton:\n\t\t\t\tupdatedSettings.color?.button &&\n\t\t\t\tsupportedStyles.includes( 'buttonColor' ),\n\t\t\theading:\n\t\t\t\tupdatedSettings.color?.heading &&\n\t\t\t\tsupportedStyles.includes( 'headingColor' ),\n\t\t\tlink:\n\t\t\t\tupdatedSettings.color?.link &&\n\t\t\t\tsupportedStyles.includes( 'linkColor' ),\n\t\t\tcaption:\n\t\t\t\tupdatedSettings.color?.caption &&\n\t\t\t\tsupportedStyles.includes( 'captionColor' ),\n\t\t};\n\n\t\t// Some blocks can enable background colors but disable gradients.\n\t\tif ( ! supportedStyles.includes( 'background' ) ) {\n\t\t\tupdatedSettings.color.gradients = [];\n\t\t\tupdatedSettings.color.customGradient = false;\n\t\t}\n\n\t\t// If filters are not supported by the block/element, disable duotone.\n\t\tif ( ! supportedStyles.includes( 'filter' ) ) {\n\t\t\tupdatedSettings.color.defaultDuotone = false;\n\t\t\tupdatedSettings.color.customDuotone = false;\n\t\t}\n\n\t\t[\n\t\t\t'lineHeight',\n\t\t\t'fontStyle',\n\t\t\t'fontWeight',\n\t\t\t'letterSpacing',\n\t\t\t'textAlign',\n\t\t\t'textTransform',\n\t\t\t'textDecoration',\n\t\t\t'writingMode',\n\t\t].forEach( ( key ) => {\n\t\t\tif ( ! supportedStyles.includes( key ) ) {\n\t\t\t\tupdatedSettings.typography = {\n\t\t\t\t\t...updatedSettings.typography,\n\t\t\t\t\t[ key ]: false,\n\t\t\t\t};\n\t\t\t}\n\t\t} );\n\n\t\t// The column-count style is named text column to reduce confusion with\n\t\t// the columns block and manage expectations from the support.\n\t\t// See: https://github.com/WordPress/gutenberg/pull/33587\n\t\tif ( ! supportedStyles.includes( 'columnCount' ) ) {\n\t\t\tupdatedSettings.typography = {\n\t\t\t\t...updatedSettings.typography,\n\t\t\t\ttextColumns: false,\n\t\t\t};\n\t\t}\n\n\t\t[ 'contentSize', 'wideSize' ].forEach( ( key ) => {\n\t\t\tif ( ! supportedStyles.includes( key ) ) {\n\t\t\t\tupdatedSettings.layout = {\n\t\t\t\t\t...updatedSettings.layout,\n\t\t\t\t\t[ key ]: false,\n\t\t\t\t};\n\t\t\t}\n\t\t} );\n\n\t\t[ 'padding', 'margin', 'blockGap' ].forEach( ( key ) => {\n\t\t\tif ( ! supportedStyles.includes( key ) ) {\n\t\t\t\tupdatedSettings.spacing = {\n\t\t\t\t\t...updatedSettings.spacing,\n\t\t\t\t\t[ key ]: false,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tconst sides = Array.isArray( supports?.spacing?.[ key ] )\n\t\t\t\t? supports?.spacing?.[ key ]\n\t\t\t\t: supports?.spacing?.[ key ]?.sides;\n\t\t\t// Check if spacing type is supported before adding sides.\n\t\t\tif ( sides?.length && updatedSettings.spacing?.[ key ] ) {\n\t\t\t\tupdatedSettings.spacing = {\n\t\t\t\t\t...updatedSettings.spacing,\n\t\t\t\t\t[ key ]: {\n\t\t\t\t\t\t...updatedSettings.spacing?.[ key ],\n\t\t\t\t\t\tsides,\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t}\n\t\t} );\n\n\t\t[ 'aspectRatio', 'minHeight' ].forEach( ( key ) => {\n\t\t\tif ( ! supportedStyles.includes( key ) ) {\n\t\t\t\tupdatedSettings.dimensions = {\n\t\t\t\t\t...updatedSettings.dimensions,\n\t\t\t\t\t[ key ]: false,\n\t\t\t\t};\n\t\t\t}\n\t\t} );\n\n\t\t[ 'radius', 'color', 'style', 'width' ].forEach( ( key ) => {\n\t\t\tif (\n\t\t\t\t! supportedStyles.includes(\n\t\t\t\t\t'border' + key.charAt( 0 ).toUpperCase() + key.slice( 1 )\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\tupdatedSettings.border = {\n\t\t\t\t\t...updatedSettings.border,\n\t\t\t\t\t[ key ]: false,\n\t\t\t\t};\n\t\t\t}\n\t\t} );\n\n\t\t[ 'backgroundImage', 'backgroundSize' ].forEach( ( key ) => {\n\t\t\tif ( ! supportedStyles.includes( key ) ) {\n\t\t\t\tupdatedSettings.background = {\n\t\t\t\t\t...updatedSettings.background,\n\t\t\t\t\t[ key ]: false,\n\t\t\t\t};\n\t\t\t}\n\t\t} );\n\n\t\tupdatedSettings.shadow = supportedStyles.includes( 'shadow' )\n\t\t\t? updatedSettings.shadow\n\t\t\t: false;\n\n\t\t// Text alignment is only available for blocks.\n\t\tif ( element ) {\n\t\t\tupdatedSettings.typography.textAlign = false;\n\t\t}\n\n\t\treturn updatedSettings;\n\t}, [ parentSettings, supportedStyles, supports, element ] );\n}\n\nexport function useColorsPerOrigin( settings ) {\n\tconst customColors = settings?.color?.palette?.custom;\n\tconst themeColors = settings?.color?.palette?.theme;\n\tconst defaultColors = settings?.color?.palette?.default;\n\tconst shouldDisplayDefaultColors = settings?.color?.defaultPalette;\n\n\treturn useMemo( () => {\n\t\tconst result = [];\n\t\tif ( themeColors && themeColors.length ) {\n\t\t\tresult.push( {\n\t\t\t\tname: _x(\n\t\t\t\t\t'Theme',\n\t\t\t\t\t'Indicates this palette comes from the theme.'\n\t\t\t\t),\n\t\t\t\tcolors: themeColors,\n\t\t\t} );\n\t\t}\n\t\tif (\n\t\t\tshouldDisplayDefaultColors &&\n\t\t\tdefaultColors &&\n\t\t\tdefaultColors.length\n\t\t) {\n\t\t\tresult.push( {\n\t\t\t\tname: _x(\n\t\t\t\t\t'Default',\n\t\t\t\t\t'Indicates this palette comes from WordPress.'\n\t\t\t\t),\n\t\t\t\tcolors: defaultColors,\n\t\t\t} );\n\t\t}\n\t\tif ( customColors && customColors.length ) {\n\t\t\tresult.push( {\n\t\t\t\tname: _x(\n\t\t\t\t\t'Custom',\n\t\t\t\t\t'Indicates this palette is created by the user.'\n\t\t\t\t),\n\t\t\t\tcolors: customColors,\n\t\t\t} );\n\t\t}\n\t\treturn result;\n\t}, [\n\t\tcustomColors,\n\t\tthemeColors,\n\t\tdefaultColors,\n\t\tshouldDisplayDefaultColors,\n\t] );\n}\n\nexport function useGradientsPerOrigin( settings ) {\n\tconst customGradients = settings?.color?.gradients?.custom;\n\tconst themeGradients = settings?.color?.gradients?.theme;\n\tconst defaultGradients = settings?.color?.gradients?.default;\n\tconst shouldDisplayDefaultGradients = settings?.color?.defaultGradients;\n\n\treturn useMemo( () => {\n\t\tconst result = [];\n\t\tif ( themeGradients && themeGradients.length ) {\n\t\t\tresult.push( {\n\t\t\t\tname: _x(\n\t\t\t\t\t'Theme',\n\t\t\t\t\t'Indicates this palette comes from the theme.'\n\t\t\t\t),\n\t\t\t\tgradients: themeGradients,\n\t\t\t} );\n\t\t}\n\t\tif (\n\t\t\tshouldDisplayDefaultGradients &&\n\t\t\tdefaultGradients &&\n\t\t\tdefaultGradients.length\n\t\t) {\n\t\t\tresult.push( {\n\t\t\t\tname: _x(\n\t\t\t\t\t'Default',\n\t\t\t\t\t'Indicates this palette comes from WordPress.'\n\t\t\t\t),\n\t\t\t\tgradients: defaultGradients,\n\t\t\t} );\n\t\t}\n\t\tif ( customGradients && customGradients.length ) {\n\t\t\tresult.push( {\n\t\t\t\tname: _x(\n\t\t\t\t\t'Custom',\n\t\t\t\t\t'Indicates this palette is created by the user.'\n\t\t\t\t),\n\t\t\t\tgradients: customGradients,\n\t\t\t} );\n\t\t}\n\t\treturn result;\n\t}, [\n\t\tcustomGradients,\n\t\tthemeGradients,\n\t\tdefaultGradients,\n\t\tshouldDisplayDefaultGradients,\n\t] );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,aAAa,MAAM,qBAAqB;;AAE/C;AACA;AACA;AACA,SAASC,UAAU,EAAEC,WAAW,EAAEC,OAAO,QAAQ,oBAAoB;AACrE,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,KAAK,IAAIC,WAAW,QAAQ,mBAAmB;AACxD,SAASC,EAAE,QAAQ,iBAAiB;;AAEpC;AACA;AACA;AACA,SAASC,oBAAoB,EAAEC,0BAA0B,QAAQ,SAAS;AAC1E,SAASC,sBAAsB,EAAEC,YAAY,QAAQ,oBAAoB;AACzE,SAASC,mBAAmB,QAAQ,WAAW;AAC/C,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IACJ;IACA,IACCE,6BAA6B,IAC7BD,gBAAgB,IAChBA,gBAAgB,CAACxB,MAAM,EACtB;MACDvD,MAAM,CAACyE,IAAI,CAAE;QACZC,IAAI,EAAEvG,EAAE,CACP,SAAS,EACT,8CACD,CAAC;QACDyE,SAAS,EAAEmC;MACZ,CAAE,CAAC;IACJ;IACA,IAAKF,eAAe,IAAIA,eAAe,CAACtB,MAAM,EAAG;MAChDvD,MAAM,CAACyE,IAAI,CAAE;QACZC,IAAI,EAAEvG,EAAE,CACP,QAAQ,EACR,gDACD,CAAC;QACDyE,SAAS,EAAEiC;MACZ,CAAE,CAAC;IACJ;IACA,OAAO7E,MAAM;EACd,CAAC,EAAE,CACF6E,eAAe,EACfC,cAAc,EACdC,gBAAgB,EAChBC,6BAA6B,CAC5B,CAAC;AACJ","ignoreList":[]}
@@ -8,8 +8,7 @@ import { __, _x } from '@wordpress/i18n';
8
8
  * Internal dependencies
9
9
  */
10
10
  import { useToolsPanelDropdownMenuProps } from './utils';
11
- import { jsx as _jsx } from "react/jsx-runtime";
12
- import { Fragment as _Fragment } from "react/jsx-runtime";
11
+ import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
13
12
  export function useHasImageSettingsPanel(name, value, inheritedValue) {
14
13
  // Note: If lightbox `value` exists, that means it was
15
14
  // defined via the the Global Styles UI and will NOT