@wordpress/block-editor 14.12.0 → 14.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (940) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/autocompleters/block.js +0 -1
  3. package/build/autocompleters/block.js.map +1 -1
  4. package/build/autocompleters/link.js +0 -1
  5. package/build/autocompleters/link.js.map +1 -1
  6. package/build/components/alignment-control/ui.js +0 -1
  7. package/build/components/alignment-control/ui.js.map +1 -1
  8. package/build/components/autocomplete/index.js +0 -1
  9. package/build/components/autocomplete/index.js.map +1 -1
  10. package/build/components/background-image-control/index.js +0 -1
  11. package/build/components/background-image-control/index.js.map +1 -1
  12. package/build/components/block-actions/index.js +0 -1
  13. package/build/components/block-actions/index.js.map +1 -1
  14. package/build/components/block-alignment-control/ui.js +0 -1
  15. package/build/components/block-alignment-control/ui.js.map +1 -1
  16. package/build/components/block-alignment-control/ui.native.js +0 -1
  17. package/build/components/block-alignment-control/ui.native.js.map +1 -1
  18. package/build/components/block-alignment-control/use-available-alignments.js +0 -1
  19. package/build/components/block-alignment-control/use-available-alignments.js.map +1 -1
  20. package/build/components/block-breadcrumb/index.js +0 -1
  21. package/build/components/block-breadcrumb/index.js.map +1 -1
  22. package/build/components/block-compare/index.js +0 -1
  23. package/build/components/block-compare/index.js.map +1 -1
  24. package/build/components/block-controls/fill.js +0 -1
  25. package/build/components/block-controls/fill.js.map +1 -1
  26. package/build/components/block-edit/edit.js +0 -1
  27. package/build/components/block-edit/edit.js.map +1 -1
  28. package/build/components/block-edit/edit.native.js +0 -1
  29. package/build/components/block-edit/edit.native.js.map +1 -1
  30. package/build/components/block-heading-level-dropdown/index.js +0 -1
  31. package/build/components/block-heading-level-dropdown/index.js.map +1 -1
  32. package/build/components/block-heading-level-dropdown/index.native.js +0 -1
  33. package/build/components/block-heading-level-dropdown/index.native.js.map +1 -1
  34. package/build/components/block-inspector/index.js +0 -1
  35. package/build/components/block-inspector/index.js.map +1 -1
  36. package/build/components/block-list/block-invalid-warning.js +0 -1
  37. package/build/components/block-list/block-invalid-warning.js.map +1 -1
  38. package/build/components/block-list/block-list-context.native.js +0 -1
  39. package/build/components/block-list/block-list-context.native.js.map +1 -1
  40. package/build/components/block-list/block.js +0 -1
  41. package/build/components/block-list/block.js.map +1 -1
  42. package/build/components/block-list/block.native.js +0 -1
  43. package/build/components/block-list/block.native.js.map +1 -1
  44. package/build/components/block-list/index.js +9 -6
  45. package/build/components/block-list/index.js.map +1 -1
  46. package/build/components/block-list/index.native.js +0 -1
  47. package/build/components/block-list/index.native.js.map +1 -1
  48. package/build/components/block-list/use-block-props/use-focus-first-element.js +0 -1
  49. package/build/components/block-list/use-block-props/use-focus-first-element.js.map +1 -1
  50. package/build/components/block-list/use-in-between-inserter.js +0 -1
  51. package/build/components/block-list/use-in-between-inserter.js.map +1 -1
  52. package/build/components/block-lock/modal.js +0 -1
  53. package/build/components/block-lock/modal.js.map +1 -1
  54. package/build/components/block-manager/category.js +0 -1
  55. package/build/components/block-manager/category.js.map +1 -1
  56. package/build/components/block-manager/checklist.js +0 -1
  57. package/build/components/block-manager/checklist.js.map +1 -1
  58. package/build/components/block-manager/index.js +0 -1
  59. package/build/components/block-manager/index.js.map +1 -1
  60. package/build/components/block-media-update-progress/index.native.js +0 -1
  61. package/build/components/block-media-update-progress/index.native.js.map +1 -1
  62. package/build/components/block-mover/index.native.js +0 -1
  63. package/build/components/block-mover/index.native.js.map +1 -1
  64. package/build/components/block-mover/mover-description.native.js +0 -1
  65. package/build/components/block-mover/mover-description.native.js.map +1 -1
  66. package/build/components/block-pattern-setup/index.js +0 -1
  67. package/build/components/block-pattern-setup/index.js.map +1 -1
  68. package/build/components/block-pattern-setup/use-patterns-setup.js +0 -1
  69. package/build/components/block-pattern-setup/use-patterns-setup.js.map +1 -1
  70. package/build/components/block-patterns-list/index.js +0 -1
  71. package/build/components/block-patterns-list/index.js.map +1 -1
  72. package/build/components/block-popover/use-popover-scroll.js +13 -7
  73. package/build/components/block-popover/use-popover-scroll.js.map +1 -1
  74. package/build/components/block-quick-navigation/index.js +0 -1
  75. package/build/components/block-quick-navigation/index.js.map +1 -1
  76. package/build/components/block-rename/modal.js +0 -1
  77. package/build/components/block-rename/modal.js.map +1 -1
  78. package/build/components/block-settings-menu/block-settings-dropdown.js +0 -1
  79. package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  80. package/build/components/block-styles/index.js +0 -1
  81. package/build/components/block-styles/index.js.map +1 -1
  82. package/build/components/block-styles/index.native.js +0 -1
  83. package/build/components/block-styles/index.native.js.map +1 -1
  84. package/build/components/block-styles/menu-items.js +0 -1
  85. package/build/components/block-styles/menu-items.js.map +1 -1
  86. package/build/components/block-styles/preview.native.js +0 -1
  87. package/build/components/block-styles/preview.native.js.map +1 -1
  88. package/build/components/block-switcher/block-transformations-menu.js +0 -1
  89. package/build/components/block-switcher/block-transformations-menu.js.map +1 -1
  90. package/build/components/block-switcher/block-transformations-menu.native.js +0 -1
  91. package/build/components/block-switcher/block-transformations-menu.native.js.map +1 -1
  92. package/build/components/block-switcher/block-variation-transformations.js +0 -1
  93. package/build/components/block-switcher/block-variation-transformations.js.map +1 -1
  94. package/build/components/block-switcher/index.js +0 -1
  95. package/build/components/block-switcher/index.js.map +1 -1
  96. package/build/components/block-switcher/pattern-transformations-menu.js +0 -1
  97. package/build/components/block-switcher/pattern-transformations-menu.js.map +1 -1
  98. package/build/components/block-switcher/use-transformed-patterns.js +0 -1
  99. package/build/components/block-switcher/use-transformed-patterns.js.map +1 -1
  100. package/build/components/block-switcher/utils.js +0 -1
  101. package/build/components/block-switcher/utils.js.map +1 -1
  102. package/build/components/block-toolbar/block-toolbar-menu.native.js +0 -1
  103. package/build/components/block-toolbar/block-toolbar-menu.native.js.map +1 -1
  104. package/build/components/block-toolbar/change-design.js +0 -1
  105. package/build/components/block-toolbar/change-design.js.map +1 -1
  106. package/build/components/block-toolbar/index.js +0 -1
  107. package/build/components/block-toolbar/index.js.map +1 -1
  108. package/build/components/block-tools/block-toolbar-popover.js +3 -2
  109. package/build/components/block-tools/block-toolbar-popover.js.map +1 -1
  110. package/build/components/block-tools/use-selected-block-tool-props.js +0 -1
  111. package/build/components/block-tools/use-selected-block-tool-props.js.map +1 -1
  112. package/build/components/block-types-list/index.js +0 -1
  113. package/build/components/block-types-list/index.js.map +1 -1
  114. package/build/components/block-variation-picker/index.js +0 -1
  115. package/build/components/block-variation-picker/index.js.map +1 -1
  116. package/build/components/block-variation-picker/index.native.js +0 -1
  117. package/build/components/block-variation-picker/index.native.js.map +1 -1
  118. package/build/components/block-variation-transforms/index.js +0 -1
  119. package/build/components/block-variation-transforms/index.js.map +1 -1
  120. package/build/components/block-vertical-alignment-control/ui.js +0 -1
  121. package/build/components/block-vertical-alignment-control/ui.js.map +1 -1
  122. package/build/components/border-radius-control/index.js +0 -1
  123. package/build/components/border-radius-control/index.js.map +1 -1
  124. package/build/components/border-radius-control/input-controls.js +0 -1
  125. package/build/components/border-radius-control/input-controls.js.map +1 -1
  126. package/build/components/border-radius-control/utils.js +0 -1
  127. package/build/components/border-radius-control/utils.js.map +1 -1
  128. package/build/components/colors/utils.js +0 -1
  129. package/build/components/colors/utils.js.map +1 -1
  130. package/build/components/colors/with-colors.js +0 -1
  131. package/build/components/colors/with-colors.js.map +1 -1
  132. package/build/components/colors-gradients/dropdown.js +0 -1
  133. package/build/components/colors-gradients/dropdown.js.map +1 -1
  134. package/build/components/colors-gradients/panel-color-gradient-settings.js +0 -1
  135. package/build/components/colors-gradients/panel-color-gradient-settings.js.map +1 -1
  136. package/build/components/colors-gradients/panel-color-gradient-settings.native.js +0 -1
  137. package/build/components/colors-gradients/panel-color-gradient-settings.native.js.map +1 -1
  138. package/build/components/convert-to-group-buttons/toolbar.js +0 -1
  139. package/build/components/convert-to-group-buttons/toolbar.js.map +1 -1
  140. package/build/components/date-format-picker/index.js +0 -1
  141. package/build/components/date-format-picker/index.js.map +1 -1
  142. package/build/components/dimensions-tool/scale-tool.js +0 -1
  143. package/build/components/dimensions-tool/scale-tool.js.map +1 -1
  144. package/build/components/duotone/utils.js +0 -1
  145. package/build/components/duotone/utils.js.map +1 -1
  146. package/build/components/editor-styles/index.js +0 -1
  147. package/build/components/editor-styles/index.js.map +1 -1
  148. package/build/components/font-appearance-control/index.js +0 -1
  149. package/build/components/font-appearance-control/index.js.map +1 -1
  150. package/build/components/font-family/index.js +0 -1
  151. package/build/components/font-family/index.js.map +1 -1
  152. package/build/components/font-sizes/with-font-sizes.js +0 -1
  153. package/build/components/font-sizes/with-font-sizes.js.map +1 -1
  154. package/build/components/global-styles/border-panel.js +0 -1
  155. package/build/components/global-styles/border-panel.js.map +1 -1
  156. package/build/components/global-styles/color-panel.js +0 -1
  157. package/build/components/global-styles/color-panel.js.map +1 -1
  158. package/build/components/global-styles/color-panel.native.js +0 -1
  159. package/build/components/global-styles/color-panel.native.js.map +1 -1
  160. package/build/components/global-styles/dimensions-panel.js +0 -1
  161. package/build/components/global-styles/dimensions-panel.js.map +1 -1
  162. package/build/components/global-styles/filters-panel.js +42 -25
  163. package/build/components/global-styles/filters-panel.js.map +1 -1
  164. package/build/components/global-styles/get-global-styles-changes.js +0 -1
  165. package/build/components/global-styles/get-global-styles-changes.js.map +1 -1
  166. package/build/components/global-styles/shadow-panel-components.js +41 -17
  167. package/build/components/global-styles/shadow-panel-components.js.map +1 -1
  168. package/build/components/global-styles/typography-utils.js +0 -1
  169. package/build/components/global-styles/typography-utils.js.map +1 -1
  170. package/build/components/global-styles/use-global-styles-context.native.js +0 -1
  171. package/build/components/global-styles/use-global-styles-context.native.js.map +1 -1
  172. package/build/components/global-styles/use-global-styles-output.js +0 -1
  173. package/build/components/global-styles/use-global-styles-output.js.map +1 -1
  174. package/build/components/global-styles/utils.js +0 -1
  175. package/build/components/global-styles/utils.js.map +1 -1
  176. package/build/components/grid/grid-visualizer.js +0 -1
  177. package/build/components/grid/grid-visualizer.js.map +1 -1
  178. package/build/components/grid/use-grid-layout-sync.js +0 -1
  179. package/build/components/grid/use-grid-layout-sync.js.map +1 -1
  180. package/build/components/grid/utils.js +0 -1
  181. package/build/components/grid/utils.js.map +1 -1
  182. package/build/components/iframe/get-compatibility-styles.js +0 -1
  183. package/build/components/iframe/get-compatibility-styles.js.map +1 -1
  184. package/build/components/image-editor/aspect-ratio-dropdown.js +1 -2
  185. package/build/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
  186. package/build/components/inner-blocks/index.js +2 -2
  187. package/build/components/inner-blocks/index.js.map +1 -1
  188. package/build/components/inner-blocks/index.native.js +2 -2
  189. package/build/components/inner-blocks/index.native.js.map +1 -1
  190. package/build/components/inner-blocks/use-block-context.js +0 -1
  191. package/build/components/inner-blocks/use-block-context.js.map +1 -1
  192. package/build/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js +0 -1
  193. package/build/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js.map +1 -1
  194. package/build/components/inserter/block-patterns-explorer/pattern-list.js +0 -1
  195. package/build/components/inserter/block-patterns-explorer/pattern-list.js.map +1 -1
  196. package/build/components/inserter/block-patterns-tab/pattern-category-previews.js +0 -1
  197. package/build/components/inserter/block-patterns-tab/pattern-category-previews.js.map +1 -1
  198. package/build/components/inserter/block-patterns-tab/use-pattern-categories.js +0 -1
  199. package/build/components/inserter/block-patterns-tab/use-pattern-categories.js.map +1 -1
  200. package/build/components/inserter/block-types-tab.js +0 -1
  201. package/build/components/inserter/block-types-tab.js.map +1 -1
  202. package/build/components/inserter/block-types-tab.native.js +0 -1
  203. package/build/components/inserter/block-types-tab.native.js.map +1 -1
  204. package/build/components/inserter/category-tabs/index.js +0 -1
  205. package/build/components/inserter/category-tabs/index.js.map +1 -1
  206. package/build/components/inserter/hooks/use-block-type-impressions.native.js +0 -1
  207. package/build/components/inserter/hooks/use-block-type-impressions.native.js.map +1 -1
  208. package/build/components/inserter/hooks/use-patterns-state.js +0 -1
  209. package/build/components/inserter/hooks/use-patterns-state.js.map +1 -1
  210. package/build/components/inserter/index.js +0 -1
  211. package/build/components/inserter/index.js.map +1 -1
  212. package/build/components/inserter/index.native.js +0 -1
  213. package/build/components/inserter/index.native.js.map +1 -1
  214. package/build/components/inserter/media-tab/hooks.js +0 -1
  215. package/build/components/inserter/media-tab/hooks.js.map +1 -1
  216. package/build/components/inserter/media-tab/media-list.js +0 -1
  217. package/build/components/inserter/media-tab/media-list.js.map +1 -1
  218. package/build/components/inserter/media-tab/media-tab.js +0 -1
  219. package/build/components/inserter/media-tab/media-tab.js.map +1 -1
  220. package/build/components/inserter/mobile-tab-navigation.js +0 -1
  221. package/build/components/inserter/mobile-tab-navigation.js.map +1 -1
  222. package/build/components/inserter/no-results.js +3 -7
  223. package/build/components/inserter/no-results.js.map +1 -1
  224. package/build/components/inserter/quick-inserter.js +2 -1
  225. package/build/components/inserter/quick-inserter.js.map +1 -1
  226. package/build/components/inserter/search-items.js +0 -1
  227. package/build/components/inserter/search-items.js.map +1 -1
  228. package/build/components/inserter/search-results.js +1 -2
  229. package/build/components/inserter/search-results.js.map +1 -1
  230. package/build/components/inserter/tabs.native.js +0 -1
  231. package/build/components/inserter/tabs.native.js.map +1 -1
  232. package/build/components/inserter/utils.native.js +0 -1
  233. package/build/components/inserter/utils.native.js.map +1 -1
  234. package/build/components/inspector-controls/block-support-tools-panel.js +0 -1
  235. package/build/components/inspector-controls/block-support-tools-panel.js.map +1 -1
  236. package/build/components/inspector-controls/fill.js +0 -1
  237. package/build/components/inspector-controls/fill.js.map +1 -1
  238. package/build/components/inspector-controls-tabs/index.js +0 -1
  239. package/build/components/inspector-controls-tabs/index.js.map +1 -1
  240. package/build/components/inspector-popover-header/index.js +0 -1
  241. package/build/components/inspector-popover-header/index.js.map +1 -1
  242. package/build/components/justify-content-control/ui.js +0 -1
  243. package/build/components/justify-content-control/ui.js.map +1 -1
  244. package/build/components/keyboard-shortcuts/index.js +1 -1
  245. package/build/components/keyboard-shortcuts/index.js.map +1 -1
  246. package/build/components/link-control/index.js +0 -1
  247. package/build/components/link-control/index.js.map +1 -1
  248. package/build/components/link-control/search-results.js +0 -1
  249. package/build/components/link-control/search-results.js.map +1 -1
  250. package/build/components/link-control/settings.js +0 -1
  251. package/build/components/link-control/settings.js.map +1 -1
  252. package/build/components/link-control/use-internal-value.js +0 -1
  253. package/build/components/link-control/use-internal-value.js.map +1 -1
  254. package/build/components/link-control/use-search-handler.js +0 -1
  255. package/build/components/link-control/use-search-handler.js.map +1 -1
  256. package/build/components/list-view/block-select-button.js +0 -1
  257. package/build/components/list-view/block-select-button.js.map +1 -1
  258. package/build/components/list-view/block.js +0 -1
  259. package/build/components/list-view/block.js.map +1 -1
  260. package/build/components/list-view/branch.js +0 -1
  261. package/build/components/list-view/branch.js.map +1 -1
  262. package/build/components/list-view/index.js +0 -1
  263. package/build/components/list-view/index.js.map +1 -1
  264. package/build/components/list-view/use-block-selection.js +0 -1
  265. package/build/components/list-view/use-block-selection.js.map +1 -1
  266. package/build/components/list-view/use-clipboard-handler.js +0 -1
  267. package/build/components/list-view/use-clipboard-handler.js.map +1 -1
  268. package/build/components/list-view/use-list-view-block-indexes.js +0 -1
  269. package/build/components/list-view/use-list-view-block-indexes.js.map +1 -1
  270. package/build/components/list-view/use-list-view-drop-zone.js +0 -1
  271. package/build/components/list-view/use-list-view-drop-zone.js.map +1 -1
  272. package/build/components/list-view/utils.js +0 -1
  273. package/build/components/list-view/utils.js.map +1 -1
  274. package/build/components/media-placeholder/index.js +0 -1
  275. package/build/components/media-placeholder/index.js.map +1 -1
  276. package/build/components/media-placeholder/index.native.js +0 -1
  277. package/build/components/media-placeholder/index.native.js.map +1 -1
  278. package/build/components/media-replace-flow/index.js +0 -1
  279. package/build/components/media-replace-flow/index.js.map +1 -1
  280. package/build/components/media-upload/index.native.js +0 -1
  281. package/build/components/media-upload/index.native.js.map +1 -1
  282. package/build/components/navigable-toolbar/index.js +0 -1
  283. package/build/components/navigable-toolbar/index.js.map +1 -1
  284. package/build/components/panel-color-settings/index.js +0 -1
  285. package/build/components/panel-color-settings/index.js.map +1 -1
  286. package/build/components/provider/use-block-sync.js +0 -1
  287. package/build/components/provider/use-block-sync.js.map +1 -1
  288. package/build/components/responsive-block-control/index.js +0 -1
  289. package/build/components/responsive-block-control/index.js.map +1 -1
  290. package/build/components/rich-text/embed-handler-picker.native.js +0 -1
  291. package/build/components/rich-text/embed-handler-picker.native.js.map +1 -1
  292. package/build/components/rich-text/event-listeners/before-input-rules.js +0 -1
  293. package/build/components/rich-text/event-listeners/before-input-rules.js.map +1 -1
  294. package/build/components/rich-text/event-listeners/delete.js +5 -3
  295. package/build/components/rich-text/event-listeners/delete.js.map +1 -1
  296. package/build/components/rich-text/event-listeners/index.js +0 -1
  297. package/build/components/rich-text/event-listeners/index.js.map +1 -1
  298. package/build/components/rich-text/event-listeners/input-rules.js +0 -1
  299. package/build/components/rich-text/event-listeners/input-rules.js.map +1 -1
  300. package/build/components/rich-text/event-listeners/paste-handler.js +0 -1
  301. package/build/components/rich-text/event-listeners/paste-handler.js.map +1 -1
  302. package/build/components/rich-text/file-paste-handler.native.js +0 -1
  303. package/build/components/rich-text/file-paste-handler.native.js.map +1 -1
  304. package/build/components/rich-text/format-edit.js +0 -1
  305. package/build/components/rich-text/format-edit.js.map +1 -1
  306. package/build/components/rich-text/format-toolbar/index.js +0 -1
  307. package/build/components/rich-text/format-toolbar/index.js.map +1 -1
  308. package/build/components/rich-text/index.js +0 -1
  309. package/build/components/rich-text/index.js.map +1 -1
  310. package/build/components/rich-text/index.native.js +0 -1
  311. package/build/components/rich-text/index.native.js.map +1 -1
  312. package/build/components/rich-text/multiline.js +0 -1
  313. package/build/components/rich-text/multiline.js.map +1 -1
  314. package/build/components/rich-text/native/format-edit.js +0 -1
  315. package/build/components/rich-text/native/format-edit.js.map +1 -1
  316. package/build/components/rich-text/native/get-format-colors.native.js +0 -1
  317. package/build/components/rich-text/native/get-format-colors.native.js.map +1 -1
  318. package/build/components/rich-text/native/index.native.js +0 -1
  319. package/build/components/rich-text/native/index.native.js.map +1 -1
  320. package/build/components/rich-text/native/toolbar-button-with-options.native.js +0 -1
  321. package/build/components/rich-text/native/toolbar-button-with-options.native.js.map +1 -1
  322. package/build/components/rich-text/native/use-format-types.js +0 -1
  323. package/build/components/rich-text/native/use-format-types.js.map +1 -1
  324. package/build/components/rich-text/use-format-types.js +0 -1
  325. package/build/components/rich-text/use-format-types.js.map +1 -1
  326. package/build/components/spacing-sizes-control/hooks/use-spacing-sizes.js +0 -1
  327. package/build/components/spacing-sizes-control/hooks/use-spacing-sizes.js.map +1 -1
  328. package/build/components/spacing-sizes-control/input-controls/axial.js +0 -1
  329. package/build/components/spacing-sizes-control/input-controls/axial.js.map +1 -1
  330. package/build/components/spacing-sizes-control/input-controls/separated.js +0 -1
  331. package/build/components/spacing-sizes-control/input-controls/separated.js.map +1 -1
  332. package/build/components/spacing-sizes-control/input-controls/single.js +0 -1
  333. package/build/components/spacing-sizes-control/input-controls/single.js.map +1 -1
  334. package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js +0 -1
  335. package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
  336. package/build/components/spacing-sizes-control/utils.js +0 -1
  337. package/build/components/spacing-sizes-control/utils.js.map +1 -1
  338. package/build/components/tabbed-sidebar/index.js +0 -1
  339. package/build/components/tabbed-sidebar/index.js.map +1 -1
  340. package/build/components/text-alignment-control/index.js +0 -1
  341. package/build/components/text-alignment-control/index.js.map +1 -1
  342. package/build/components/text-decoration-control/index.js +0 -1
  343. package/build/components/text-decoration-control/index.js.map +1 -1
  344. package/build/components/text-transform-control/index.js +0 -1
  345. package/build/components/text-transform-control/index.js.map +1 -1
  346. package/build/components/unsupported-block-details/index.native.js +0 -1
  347. package/build/components/unsupported-block-details/index.native.js.map +1 -1
  348. package/build/components/url-input/index.js +0 -1
  349. package/build/components/url-input/index.js.map +1 -1
  350. package/build/components/url-popover/image-url-input-ui.js +0 -1
  351. package/build/components/url-popover/image-url-input-ui.js.map +1 -1
  352. package/build/components/use-block-commands/index.js +0 -1
  353. package/build/components/use-block-commands/index.js.map +1 -1
  354. package/build/components/use-block-drop-zone/index.js +0 -1
  355. package/build/components/use-block-drop-zone/index.js.map +1 -1
  356. package/build/components/use-block-drop-zone/index.native.js +0 -1
  357. package/build/components/use-block-drop-zone/index.native.js.map +1 -1
  358. package/build/components/use-flash-editable-blocks/index.js +0 -1
  359. package/build/components/use-flash-editable-blocks/index.js.map +1 -1
  360. package/build/components/use-on-block-drop/index.js +0 -1
  361. package/build/components/use-on-block-drop/index.js.map +1 -1
  362. package/build/components/use-on-block-drop/index.native.js +0 -1
  363. package/build/components/use-on-block-drop/index.native.js.map +1 -1
  364. package/build/components/use-paste-styles/index.js +0 -1
  365. package/build/components/use-paste-styles/index.js.map +1 -1
  366. package/build/components/warning/index.js +0 -1
  367. package/build/components/warning/index.js.map +1 -1
  368. package/build/components/writing-flow/use-arrow-nav.js +0 -1
  369. package/build/components/writing-flow/use-arrow-nav.js.map +1 -1
  370. package/build/components/writing-flow/use-clipboard-handler.js +0 -1
  371. package/build/components/writing-flow/use-clipboard-handler.js.map +1 -1
  372. package/build/components/writing-flow/use-input.js +0 -1
  373. package/build/components/writing-flow/use-input.js.map +1 -1
  374. package/build/components/writing-flow/use-tab-nav.js +3 -1
  375. package/build/components/writing-flow/use-tab-nav.js.map +1 -1
  376. package/build/components/writing-flow/utils.js +0 -1
  377. package/build/components/writing-flow/utils.js.map +1 -1
  378. package/build/components/writing-mode-control/index.js +0 -1
  379. package/build/components/writing-mode-control/index.js.map +1 -1
  380. package/build/hooks/align.js +0 -1
  381. package/build/hooks/align.js.map +1 -1
  382. package/build/hooks/align.native.js +0 -1
  383. package/build/hooks/align.native.js.map +1 -1
  384. package/build/hooks/aria-label.js +3 -8
  385. package/build/hooks/aria-label.js.map +1 -1
  386. package/build/hooks/block-bindings.js +0 -1
  387. package/build/hooks/block-bindings.js.map +1 -1
  388. package/build/hooks/block-hooks.js +0 -1
  389. package/build/hooks/block-hooks.js.map +1 -1
  390. package/build/hooks/block-style-variation.js +0 -1
  391. package/build/hooks/block-style-variation.js.map +1 -1
  392. package/build/hooks/border.js +0 -1
  393. package/build/hooks/border.js.map +1 -1
  394. package/build/hooks/contrast-checker.js +0 -1
  395. package/build/hooks/contrast-checker.js.map +1 -1
  396. package/build/hooks/duotone.js +0 -1
  397. package/build/hooks/duotone.js.map +1 -1
  398. package/build/hooks/index.js +0 -1
  399. package/build/hooks/index.js.map +1 -1
  400. package/build/hooks/layout.js +0 -1
  401. package/build/hooks/layout.js.map +1 -1
  402. package/build/hooks/position.js +0 -1
  403. package/build/hooks/position.js.map +1 -1
  404. package/build/hooks/style.js +0 -1
  405. package/build/hooks/style.js.map +1 -1
  406. package/build/hooks/supports.js +0 -1
  407. package/build/hooks/supports.js.map +1 -1
  408. package/build/hooks/text-align.js +0 -1
  409. package/build/hooks/text-align.js.map +1 -1
  410. package/build/hooks/typography.js +0 -1
  411. package/build/hooks/typography.js.map +1 -1
  412. package/build/hooks/utils.js +0 -1
  413. package/build/hooks/utils.js.map +1 -1
  414. package/build/layouts/constrained.js +0 -1
  415. package/build/layouts/constrained.js.map +1 -1
  416. package/build/layouts/flex.js +0 -1
  417. package/build/layouts/flex.js.map +1 -1
  418. package/build/layouts/flow.js +0 -1
  419. package/build/layouts/flow.js.map +1 -1
  420. package/build/layouts/index.js +0 -1
  421. package/build/layouts/index.js.map +1 -1
  422. package/build/layouts/utils.js +0 -1
  423. package/build/layouts/utils.js.map +1 -1
  424. package/build/store/actions.js +0 -1
  425. package/build/store/actions.js.map +1 -1
  426. package/build/store/get-block-settings.js +0 -1
  427. package/build/store/get-block-settings.js.map +1 -1
  428. package/build/store/private-actions.js +0 -1
  429. package/build/store/private-actions.js.map +1 -1
  430. package/build/store/private-selectors.js +0 -1
  431. package/build/store/private-selectors.js.map +1 -1
  432. package/build/store/reducer.js +0 -1
  433. package/build/store/reducer.js.map +1 -1
  434. package/build/store/selectors.js +0 -1
  435. package/build/store/selectors.js.map +1 -1
  436. package/build/store/utils.js +0 -1
  437. package/build/store/utils.js.map +1 -1
  438. package/build/utils/block-bindings.js +0 -1
  439. package/build/utils/block-bindings.js.map +1 -1
  440. package/build/utils/get-editor-region.js +0 -1
  441. package/build/utils/get-editor-region.js.map +1 -1
  442. package/build/utils/get-font-styles-and-weights.js +0 -1
  443. package/build/utils/get-font-styles-and-weights.js.map +1 -1
  444. package/build/utils/math.js +0 -1
  445. package/build/utils/math.js.map +1 -1
  446. package/build/utils/object.js +0 -1
  447. package/build/utils/object.js.map +1 -1
  448. package/build/utils/selection.js +0 -1
  449. package/build/utils/selection.js.map +1 -1
  450. package/build/utils/transform-styles/index.js +0 -1
  451. package/build/utils/transform-styles/index.js.map +1 -1
  452. package/build-module/autocompleters/block.js +0 -1
  453. package/build-module/autocompleters/block.js.map +1 -1
  454. package/build-module/autocompleters/link.js +0 -1
  455. package/build-module/autocompleters/link.js.map +1 -1
  456. package/build-module/components/alignment-control/ui.js +0 -1
  457. package/build-module/components/alignment-control/ui.js.map +1 -1
  458. package/build-module/components/autocomplete/index.js +0 -1
  459. package/build-module/components/autocomplete/index.js.map +1 -1
  460. package/build-module/components/background-image-control/index.js +0 -1
  461. package/build-module/components/background-image-control/index.js.map +1 -1
  462. package/build-module/components/block-actions/index.js +0 -1
  463. package/build-module/components/block-actions/index.js.map +1 -1
  464. package/build-module/components/block-alignment-control/ui.js +0 -1
  465. package/build-module/components/block-alignment-control/ui.js.map +1 -1
  466. package/build-module/components/block-alignment-control/ui.native.js +0 -1
  467. package/build-module/components/block-alignment-control/ui.native.js.map +1 -1
  468. package/build-module/components/block-alignment-control/use-available-alignments.js +0 -1
  469. package/build-module/components/block-alignment-control/use-available-alignments.js.map +1 -1
  470. package/build-module/components/block-breadcrumb/index.js +0 -1
  471. package/build-module/components/block-breadcrumb/index.js.map +1 -1
  472. package/build-module/components/block-compare/index.js +0 -1
  473. package/build-module/components/block-compare/index.js.map +1 -1
  474. package/build-module/components/block-controls/fill.js +0 -1
  475. package/build-module/components/block-controls/fill.js.map +1 -1
  476. package/build-module/components/block-edit/edit.js +0 -1
  477. package/build-module/components/block-edit/edit.js.map +1 -1
  478. package/build-module/components/block-edit/edit.native.js +0 -1
  479. package/build-module/components/block-edit/edit.native.js.map +1 -1
  480. package/build-module/components/block-heading-level-dropdown/index.js +0 -1
  481. package/build-module/components/block-heading-level-dropdown/index.js.map +1 -1
  482. package/build-module/components/block-heading-level-dropdown/index.native.js +0 -1
  483. package/build-module/components/block-heading-level-dropdown/index.native.js.map +1 -1
  484. package/build-module/components/block-inspector/index.js +0 -1
  485. package/build-module/components/block-inspector/index.js.map +1 -1
  486. package/build-module/components/block-list/block-invalid-warning.js +0 -1
  487. package/build-module/components/block-list/block-invalid-warning.js.map +1 -1
  488. package/build-module/components/block-list/block-list-context.native.js +0 -1
  489. package/build-module/components/block-list/block-list-context.native.js.map +1 -1
  490. package/build-module/components/block-list/block.js +0 -1
  491. package/build-module/components/block-list/block.js.map +1 -1
  492. package/build-module/components/block-list/block.native.js +0 -1
  493. package/build-module/components/block-list/block.native.js.map +1 -1
  494. package/build-module/components/block-list/index.js +9 -6
  495. package/build-module/components/block-list/index.js.map +1 -1
  496. package/build-module/components/block-list/index.native.js +0 -1
  497. package/build-module/components/block-list/index.native.js.map +1 -1
  498. package/build-module/components/block-list/use-block-props/use-focus-first-element.js +0 -1
  499. package/build-module/components/block-list/use-block-props/use-focus-first-element.js.map +1 -1
  500. package/build-module/components/block-list/use-in-between-inserter.js +0 -1
  501. package/build-module/components/block-list/use-in-between-inserter.js.map +1 -1
  502. package/build-module/components/block-lock/modal.js +0 -1
  503. package/build-module/components/block-lock/modal.js.map +1 -1
  504. package/build-module/components/block-manager/category.js +0 -1
  505. package/build-module/components/block-manager/category.js.map +1 -1
  506. package/build-module/components/block-manager/checklist.js +0 -1
  507. package/build-module/components/block-manager/checklist.js.map +1 -1
  508. package/build-module/components/block-manager/index.js +0 -1
  509. package/build-module/components/block-manager/index.js.map +1 -1
  510. package/build-module/components/block-media-update-progress/index.native.js +0 -1
  511. package/build-module/components/block-media-update-progress/index.native.js.map +1 -1
  512. package/build-module/components/block-mover/index.native.js +0 -1
  513. package/build-module/components/block-mover/index.native.js.map +1 -1
  514. package/build-module/components/block-mover/mover-description.native.js +0 -1
  515. package/build-module/components/block-mover/mover-description.native.js.map +1 -1
  516. package/build-module/components/block-pattern-setup/index.js +0 -1
  517. package/build-module/components/block-pattern-setup/index.js.map +1 -1
  518. package/build-module/components/block-pattern-setup/use-patterns-setup.js +0 -1
  519. package/build-module/components/block-pattern-setup/use-patterns-setup.js.map +1 -1
  520. package/build-module/components/block-patterns-list/index.js +0 -1
  521. package/build-module/components/block-patterns-list/index.js.map +1 -1
  522. package/build-module/components/block-popover/use-popover-scroll.js +12 -7
  523. package/build-module/components/block-popover/use-popover-scroll.js.map +1 -1
  524. package/build-module/components/block-quick-navigation/index.js +0 -1
  525. package/build-module/components/block-quick-navigation/index.js.map +1 -1
  526. package/build-module/components/block-rename/modal.js +0 -1
  527. package/build-module/components/block-rename/modal.js.map +1 -1
  528. package/build-module/components/block-settings-menu/block-settings-dropdown.js +0 -1
  529. package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  530. package/build-module/components/block-styles/index.js +0 -1
  531. package/build-module/components/block-styles/index.js.map +1 -1
  532. package/build-module/components/block-styles/index.native.js +0 -1
  533. package/build-module/components/block-styles/index.native.js.map +1 -1
  534. package/build-module/components/block-styles/menu-items.js +0 -1
  535. package/build-module/components/block-styles/menu-items.js.map +1 -1
  536. package/build-module/components/block-styles/preview.native.js +0 -1
  537. package/build-module/components/block-styles/preview.native.js.map +1 -1
  538. package/build-module/components/block-switcher/block-transformations-menu.js +0 -1
  539. package/build-module/components/block-switcher/block-transformations-menu.js.map +1 -1
  540. package/build-module/components/block-switcher/block-transformations-menu.native.js +0 -1
  541. package/build-module/components/block-switcher/block-transformations-menu.native.js.map +1 -1
  542. package/build-module/components/block-switcher/block-variation-transformations.js +0 -1
  543. package/build-module/components/block-switcher/block-variation-transformations.js.map +1 -1
  544. package/build-module/components/block-switcher/index.js +0 -1
  545. package/build-module/components/block-switcher/index.js.map +1 -1
  546. package/build-module/components/block-switcher/pattern-transformations-menu.js +0 -1
  547. package/build-module/components/block-switcher/pattern-transformations-menu.js.map +1 -1
  548. package/build-module/components/block-switcher/use-transformed-patterns.js +0 -1
  549. package/build-module/components/block-switcher/use-transformed-patterns.js.map +1 -1
  550. package/build-module/components/block-switcher/utils.js +0 -1
  551. package/build-module/components/block-switcher/utils.js.map +1 -1
  552. package/build-module/components/block-toolbar/block-toolbar-menu.native.js +0 -1
  553. package/build-module/components/block-toolbar/block-toolbar-menu.native.js.map +1 -1
  554. package/build-module/components/block-toolbar/change-design.js +0 -1
  555. package/build-module/components/block-toolbar/change-design.js.map +1 -1
  556. package/build-module/components/block-toolbar/index.js +0 -1
  557. package/build-module/components/block-toolbar/index.js.map +1 -1
  558. package/build-module/components/block-tools/block-toolbar-popover.js +3 -2
  559. package/build-module/components/block-tools/block-toolbar-popover.js.map +1 -1
  560. package/build-module/components/block-tools/use-selected-block-tool-props.js +0 -1
  561. package/build-module/components/block-tools/use-selected-block-tool-props.js.map +1 -1
  562. package/build-module/components/block-types-list/index.js +0 -1
  563. package/build-module/components/block-types-list/index.js.map +1 -1
  564. package/build-module/components/block-variation-picker/index.js +0 -1
  565. package/build-module/components/block-variation-picker/index.js.map +1 -1
  566. package/build-module/components/block-variation-picker/index.native.js +0 -1
  567. package/build-module/components/block-variation-picker/index.native.js.map +1 -1
  568. package/build-module/components/block-variation-transforms/index.js +0 -1
  569. package/build-module/components/block-variation-transforms/index.js.map +1 -1
  570. package/build-module/components/block-vertical-alignment-control/ui.js +0 -1
  571. package/build-module/components/block-vertical-alignment-control/ui.js.map +1 -1
  572. package/build-module/components/border-radius-control/index.js +0 -1
  573. package/build-module/components/border-radius-control/index.js.map +1 -1
  574. package/build-module/components/border-radius-control/input-controls.js +0 -1
  575. package/build-module/components/border-radius-control/input-controls.js.map +1 -1
  576. package/build-module/components/border-radius-control/utils.js +0 -1
  577. package/build-module/components/border-radius-control/utils.js.map +1 -1
  578. package/build-module/components/colors/utils.js +0 -1
  579. package/build-module/components/colors/utils.js.map +1 -1
  580. package/build-module/components/colors/with-colors.js +0 -1
  581. package/build-module/components/colors/with-colors.js.map +1 -1
  582. package/build-module/components/colors-gradients/dropdown.js +0 -1
  583. package/build-module/components/colors-gradients/dropdown.js.map +1 -1
  584. package/build-module/components/colors-gradients/panel-color-gradient-settings.js +0 -1
  585. package/build-module/components/colors-gradients/panel-color-gradient-settings.js.map +1 -1
  586. package/build-module/components/colors-gradients/panel-color-gradient-settings.native.js +0 -1
  587. package/build-module/components/colors-gradients/panel-color-gradient-settings.native.js.map +1 -1
  588. package/build-module/components/convert-to-group-buttons/toolbar.js +0 -1
  589. package/build-module/components/convert-to-group-buttons/toolbar.js.map +1 -1
  590. package/build-module/components/date-format-picker/index.js +0 -1
  591. package/build-module/components/date-format-picker/index.js.map +1 -1
  592. package/build-module/components/dimensions-tool/scale-tool.js +0 -1
  593. package/build-module/components/dimensions-tool/scale-tool.js.map +1 -1
  594. package/build-module/components/duotone/utils.js +0 -1
  595. package/build-module/components/duotone/utils.js.map +1 -1
  596. package/build-module/components/editor-styles/index.js +0 -1
  597. package/build-module/components/editor-styles/index.js.map +1 -1
  598. package/build-module/components/font-appearance-control/index.js +0 -1
  599. package/build-module/components/font-appearance-control/index.js.map +1 -1
  600. package/build-module/components/font-family/index.js +0 -1
  601. package/build-module/components/font-family/index.js.map +1 -1
  602. package/build-module/components/font-sizes/with-font-sizes.js +0 -1
  603. package/build-module/components/font-sizes/with-font-sizes.js.map +1 -1
  604. package/build-module/components/global-styles/border-panel.js +0 -1
  605. package/build-module/components/global-styles/border-panel.js.map +1 -1
  606. package/build-module/components/global-styles/color-panel.js +0 -1
  607. package/build-module/components/global-styles/color-panel.js.map +1 -1
  608. package/build-module/components/global-styles/color-panel.native.js +0 -1
  609. package/build-module/components/global-styles/color-panel.native.js.map +1 -1
  610. package/build-module/components/global-styles/dimensions-panel.js +0 -1
  611. package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
  612. package/build-module/components/global-styles/filters-panel.js +45 -28
  613. package/build-module/components/global-styles/filters-panel.js.map +1 -1
  614. package/build-module/components/global-styles/get-global-styles-changes.js +0 -1
  615. package/build-module/components/global-styles/get-global-styles-changes.js.map +1 -1
  616. package/build-module/components/global-styles/shadow-panel-components.js +44 -20
  617. package/build-module/components/global-styles/shadow-panel-components.js.map +1 -1
  618. package/build-module/components/global-styles/typography-utils.js +0 -1
  619. package/build-module/components/global-styles/typography-utils.js.map +1 -1
  620. package/build-module/components/global-styles/use-global-styles-context.native.js +0 -1
  621. package/build-module/components/global-styles/use-global-styles-context.native.js.map +1 -1
  622. package/build-module/components/global-styles/use-global-styles-output.js +0 -1
  623. package/build-module/components/global-styles/use-global-styles-output.js.map +1 -1
  624. package/build-module/components/global-styles/utils.js +0 -1
  625. package/build-module/components/global-styles/utils.js.map +1 -1
  626. package/build-module/components/grid/grid-visualizer.js +0 -1
  627. package/build-module/components/grid/grid-visualizer.js.map +1 -1
  628. package/build-module/components/grid/use-grid-layout-sync.js +0 -1
  629. package/build-module/components/grid/use-grid-layout-sync.js.map +1 -1
  630. package/build-module/components/grid/utils.js +0 -1
  631. package/build-module/components/grid/utils.js.map +1 -1
  632. package/build-module/components/iframe/get-compatibility-styles.js +0 -1
  633. package/build-module/components/iframe/get-compatibility-styles.js.map +1 -1
  634. package/build-module/components/image-editor/aspect-ratio-dropdown.js +1 -2
  635. package/build-module/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
  636. package/build-module/components/inner-blocks/index.js +2 -2
  637. package/build-module/components/inner-blocks/index.js.map +1 -1
  638. package/build-module/components/inner-blocks/index.native.js +2 -2
  639. package/build-module/components/inner-blocks/index.native.js.map +1 -1
  640. package/build-module/components/inner-blocks/use-block-context.js +0 -1
  641. package/build-module/components/inner-blocks/use-block-context.js.map +1 -1
  642. package/build-module/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js +0 -1
  643. package/build-module/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js.map +1 -1
  644. package/build-module/components/inserter/block-patterns-explorer/pattern-list.js +0 -1
  645. package/build-module/components/inserter/block-patterns-explorer/pattern-list.js.map +1 -1
  646. package/build-module/components/inserter/block-patterns-tab/pattern-category-previews.js +0 -1
  647. package/build-module/components/inserter/block-patterns-tab/pattern-category-previews.js.map +1 -1
  648. package/build-module/components/inserter/block-patterns-tab/use-pattern-categories.js +0 -1
  649. package/build-module/components/inserter/block-patterns-tab/use-pattern-categories.js.map +1 -1
  650. package/build-module/components/inserter/block-types-tab.js +0 -1
  651. package/build-module/components/inserter/block-types-tab.js.map +1 -1
  652. package/build-module/components/inserter/block-types-tab.native.js +0 -1
  653. package/build-module/components/inserter/block-types-tab.native.js.map +1 -1
  654. package/build-module/components/inserter/category-tabs/index.js +0 -1
  655. package/build-module/components/inserter/category-tabs/index.js.map +1 -1
  656. package/build-module/components/inserter/hooks/use-block-type-impressions.native.js +0 -1
  657. package/build-module/components/inserter/hooks/use-block-type-impressions.native.js.map +1 -1
  658. package/build-module/components/inserter/hooks/use-patterns-state.js +0 -1
  659. package/build-module/components/inserter/hooks/use-patterns-state.js.map +1 -1
  660. package/build-module/components/inserter/index.js +0 -1
  661. package/build-module/components/inserter/index.js.map +1 -1
  662. package/build-module/components/inserter/index.native.js +0 -1
  663. package/build-module/components/inserter/index.native.js.map +1 -1
  664. package/build-module/components/inserter/media-tab/hooks.js +0 -1
  665. package/build-module/components/inserter/media-tab/hooks.js.map +1 -1
  666. package/build-module/components/inserter/media-tab/media-list.js +0 -1
  667. package/build-module/components/inserter/media-tab/media-list.js.map +1 -1
  668. package/build-module/components/inserter/media-tab/media-tab.js +0 -1
  669. package/build-module/components/inserter/media-tab/media-tab.js.map +1 -1
  670. package/build-module/components/inserter/mobile-tab-navigation.js +0 -1
  671. package/build-module/components/inserter/mobile-tab-navigation.js.map +1 -1
  672. package/build-module/components/inserter/no-results.js +4 -8
  673. package/build-module/components/inserter/no-results.js.map +1 -1
  674. package/build-module/components/inserter/quick-inserter.js +2 -1
  675. package/build-module/components/inserter/quick-inserter.js.map +1 -1
  676. package/build-module/components/inserter/search-items.js +0 -1
  677. package/build-module/components/inserter/search-items.js.map +1 -1
  678. package/build-module/components/inserter/search-results.js +1 -2
  679. package/build-module/components/inserter/search-results.js.map +1 -1
  680. package/build-module/components/inserter/tabs.native.js +0 -1
  681. package/build-module/components/inserter/tabs.native.js.map +1 -1
  682. package/build-module/components/inserter/utils.native.js +0 -1
  683. package/build-module/components/inserter/utils.native.js.map +1 -1
  684. package/build-module/components/inspector-controls/block-support-tools-panel.js +0 -1
  685. package/build-module/components/inspector-controls/block-support-tools-panel.js.map +1 -1
  686. package/build-module/components/inspector-controls/fill.js +0 -1
  687. package/build-module/components/inspector-controls/fill.js.map +1 -1
  688. package/build-module/components/inspector-controls-tabs/index.js +0 -1
  689. package/build-module/components/inspector-controls-tabs/index.js.map +1 -1
  690. package/build-module/components/inspector-popover-header/index.js +0 -1
  691. package/build-module/components/inspector-popover-header/index.js.map +1 -1
  692. package/build-module/components/justify-content-control/ui.js +0 -1
  693. package/build-module/components/justify-content-control/ui.js.map +1 -1
  694. package/build-module/components/keyboard-shortcuts/index.js +1 -1
  695. package/build-module/components/keyboard-shortcuts/index.js.map +1 -1
  696. package/build-module/components/link-control/index.js +0 -1
  697. package/build-module/components/link-control/index.js.map +1 -1
  698. package/build-module/components/link-control/search-results.js +0 -1
  699. package/build-module/components/link-control/search-results.js.map +1 -1
  700. package/build-module/components/link-control/settings.js +0 -1
  701. package/build-module/components/link-control/settings.js.map +1 -1
  702. package/build-module/components/link-control/use-internal-value.js +0 -1
  703. package/build-module/components/link-control/use-internal-value.js.map +1 -1
  704. package/build-module/components/link-control/use-search-handler.js +0 -1
  705. package/build-module/components/link-control/use-search-handler.js.map +1 -1
  706. package/build-module/components/list-view/block-select-button.js +0 -1
  707. package/build-module/components/list-view/block-select-button.js.map +1 -1
  708. package/build-module/components/list-view/block.js +0 -1
  709. package/build-module/components/list-view/block.js.map +1 -1
  710. package/build-module/components/list-view/branch.js +0 -1
  711. package/build-module/components/list-view/branch.js.map +1 -1
  712. package/build-module/components/list-view/index.js +0 -1
  713. package/build-module/components/list-view/index.js.map +1 -1
  714. package/build-module/components/list-view/use-block-selection.js +0 -1
  715. package/build-module/components/list-view/use-block-selection.js.map +1 -1
  716. package/build-module/components/list-view/use-clipboard-handler.js +0 -1
  717. package/build-module/components/list-view/use-clipboard-handler.js.map +1 -1
  718. package/build-module/components/list-view/use-list-view-block-indexes.js +0 -1
  719. package/build-module/components/list-view/use-list-view-block-indexes.js.map +1 -1
  720. package/build-module/components/list-view/use-list-view-drop-zone.js +0 -1
  721. package/build-module/components/list-view/use-list-view-drop-zone.js.map +1 -1
  722. package/build-module/components/list-view/utils.js +0 -1
  723. package/build-module/components/list-view/utils.js.map +1 -1
  724. package/build-module/components/media-placeholder/index.js +0 -1
  725. package/build-module/components/media-placeholder/index.js.map +1 -1
  726. package/build-module/components/media-placeholder/index.native.js +0 -1
  727. package/build-module/components/media-placeholder/index.native.js.map +1 -1
  728. package/build-module/components/media-replace-flow/index.js +0 -1
  729. package/build-module/components/media-replace-flow/index.js.map +1 -1
  730. package/build-module/components/media-upload/index.native.js +0 -1
  731. package/build-module/components/media-upload/index.native.js.map +1 -1
  732. package/build-module/components/navigable-toolbar/index.js +0 -1
  733. package/build-module/components/navigable-toolbar/index.js.map +1 -1
  734. package/build-module/components/panel-color-settings/index.js +0 -1
  735. package/build-module/components/panel-color-settings/index.js.map +1 -1
  736. package/build-module/components/provider/use-block-sync.js +0 -1
  737. package/build-module/components/provider/use-block-sync.js.map +1 -1
  738. package/build-module/components/responsive-block-control/index.js +0 -1
  739. package/build-module/components/responsive-block-control/index.js.map +1 -1
  740. package/build-module/components/rich-text/embed-handler-picker.native.js +0 -1
  741. package/build-module/components/rich-text/embed-handler-picker.native.js.map +1 -1
  742. package/build-module/components/rich-text/event-listeners/before-input-rules.js +0 -1
  743. package/build-module/components/rich-text/event-listeners/before-input-rules.js.map +1 -1
  744. package/build-module/components/rich-text/event-listeners/delete.js +5 -3
  745. package/build-module/components/rich-text/event-listeners/delete.js.map +1 -1
  746. package/build-module/components/rich-text/event-listeners/index.js +0 -1
  747. package/build-module/components/rich-text/event-listeners/index.js.map +1 -1
  748. package/build-module/components/rich-text/event-listeners/input-rules.js +0 -1
  749. package/build-module/components/rich-text/event-listeners/input-rules.js.map +1 -1
  750. package/build-module/components/rich-text/event-listeners/paste-handler.js +0 -1
  751. package/build-module/components/rich-text/event-listeners/paste-handler.js.map +1 -1
  752. package/build-module/components/rich-text/file-paste-handler.native.js +0 -1
  753. package/build-module/components/rich-text/file-paste-handler.native.js.map +1 -1
  754. package/build-module/components/rich-text/format-edit.js +0 -1
  755. package/build-module/components/rich-text/format-edit.js.map +1 -1
  756. package/build-module/components/rich-text/format-toolbar/index.js +0 -1
  757. package/build-module/components/rich-text/format-toolbar/index.js.map +1 -1
  758. package/build-module/components/rich-text/index.js +0 -1
  759. package/build-module/components/rich-text/index.js.map +1 -1
  760. package/build-module/components/rich-text/index.native.js +0 -1
  761. package/build-module/components/rich-text/index.native.js.map +1 -1
  762. package/build-module/components/rich-text/multiline.js +0 -1
  763. package/build-module/components/rich-text/multiline.js.map +1 -1
  764. package/build-module/components/rich-text/native/format-edit.js +0 -1
  765. package/build-module/components/rich-text/native/format-edit.js.map +1 -1
  766. package/build-module/components/rich-text/native/get-format-colors.native.js +0 -1
  767. package/build-module/components/rich-text/native/get-format-colors.native.js.map +1 -1
  768. package/build-module/components/rich-text/native/index.native.js +0 -1
  769. package/build-module/components/rich-text/native/index.native.js.map +1 -1
  770. package/build-module/components/rich-text/native/toolbar-button-with-options.native.js +0 -1
  771. package/build-module/components/rich-text/native/toolbar-button-with-options.native.js.map +1 -1
  772. package/build-module/components/rich-text/native/use-format-types.js +0 -1
  773. package/build-module/components/rich-text/native/use-format-types.js.map +1 -1
  774. package/build-module/components/rich-text/use-format-types.js +0 -1
  775. package/build-module/components/rich-text/use-format-types.js.map +1 -1
  776. package/build-module/components/spacing-sizes-control/hooks/use-spacing-sizes.js +0 -1
  777. package/build-module/components/spacing-sizes-control/hooks/use-spacing-sizes.js.map +1 -1
  778. package/build-module/components/spacing-sizes-control/input-controls/axial.js +0 -1
  779. package/build-module/components/spacing-sizes-control/input-controls/axial.js.map +1 -1
  780. package/build-module/components/spacing-sizes-control/input-controls/separated.js +0 -1
  781. package/build-module/components/spacing-sizes-control/input-controls/separated.js.map +1 -1
  782. package/build-module/components/spacing-sizes-control/input-controls/single.js +0 -1
  783. package/build-module/components/spacing-sizes-control/input-controls/single.js.map +1 -1
  784. package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js +0 -1
  785. package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
  786. package/build-module/components/spacing-sizes-control/utils.js +0 -1
  787. package/build-module/components/spacing-sizes-control/utils.js.map +1 -1
  788. package/build-module/components/tabbed-sidebar/index.js +0 -1
  789. package/build-module/components/tabbed-sidebar/index.js.map +1 -1
  790. package/build-module/components/text-alignment-control/index.js +0 -1
  791. package/build-module/components/text-alignment-control/index.js.map +1 -1
  792. package/build-module/components/text-decoration-control/index.js +0 -1
  793. package/build-module/components/text-decoration-control/index.js.map +1 -1
  794. package/build-module/components/text-transform-control/index.js +0 -1
  795. package/build-module/components/text-transform-control/index.js.map +1 -1
  796. package/build-module/components/unsupported-block-details/index.native.js +0 -1
  797. package/build-module/components/unsupported-block-details/index.native.js.map +1 -1
  798. package/build-module/components/url-input/index.js +0 -1
  799. package/build-module/components/url-input/index.js.map +1 -1
  800. package/build-module/components/url-popover/image-url-input-ui.js +0 -1
  801. package/build-module/components/url-popover/image-url-input-ui.js.map +1 -1
  802. package/build-module/components/use-block-commands/index.js +0 -1
  803. package/build-module/components/use-block-commands/index.js.map +1 -1
  804. package/build-module/components/use-block-drop-zone/index.js +0 -1
  805. package/build-module/components/use-block-drop-zone/index.js.map +1 -1
  806. package/build-module/components/use-block-drop-zone/index.native.js +0 -1
  807. package/build-module/components/use-block-drop-zone/index.native.js.map +1 -1
  808. package/build-module/components/use-flash-editable-blocks/index.js +0 -1
  809. package/build-module/components/use-flash-editable-blocks/index.js.map +1 -1
  810. package/build-module/components/use-on-block-drop/index.js +0 -1
  811. package/build-module/components/use-on-block-drop/index.js.map +1 -1
  812. package/build-module/components/use-on-block-drop/index.native.js +0 -1
  813. package/build-module/components/use-on-block-drop/index.native.js.map +1 -1
  814. package/build-module/components/use-paste-styles/index.js +0 -1
  815. package/build-module/components/use-paste-styles/index.js.map +1 -1
  816. package/build-module/components/warning/index.js +0 -1
  817. package/build-module/components/warning/index.js.map +1 -1
  818. package/build-module/components/writing-flow/use-arrow-nav.js +0 -1
  819. package/build-module/components/writing-flow/use-arrow-nav.js.map +1 -1
  820. package/build-module/components/writing-flow/use-clipboard-handler.js +0 -1
  821. package/build-module/components/writing-flow/use-clipboard-handler.js.map +1 -1
  822. package/build-module/components/writing-flow/use-input.js +0 -1
  823. package/build-module/components/writing-flow/use-input.js.map +1 -1
  824. package/build-module/components/writing-flow/use-tab-nav.js +3 -1
  825. package/build-module/components/writing-flow/use-tab-nav.js.map +1 -1
  826. package/build-module/components/writing-flow/utils.js +0 -1
  827. package/build-module/components/writing-flow/utils.js.map +1 -1
  828. package/build-module/components/writing-mode-control/index.js +0 -1
  829. package/build-module/components/writing-mode-control/index.js.map +1 -1
  830. package/build-module/hooks/align.js +0 -1
  831. package/build-module/hooks/align.js.map +1 -1
  832. package/build-module/hooks/align.native.js +0 -1
  833. package/build-module/hooks/align.native.js.map +1 -1
  834. package/build-module/hooks/aria-label.js +3 -7
  835. package/build-module/hooks/aria-label.js.map +1 -1
  836. package/build-module/hooks/block-bindings.js +0 -1
  837. package/build-module/hooks/block-bindings.js.map +1 -1
  838. package/build-module/hooks/block-hooks.js +0 -1
  839. package/build-module/hooks/block-hooks.js.map +1 -1
  840. package/build-module/hooks/block-style-variation.js +0 -1
  841. package/build-module/hooks/block-style-variation.js.map +1 -1
  842. package/build-module/hooks/border.js +0 -1
  843. package/build-module/hooks/border.js.map +1 -1
  844. package/build-module/hooks/contrast-checker.js +0 -1
  845. package/build-module/hooks/contrast-checker.js.map +1 -1
  846. package/build-module/hooks/duotone.js +0 -1
  847. package/build-module/hooks/duotone.js.map +1 -1
  848. package/build-module/hooks/index.js +0 -1
  849. package/build-module/hooks/index.js.map +1 -1
  850. package/build-module/hooks/layout.js +0 -1
  851. package/build-module/hooks/layout.js.map +1 -1
  852. package/build-module/hooks/position.js +0 -1
  853. package/build-module/hooks/position.js.map +1 -1
  854. package/build-module/hooks/style.js +0 -1
  855. package/build-module/hooks/style.js.map +1 -1
  856. package/build-module/hooks/supports.js +0 -1
  857. package/build-module/hooks/supports.js.map +1 -1
  858. package/build-module/hooks/text-align.js +0 -1
  859. package/build-module/hooks/text-align.js.map +1 -1
  860. package/build-module/hooks/typography.js +0 -1
  861. package/build-module/hooks/typography.js.map +1 -1
  862. package/build-module/hooks/utils.js +0 -1
  863. package/build-module/hooks/utils.js.map +1 -1
  864. package/build-module/layouts/constrained.js +0 -1
  865. package/build-module/layouts/constrained.js.map +1 -1
  866. package/build-module/layouts/flex.js +0 -1
  867. package/build-module/layouts/flex.js.map +1 -1
  868. package/build-module/layouts/flow.js +0 -1
  869. package/build-module/layouts/flow.js.map +1 -1
  870. package/build-module/layouts/index.js +0 -1
  871. package/build-module/layouts/index.js.map +1 -1
  872. package/build-module/layouts/utils.js +0 -1
  873. package/build-module/layouts/utils.js.map +1 -1
  874. package/build-module/store/actions.js +0 -1
  875. package/build-module/store/actions.js.map +1 -1
  876. package/build-module/store/get-block-settings.js +0 -1
  877. package/build-module/store/get-block-settings.js.map +1 -1
  878. package/build-module/store/private-actions.js +0 -1
  879. package/build-module/store/private-actions.js.map +1 -1
  880. package/build-module/store/private-selectors.js +0 -1
  881. package/build-module/store/private-selectors.js.map +1 -1
  882. package/build-module/store/reducer.js +0 -1
  883. package/build-module/store/reducer.js.map +1 -1
  884. package/build-module/store/selectors.js +0 -1
  885. package/build-module/store/selectors.js.map +1 -1
  886. package/build-module/store/utils.js +0 -1
  887. package/build-module/store/utils.js.map +1 -1
  888. package/build-module/utils/block-bindings.js +0 -1
  889. package/build-module/utils/block-bindings.js.map +1 -1
  890. package/build-module/utils/get-editor-region.js +0 -1
  891. package/build-module/utils/get-editor-region.js.map +1 -1
  892. package/build-module/utils/get-font-styles-and-weights.js +0 -1
  893. package/build-module/utils/get-font-styles-and-weights.js.map +1 -1
  894. package/build-module/utils/math.js +0 -1
  895. package/build-module/utils/math.js.map +1 -1
  896. package/build-module/utils/object.js +0 -1
  897. package/build-module/utils/object.js.map +1 -1
  898. package/build-module/utils/selection.js +0 -1
  899. package/build-module/utils/selection.js.map +1 -1
  900. package/build-module/utils/transform-styles/index.js +0 -1
  901. package/build-module/utils/transform-styles/index.js.map +1 -1
  902. package/build-style/content-rtl.css +22 -25
  903. package/build-style/content.css +22 -25
  904. package/build-style/style-rtl.css +130 -104
  905. package/build-style/style.css +130 -104
  906. package/package.json +34 -34
  907. package/src/components/block-canvas/style.scss +3 -2
  908. package/src/components/block-draggable/style.scss +3 -1
  909. package/src/components/block-list/content.scss +19 -12
  910. package/src/components/block-list/index.js +21 -7
  911. package/src/components/block-mover/style.scss +5 -4
  912. package/src/components/block-pattern-setup/style.scss +3 -1
  913. package/src/components/block-patterns-list/style.scss +3 -3
  914. package/src/components/block-popover/use-popover-scroll.js +13 -8
  915. package/src/components/block-switcher/style.scss +3 -1
  916. package/src/components/block-toolbar/style.scss +5 -3
  917. package/src/components/block-tools/block-toolbar-popover.js +4 -3
  918. package/src/components/block-tools/style.scss +6 -3
  919. package/src/components/button-block-appender/content.scss +2 -4
  920. package/src/components/colors-gradients/style.scss +3 -2
  921. package/src/components/global-styles/filters-panel.js +48 -21
  922. package/src/components/global-styles/shadow-panel-components.js +44 -13
  923. package/src/components/global-styles/style.scss +53 -1
  924. package/src/components/grid/style.scss +5 -4
  925. package/src/components/iframe/content.scss +5 -2
  926. package/src/components/image-editor/aspect-ratio-dropdown.js +1 -1
  927. package/src/components/inner-blocks/index.js +2 -2
  928. package/src/components/inner-blocks/index.native.js +2 -2
  929. package/src/components/inserter/no-results.js +0 -5
  930. package/src/components/inserter/quick-inserter.js +4 -1
  931. package/src/components/inserter/search-results.js +3 -1
  932. package/src/components/inserter/style.scss +6 -8
  933. package/src/components/inserter-list-item/style.scss +9 -6
  934. package/src/components/keyboard-shortcuts/index.js +1 -1
  935. package/src/components/link-control/style.scss +11 -6
  936. package/src/components/list-view/style.scss +34 -17
  937. package/src/components/rich-text/event-listeners/delete.js +3 -3
  938. package/src/components/url-input/style.scss +3 -2
  939. package/src/components/writing-flow/use-tab-nav.js +4 -0
  940. package/src/hooks/aria-label.js +3 -8
@@ -1 +1 @@
1
- {"version":3,"names":["clsx","useDispatch","useEffect","useRef","useShortcut","BlockPopover","useBlockToolbarPopoverProps","useSelectedBlockToolProps","store","blockEditorStore","PrivateBlockToolbar","jsx","_jsx","BlockToolbarPopover","clientId","isTyping","__unstableContentRef","capturingClientId","isInsertionPointVisible","lastClientId","initialToolbarItemIndexRef","current","undefined","stopTyping","isToolbarForcedRef","clientIdToPositionOver","popoverProps","contentElement","bottomClientId","className","resize","children","focusOnMount","__experimentalInitialIndex","__experimentalOnIndexChange","index","variant"],"sources":["@wordpress/block-editor/src/components/block-tools/block-toolbar-popover.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n/**\n * WordPress dependencies\n */\nimport { useDispatch } from '@wordpress/data';\nimport { useEffect, useRef } from '@wordpress/element';\nimport { useShortcut } from '@wordpress/keyboard-shortcuts';\n/**\n * Internal dependencies\n */\nimport BlockPopover from '../block-popover';\nimport useBlockToolbarPopoverProps from './use-block-toolbar-popover-props';\nimport useSelectedBlockToolProps from './use-selected-block-tool-props';\nimport { store as blockEditorStore } from '../../store';\nimport { PrivateBlockToolbar } from '../block-toolbar';\n\nexport default function BlockToolbarPopover( {\n\tclientId,\n\tisTyping,\n\t__unstableContentRef,\n} ) {\n\tconst { capturingClientId, isInsertionPointVisible, lastClientId } =\n\t\tuseSelectedBlockToolProps( clientId );\n\n\t// Stores the active toolbar item index so the block toolbar can return focus\n\t// to it when re-mounting.\n\tconst initialToolbarItemIndexRef = useRef();\n\n\tuseEffect( () => {\n\t\t// Resets the index whenever the active block changes so this is not\n\t\t// persisted. See https://github.com/WordPress/gutenberg/pull/25760#issuecomment-717906169\n\t\tinitialToolbarItemIndexRef.current = undefined;\n\t}, [ clientId ] );\n\n\tconst { stopTyping } = useDispatch( blockEditorStore );\n\tconst isToolbarForcedRef = useRef( false );\n\n\tuseShortcut( 'core/block-editor/focus-toolbar', () => {\n\t\tisToolbarForcedRef.current = true;\n\t\tstopTyping( true );\n\t} );\n\n\tuseEffect( () => {\n\t\tisToolbarForcedRef.current = false;\n\t} );\n\n\t// If the block has a parent with __experimentalCaptureToolbars enabled,\n\t// the toolbar should be positioned over the topmost capturing parent.\n\tconst clientIdToPositionOver = capturingClientId || clientId;\n\n\tconst popoverProps = useBlockToolbarPopoverProps( {\n\t\tcontentElement: __unstableContentRef?.current,\n\t\tclientId: clientIdToPositionOver,\n\t} );\n\n\treturn (\n\t\t! isTyping && (\n\t\t\t<BlockPopover\n\t\t\t\tclientId={ clientIdToPositionOver }\n\t\t\t\tbottomClientId={ lastClientId }\n\t\t\t\tclassName={ clsx( 'block-editor-block-list__block-popover', {\n\t\t\t\t\t'is-insertion-point-visible': isInsertionPointVisible,\n\t\t\t\t} ) }\n\t\t\t\tresize={ false }\n\t\t\t\t{ ...popoverProps }\n\t\t\t>\n\t\t\t\t<PrivateBlockToolbar\n\t\t\t\t\t// If the toolbar is being shown because of being forced\n\t\t\t\t\t// it should focus the toolbar right after the mount.\n\t\t\t\t\tfocusOnMount={ isToolbarForcedRef.current }\n\t\t\t\t\t__experimentalInitialIndex={\n\t\t\t\t\t\tinitialToolbarItemIndexRef.current\n\t\t\t\t\t}\n\t\t\t\t\t__experimentalOnIndexChange={ ( index ) => {\n\t\t\t\t\t\tinitialToolbarItemIndexRef.current = index;\n\t\t\t\t\t} }\n\t\t\t\t\tvariant=\"toolbar\"\n\t\t\t\t/>\n\t\t\t</BlockPopover>\n\t\t)\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;AACvB;AACA;AACA;AACA,SAASC,WAAW,QAAQ,iBAAiB;AAC7C,SAASC,SAAS,EAAEC,MAAM,QAAQ,oBAAoB;AACtD,SAASC,WAAW,QAAQ,+BAA+B;AAC3D;AACA;AACA;AACA,OAAOC,YAAY,MAAM,kBAAkB;AAC3C,OAAOC,2BAA2B,MAAM,mCAAmC;AAC3E,OAAOC,yBAAyB,MAAM,iCAAiC;AACvE,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;AACvD,SAASC,mBAAmB,QAAQ,kBAAkB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEvD,eAAe,SAASC,mBAAmBA,CAAE;EAC5CC,QAAQ;EACRC,QAAQ;EACRC;AACD,CAAC,EAAG;EACH,MAAM;IAAEC,iBAAiB;IAAEC,uBAAuB;IAAEC;EAAa,CAAC,GACjEZ,yBAAyB,CAAEO,QAAS,CAAC;;EAEtC;EACA;EACA,MAAMM,0BAA0B,GAAGjB,MAAM,CAAC,CAAC;EAE3CD,SAAS,CAAE,MAAM;IAChB;IACA;IACAkB,0BAA0B,CAACC,OAAO,GAAGC,SAAS;EAC/C,CAAC,EAAE,CAAER,QAAQ,CAAG,CAAC;EAEjB,MAAM;IAAES;EAAW,CAAC,GAAGtB,WAAW,CAAEQ,gBAAiB,CAAC;EACtD,MAAMe,kBAAkB,GAAGrB,MAAM,CAAE,KAAM,CAAC;EAE1CC,WAAW,CAAE,iCAAiC,EAAE,MAAM;IACrDoB,kBAAkB,CAACH,OAAO,GAAG,IAAI;IACjCE,UAAU,CAAE,IAAK,CAAC;EACnB,CAAE,CAAC;EAEHrB,SAAS,CAAE,MAAM;IAChBsB,kBAAkB,CAACH,OAAO,GAAG,KAAK;EACnC,CAAE,CAAC;;EAEH;EACA;EACA,MAAMI,sBAAsB,GAAGR,iBAAiB,IAAIH,QAAQ;EAE5D,MAAMY,YAAY,GAAGpB,2BAA2B,CAAE;IACjDqB,cAAc,EAAEX,oBAAoB,EAAEK,OAAO;IAC7CP,QAAQ,EAAEW;EACX,CAAE,CAAC;EAEH,OACC,CAAEV,QAAQ,iBACTH,IAAA,CAACP,YAAY;IACZS,QAAQ,EAAGW,sBAAwB;IACnCG,cAAc,EAAGT,YAAc;IAC/BU,SAAS,EAAG7B,IAAI,CAAE,wCAAwC,EAAE;MAC3D,4BAA4B,EAAEkB;IAC/B,CAAE,CAAG;IACLY,MAAM,EAAG,KAAO;IAAA,GACXJ,YAAY;IAAAK,QAAA,eAEjBnB,IAAA,CAACF;IACA;IACA;IAAA;MACAsB,YAAY,EAAGR,kBAAkB,CAACH,OAAS;MAC3CY,0BAA0B,EACzBb,0BAA0B,CAACC,OAC3B;MACDa,2BAA2B,EAAKC,KAAK,IAAM;QAC1Cf,0BAA0B,CAACC,OAAO,GAAGc,KAAK;MAC3C,CAAG;MACHC,OAAO,EAAC;IAAS,CACjB;EAAC,CACW,CACd;AAEH","ignoreList":[]}
1
+ {"version":3,"names":["clsx","useDispatch","useEffect","useRef","useShortcut","PrivateBlockPopover","useBlockToolbarPopoverProps","useSelectedBlockToolProps","store","blockEditorStore","PrivateBlockToolbar","jsx","_jsx","BlockToolbarPopover","clientId","isTyping","__unstableContentRef","capturingClientId","isInsertionPointVisible","lastClientId","initialToolbarItemIndexRef","current","undefined","stopTyping","isToolbarForcedRef","clientIdToPositionOver","popoverProps","contentElement","bottomClientId","className","resize","children","focusOnMount","__experimentalInitialIndex","__experimentalOnIndexChange","index","variant"],"sources":["@wordpress/block-editor/src/components/block-tools/block-toolbar-popover.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n/**\n * WordPress dependencies\n */\nimport { useDispatch } from '@wordpress/data';\nimport { useEffect, useRef } from '@wordpress/element';\nimport { useShortcut } from '@wordpress/keyboard-shortcuts';\n/**\n * Internal dependencies\n */\nimport { PrivateBlockPopover } from '../block-popover';\nimport useBlockToolbarPopoverProps from './use-block-toolbar-popover-props';\nimport useSelectedBlockToolProps from './use-selected-block-tool-props';\nimport { store as blockEditorStore } from '../../store';\nimport { PrivateBlockToolbar } from '../block-toolbar';\n\nexport default function BlockToolbarPopover( {\n\tclientId,\n\tisTyping,\n\t__unstableContentRef,\n} ) {\n\tconst { capturingClientId, isInsertionPointVisible, lastClientId } =\n\t\tuseSelectedBlockToolProps( clientId );\n\n\t// Stores the active toolbar item index so the block toolbar can return focus\n\t// to it when re-mounting.\n\tconst initialToolbarItemIndexRef = useRef();\n\n\tuseEffect( () => {\n\t\t// Resets the index whenever the active block changes so this is not\n\t\t// persisted. See https://github.com/WordPress/gutenberg/pull/25760#issuecomment-717906169\n\t\tinitialToolbarItemIndexRef.current = undefined;\n\t}, [ clientId ] );\n\n\tconst { stopTyping } = useDispatch( blockEditorStore );\n\tconst isToolbarForcedRef = useRef( false );\n\n\tuseShortcut( 'core/block-editor/focus-toolbar', () => {\n\t\tisToolbarForcedRef.current = true;\n\t\tstopTyping( true );\n\t} );\n\n\tuseEffect( () => {\n\t\tisToolbarForcedRef.current = false;\n\t} );\n\n\t// If the block has a parent with __experimentalCaptureToolbars enabled,\n\t// the toolbar should be positioned over the topmost capturing parent.\n\tconst clientIdToPositionOver = capturingClientId || clientId;\n\n\tconst popoverProps = useBlockToolbarPopoverProps( {\n\t\tcontentElement: __unstableContentRef?.current,\n\t\tclientId: clientIdToPositionOver,\n\t} );\n\n\treturn (\n\t\t! isTyping && (\n\t\t\t<PrivateBlockPopover\n\t\t\t\tclientId={ clientIdToPositionOver }\n\t\t\t\tbottomClientId={ lastClientId }\n\t\t\t\tclassName={ clsx( 'block-editor-block-list__block-popover', {\n\t\t\t\t\t'is-insertion-point-visible': isInsertionPointVisible,\n\t\t\t\t} ) }\n\t\t\t\tresize={ false }\n\t\t\t\t{ ...popoverProps }\n\t\t\t\t__unstableContentRef={ __unstableContentRef }\n\t\t\t>\n\t\t\t\t<PrivateBlockToolbar\n\t\t\t\t\t// If the toolbar is being shown because of being forced\n\t\t\t\t\t// it should focus the toolbar right after the mount.\n\t\t\t\t\tfocusOnMount={ isToolbarForcedRef.current }\n\t\t\t\t\t__experimentalInitialIndex={\n\t\t\t\t\t\tinitialToolbarItemIndexRef.current\n\t\t\t\t\t}\n\t\t\t\t\t__experimentalOnIndexChange={ ( index ) => {\n\t\t\t\t\t\tinitialToolbarItemIndexRef.current = index;\n\t\t\t\t\t} }\n\t\t\t\t\tvariant=\"toolbar\"\n\t\t\t\t/>\n\t\t\t</PrivateBlockPopover>\n\t\t)\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;AACvB;AACA;AACA;AACA,SAASC,WAAW,QAAQ,iBAAiB;AAC7C,SAASC,SAAS,EAAEC,MAAM,QAAQ,oBAAoB;AACtD,SAASC,WAAW,QAAQ,+BAA+B;AAC3D;AACA;AACA;AACA,SAASC,mBAAmB,QAAQ,kBAAkB;AACtD,OAAOC,2BAA2B,MAAM,mCAAmC;AAC3E,OAAOC,yBAAyB,MAAM,iCAAiC;AACvE,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;AACvD,SAASC,mBAAmB,QAAQ,kBAAkB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEvD,eAAe,SAASC,mBAAmBA,CAAE;EAC5CC,QAAQ;EACRC,QAAQ;EACRC;AACD,CAAC,EAAG;EACH,MAAM;IAAEC,iBAAiB;IAAEC,uBAAuB;IAAEC;EAAa,CAAC,GACjEZ,yBAAyB,CAAEO,QAAS,CAAC;;EAEtC;EACA;EACA,MAAMM,0BAA0B,GAAGjB,MAAM,CA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@ -1,4 +1,3 @@
1
- /* wp:polyfill */
2
1
  /**
3
2
  * WordPress dependencies
4
3
  */
@@ -1 +1 @@
1
- {"version":3,"names":["useSelect","store","blockEditorStore","useSelectedBlockToolProps","clientId","selectedBlockProps","select","getBlockRootClientId","getBlockParents","__experimentalGetBlockListSettingsForBlocks","isBlockInsertionPointVisible","getBlockInsertionPoint","getBlockOrder","hasMultiSelection","getLastMultiSelectedBlockClientId","blockParentsClientIds","parentBlockListSettings","capturingClientId","find","parentClientId","__experimentalCaptureToolbars","isInsertionPointVisible","insertionPoint","order","rootClientId","index","lastClientId"],"sources":["@wordpress/block-editor/src/components/block-tools/use-selected-block-tool-props.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\n\n/**\n * Returns props for the selected block tools and empty block inserter.\n *\n * @param {string} clientId Selected block client ID.\n */\nexport default function useSelectedBlockToolProps( clientId ) {\n\tconst selectedBlockProps = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetBlockRootClientId,\n\t\t\t\tgetBlockParents,\n\t\t\t\t__experimentalGetBlockListSettingsForBlocks,\n\t\t\t\tisBlockInsertionPointVisible,\n\t\t\t\tgetBlockInsertionPoint,\n\t\t\t\tgetBlockOrder,\n\t\t\t\thasMultiSelection,\n\t\t\t\tgetLastMultiSelectedBlockClientId,\n\t\t\t} = select( blockEditorStore );\n\n\t\t\tconst blockParentsClientIds = getBlockParents( clientId );\n\n\t\t\t// Get Block List Settings for all ancestors of the current Block clientId.\n\t\t\tconst parentBlockListSettings =\n\t\t\t\t__experimentalGetBlockListSettingsForBlocks(\n\t\t\t\t\tblockParentsClientIds\n\t\t\t\t);\n\n\t\t\t// Get the clientId of the topmost parent with the capture toolbars setting.\n\t\t\tconst capturingClientId = blockParentsClientIds.find(\n\t\t\t\t( parentClientId ) =>\n\t\t\t\t\tparentBlockListSettings[ parentClientId ]\n\t\t\t\t\t\t?.__experimentalCaptureToolbars\n\t\t\t);\n\n\t\t\tlet isInsertionPointVisible = false;\n\t\t\tif ( isBlockInsertionPointVisible() ) {\n\t\t\t\tconst insertionPoint = getBlockInsertionPoint();\n\t\t\t\tconst order = getBlockOrder( insertionPoint.rootClientId );\n\t\t\t\tisInsertionPointVisible =\n\t\t\t\t\torder[ insertionPoint.index ] === clientId;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tcapturingClientId,\n\t\t\t\tisInsertionPointVisible,\n\t\t\t\tlastClientId: hasMultiSelection()\n\t\t\t\t\t? getLastMultiSelectedBlockClientId()\n\t\t\t\t\t: null,\n\t\t\t\trootClientId: getBlockRootClientId( clientId ),\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\treturn selectedBlockProps;\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,iBAAiB;;AAE3C;AACA;AACA;AACA,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;;AAEvD;AACA;AACA;AACA;AACA;AACA,eAAe,SAASC,yBAAyBA,CAAEC,QAAQ,EAAG;EAC7D,MAAMC,kBAAkB,GAAGL,SAAS,CACjCM,MAAM,IAAM;IACb,MAAM;MACLC,oBAAoB;MACpBC,eAAe;MACfC,2CAA2C;MAC3CC,4BAA4B;MAC5BC,sBAAsB;MACtBC,aAAa;MACbC,iBAAiB;MACjBC;IACD,CAAC,GAAGR,MAAM,CAAEJ,gBAAiB,CAAC;IAE9B,MAAMa,qBAAqB,GAAGP,eAAe,CAAEJ,QAAS,CAAC;;IAEzD;IACA,MAAMY,uBAAuB,GAC5BP,2CAA2C,CAC1CM,qBACD,CAAC;;IAEF;IACA,MAAME,iBAAiB,GAAGF,qBAAqB,CAACG,IAAI,CACjDC,cAAc,IACfH,uBAAuB,CAAEG,cAAc,CAAE,EACtCC,6BACL,CAAC;IAED,IAAIC,uBAAuB,GAAG,KAAK;IACnC,IAAKX,4BAA4B,CAAC,CAAC,EAAG;MACrC,MAAMY,cAAc,GAAGX,sBAAsB,CAAC,CAAC;MAC/C,MAAMY,KAAK,GAAGX,aAAa,CAAEU,cAAc,CAACE,YAAa,CAAC;MAC1DH,uBAAuB,GACtBE,KAAK,CAAED,cAAc,CAACG,KAAK,CAAE,KAAKrB,QAAQ;IAC5C;IAEA,OAAO;MACNa,iBAAiB;MACjBI,uBAAuB;MACvBK,YAAY,EAAEb,iBAAiB,CAAC,CAAC,GAC9BC,iCAAiC,CAAC,CAAC,GACnC,IAAI;MACPU,YAAY,EAAEjB,oBAAoB,CAAEH,QAAS;IAC9C,CAAC;EACF,CAAC,EACD,CAAEA,QAAQ,CACX,CAAC;EAED,OAAOC,kBAAkB;AAC1B","ignoreList":[]}
1
+ {"version":3,"names":["useSelect","store","blockEditorStore","useSelectedBlockToolProps","clientId","selectedBlockProps","select","getBlockRootClientId","getBlockParents","__experimentalGetBlockListSettingsForBlocks","isBlockInsertionPointVisible","getBlockInsertionPoint","getBlockOrder","hasMultiSelection","getLastMultiSelectedBlockClientId","blockParentsClientIds","parentBlockListSettings","capturingClientId","find","parentClientId","__experimentalCaptureToolbars","isInsertionPointVisible","insertionPoint","order","rootClientId","index","lastClientId"],"sources":["@wordpress/block-editor/src/components/block-tools/use-selected-block-tool-props.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\n\n/**\n * Returns props for the selected block tools and empty block inserter.\n *\n * @param {string} clientId Selected block client ID.\n */\nexport default function useSelectedBlockToolProps( clientId ) {\n\tconst selectedBlockProps = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetBlockRootClientId,\n\t\t\t\tgetBlockParents,\n\t\t\t\t__experimentalGetBlockListSettingsForBlocks,\n\t\t\t\tisBlockInsertionPointVisible,\n\t\t\t\tgetBlockInsertionPoint,\n\t\t\t\tgetBlockOrder,\n\t\t\t\thasMultiSelection,\n\t\t\t\tgetLastMultiSelectedBlockClientId,\n\t\t\t} = select( blockEditorStore );\n\n\t\t\tconst blockParentsClientIds = getBlockParents( clientId );\n\n\t\t\t// Get Block List Settings for all ancestors of the current Block clientId.\n\t\t\tconst parentBlockListSettings =\n\t\t\t\t__experimentalGetBlockListSettingsForBlocks(\n\t\t\t\t\tblockParentsClientIds\n\t\t\t\t);\n\n\t\t\t// Get the clientId of the topmost parent with the capture toolbars setting.\n\t\t\tconst capturingClientId = blockParentsClientIds.find(\n\t\t\t\t( parentClientId ) =>\n\t\t\t\t\tparentBlockListSettings[ parentClientId ]\n\t\t\t\t\t\t?.__experimentalCaptureToolbars\n\t\t\t);\n\n\t\t\tlet isInsertionPointVisible = false;\n\t\t\tif ( isBlockInsertionPointVisible() ) {\n\t\t\t\tconst insertionPoint = getBlockInsertionPoint();\n\t\t\t\tconst order = getBlockOrder( insertionPoint.rootClientId );\n\t\t\t\tisInsertionPointVisible =\n\t\t\t\t\torder[ insertionPoint.index ] === clientId;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tcapturingClientId,\n\t\t\t\tisInsertionPointVisible,\n\t\t\t\tlastClientId: hasMultiSelection()\n\t\t\t\t\t? getLastMultiSelectedBlockClientId()\n\t\t\t\t\t: null,\n\t\t\t\trootClientId: getBlockRootClientId( clientId ),\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\treturn selectedBlockProps;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,iBAAiB;;AAE3C;AACA;AACA;AACA,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;;AAEvD;AACA;AACA;AACA;AACA;AACA,eAAe,SAASC,yBAAyBA,CAAEC,QAAQ,EAAG;EAC7D,MAAMC,kBAAkB,GAAGL,SAAS,CACjCM,MAAM,IAAM;IACb,MAAM;MACLC,oBAAoB;MACpBC,eAAe;MACfC,2CAA2C;MAC3CC,4BAA4B;MAC5BC,sBAAsB;MACtBC,aAAa;MACbC,iBAAiB;MACjBC;IACD,CAAC,GAAGR,MAAM,CAAEJ,gBAAiB,CAAC;IAE9B,MAAMa,qBAAqB,GAAGP,eAAe,CAAEJ,QAAS,CAAC;;IAEzD;IACA,MAAMY,uBAAuB,GAC5BP,2CAA2C,CAC1CM,qBACD,CAAC;;IAEF;IACA,MAAME,iBAAiB,GAAGF,qBAAqB,CAACG,IAAI,CACjDC,cAAc,IACfH,uBAAuB,CAAEG,cAAc,CAAE,EACtCC,6BACL,CAAC;IAED,IAAIC,uBAAuB,GAAG,KAAK;IACnC,IAAKX,4BAA4B,CAAC,CAAC,EAAG;MACrC,MAAMY,cAAc,GAAGX,sBAAsB,CAAC,CAAC;MAC/C,MAAMY,KAAK,GAAGX,aAAa,CAAEU,cAAc,CAACE,YAAa,CAAC;MAC1DH,uBAAuB,GACtBE,KAAK,CAAED,cAAc,CAACG,KAAK,CAAE,KAAKrB,QAAQ;IAC5C;IAEA,OAAO;MACNa,iBAAiB;MACjBI,uBAAuB;MACvBK,YAAY,EAAEb,iBAAiB,CAAC,CAAC,GAC9BC,iCAAiC,CAAC,CAAC,GACnC,IAAI;MACPU,YAAY,EAAEjB,oBAAoB,CAAEH,QAAS;IAC9C,CAAC;EACF,CAAC,EACD,CAAEA,QAAQ,CACX,CAAC;EAED,OAAOC,kBAAkB;AAC1B","ignoreList":[]}
@@ -1,4 +1,3 @@
1
- /* wp:polyfill */
2
1
  /**
3
2
  * WordPress dependencies
4
3
  */
@@ -1 +1 @@
1
- {"version":3,"names":["getBlockMenuDefaultClassName","useInstanceId","InserterListItem","InserterListboxGroup","InserterListboxRow","jsx","_jsx","jsxs","_jsxs","chunk","array","size","chunks","i","j","length","push","slice","BlockTypesList","items","onSelect","onHover","children","label","isDraggable","className","listId","map","row","item","id","isDisabled","isFirst","rowId"],"sources":["@wordpress/block-editor/src/components/block-types-list/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { getBlockMenuDefaultClassName } from '@wordpress/blocks';\nimport { useInstanceId } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport InserterListItem from '../inserter-list-item';\nimport { InserterListboxGroup, InserterListboxRow } from '../inserter-listbox';\n\nfunction chunk( array, size ) {\n\tconst chunks = [];\n\tfor ( let i = 0, j = array.length; i < j; i += size ) {\n\t\tchunks.push( array.slice( i, i + size ) );\n\t}\n\treturn chunks;\n}\n\nfunction BlockTypesList( {\n\titems = [],\n\tonSelect,\n\tonHover = () => {},\n\tchildren,\n\tlabel,\n\tisDraggable = true,\n} ) {\n\tconst className = 'block-editor-block-types-list';\n\tconst listId = useInstanceId( BlockTypesList, className );\n\treturn (\n\t\t<InserterListboxGroup className={ className } aria-label={ label }>\n\t\t\t{ chunk( items, 3 ).map( ( row, i ) => (\n\t\t\t\t<InserterListboxRow key={ i }>\n\t\t\t\t\t{ row.map( ( item, j ) => (\n\t\t\t\t\t\t<InserterListItem\n\t\t\t\t\t\t\tkey={ item.id }\n\t\t\t\t\t\t\titem={ item }\n\t\t\t\t\t\t\tclassName={ getBlockMenuDefaultClassName(\n\t\t\t\t\t\t\t\titem.id\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tonSelect={ onSelect }\n\t\t\t\t\t\t\tonHover={ onHover }\n\t\t\t\t\t\t\tisDraggable={ isDraggable && ! item.isDisabled }\n\t\t\t\t\t\t\tisFirst={ i === 0 && j === 0 }\n\t\t\t\t\t\t\trowId={ `${ listId }-${ i }` }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) ) }\n\t\t\t\t</InserterListboxRow>\n\t\t\t) ) }\n\t\t\t{ children }\n\t\t</InserterListboxGroup>\n\t);\n}\n\nexport default BlockTypesList;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,4BAA4B,QAAQ,mBAAmB;AAChE,SAASC,aAAa,QAAQ,oBAAoB;;AAElD;AACA;AACA;AACA,OAAOC,gBAAgB,MAAM,uBAAuB;AACpD,SAASC,oBAAoB,EAAEC,kBAAkB,QAAQ,q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,KAAK,CAAC,IAAIC,CAAC,KAAK,CAAG;QAC9BmB,KAAK,EAAG,GAAIP,MAAM,IAAMb,CAAC;MAAK,GATxBgB,IAAI,CAACC,EAUX,CACA;IAAC,GAdsBjB,CAeN,CACnB,CAAC,EACDS,QAAQ;EAAA,CACW,CAAC;AAEzB;AAEA,eAAeJ,cAAc","ignoreList":[]}
1
+ {"version":3,"names":["getBlockMenuDefaultClassName","useInstanceId","InserterListItem","InserterListboxGroup","InserterListboxRow","jsx","_jsx","jsxs","_jsxs","chunk","array","size","chunks","i","j","length","push","slice","BlockTypesList","items","onSelect","onHover","children","label","isDraggable","className","listId","map","row","item","id","isDisabled","isFirst","rowId"],"sources":["@wordpress/block-editor/src/components/block-types-list/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { getBlockMenuDefaultClassName } from '@wordpress/blocks';\nimport { useInstanceId } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport InserterListItem from '../inserter-list-item';\nimport { InserterListboxGroup, InserterListboxRow } from '../inserter-listbox';\n\nfunction chunk( array, size ) {\n\tconst chunks = [];\n\tfor ( let i = 0, j = array.length; i < j; i += size ) {\n\t\tchunks.push( array.slice( i, i + size ) );\n\t}\n\treturn chunks;\n}\n\nfunction BlockTypesList( {\n\titems = [],\n\tonSelect,\n\tonHover = () => {},\n\tchildren,\n\tlabel,\n\tisDraggable = true,\n} ) {\n\tconst className = 'block-editor-block-types-list';\n\tconst listId = useInstanceId( BlockTypesList, className );\n\treturn (\n\t\t<InserterListboxGroup className={ className } aria-label={ label }>\n\t\t\t{ chunk( items, 3 ).map( ( row, i ) => (\n\t\t\t\t<InserterListboxRow key={ i }>\n\t\t\t\t\t{ row.map( ( item, j ) => (\n\t\t\t\t\t\t<InserterListItem\n\t\t\t\t\t\t\tkey={ item.id }\n\t\t\t\t\t\t\titem={ item }\n\t\t\t\t\t\t\tclassName={ getBlockMenuDefaultClassName(\n\t\t\t\t\t\t\t\titem.id\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tonSelect={ onSelect }\n\t\t\t\t\t\t\tonHover={ onHover }\n\t\t\t\t\t\t\tisDraggable={ isDraggable && ! item.isDisabled }\n\t\t\t\t\t\t\tisFirst={ i === 0 && j === 0 }\n\t\t\t\t\t\t\trowId={ `${ listId }-${ i }` }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) ) }\n\t\t\t\t</InserterListboxRow>\n\t\t\t) ) }\n\t\t\t{ children }\n\t\t</InserterListboxGroup>\n\t);\n}\n\nexport default BlockTypesList;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,4BAA4B,QAAQ,mBAAmB;AAChE,SAASC,aAAa,QAAQ,oBAAoB;;AAElD;AACA;AACA;AACA,OAAOC,gBAAgB,MAAM,uBAAuB;AACpD,SAASC,oBAAoB,EAAEC,kBAAkB,QAAQ,qBAAqB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAE/E,SAASC,KAAKA,CAAEC,KAAK,EAAEC,IAAI,EAAG;EAC7B,MAAMC,MAAM,GAAG,EAAE;EACjB,KAAM,IAAIC,CAAC,GAAG,CAAC,EAAEC,CAAC,GAAGJ,KAAK,CAACK,MAAM,EAAEF,CAAC,GAAGC,CAAC,EAAED,CAAC,IAAIF,IAAI,EAAG;IACrDC,MAAM,CAACI,IAAI,CAAEN,KAAK,CAACO,KAAK,CAAEJ,CAAC,EAAEA,CAAC,GAAGF,IAAK,CAAE,CAAC;EAC1C;EACA,OAAOC,MAAM;AACd;AAEA,SAASM,cAAcA,CAAE;EACxBC,KAAK,GAAG,EAAE;EACVC,QAAQ;EACRC,OAAO,GAAGA,CAAA,KAAM,CAAC,CAAC;EAClBC,QAAQ;EACRC,KAAK;EACLC,WAAW,GAAG;AACf,CAAC,EAAG;EACH,MAAMC,SAAS,GAAG,+BAA+B;EACjD,MAAMC,MAAM,GAAGzB,aAAa,CAAEiB,cAAc,EAAEO,SAAU,CAAC;EACzD,oBACCjB,KAAA,CAACL,oBAAoB;IAACsB,SAAS,EAAGA,SAAW;IAAC,cAAaF,KAAO;IAAAD,QAAA,GAC/Db,KAAK,CAAEU,KAAK,EAAE,CAAE,CAAC,CAACQ,GAAG,CAAE,CAAEC,GAAG,EAAEf,CAAC,kBAChCP,IAAA,CAACF,kBAAkB;MAAAkB,QAAA,EAChBM,GAAG,CAACD,GAAG,CAAE,CAAEE,IAAI,EAAEf,CAAC,kBACnBR,IAAA,CAACJ,gBAAgB;QAEhB2B,IAAI,EAAGA,IAAM;QACbJ,SAAS,EAAGzB,4BAA4B,CACvC6B,IAAI,CAACC,EACN,CAAG;QACHV,QAAQ,EAAGA,QAAU;QACrBC,OAAO,EAAGA,OAAS;QACnBG,WAAW,EAAGA,WAAW,IAAI,CAAEK,IAAI,CAACE,UAAY;QAChDC,OAAO,EAAGnB,CAAC,KAAK,CAAC,IAAIC,CAAC,KAAK,CAAG;QAC9BmB,KAAK,EAAG,GAAIP,MAAM,IAAMb,CAAC;MAAK,GATxBgB,IAAI,CAACC,EAUX,CACA;IAAC,GAdsBjB,CAeN,CACnB,CAAC,EACDS,QAAQ;EAAA,CACW,CAAC;AAEzB;AAEA,eAAeJ,cAAc","ignoreList":[]}
@@ -1,4 +1,3 @@
1
- /* wp:polyfill */
2
1
  /**
3
2
  * External dependencies
4
3
  */
@@ -1 +1 @@
1
- {"version":3,"names":["clsx","__","Button","Placeholder","layout","jsx","_jsx","jsxs","_jsxs","BlockVariationPicker","icon","label","instructions","variations","onSelect","allowSkip","classes","length","className","children","role","map","variation","__next40pxDefaultSize","variant","src","iconSize","onClick","description","title","name"],"sources":["@wordpress/block-editor/src/components/block-variation-picker/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Button, Placeholder } from '@wordpress/components';\nimport { layout } from '@wordpress/icons';\n\nfunction BlockVariationPicker( {\n\ticon = layout,\n\tlabel = __( 'Choose variation' ),\n\tinstructions = __( 'Select a variation to start with:' ),\n\tvariations,\n\tonSelect,\n\tallowSkip,\n} ) {\n\tconst classes = clsx( 'block-editor-block-variation-picker', {\n\t\t'has-many-variations': variations.length > 4,\n\t} );\n\n\treturn (\n\t\t<Placeholder\n\t\t\ticon={ icon }\n\t\t\tlabel={ label }\n\t\t\tinstructions={ instructions }\n\t\t\tclassName={ classes }\n\t\t>\n\t\t\t{ /*\n\t\t\t * Disable reason: The `list` ARIA role is redundant but\n\t\t\t * Safari+VoiceOver won't announce the list otherwise.\n\t\t\t */\n\t\t\t/* eslint-disable jsx-a11y/no-redundant-roles */ }\n\t\t\t<ul\n\t\t\t\tclassName=\"block-editor-block-variation-picker__variations\"\n\t\t\t\trole=\"list\"\n\t\t\t\taria-label={ __( 'Block variations' ) }\n\t\t\t>\n\t\t\t\t{ variations.map( ( variation ) => (\n\t\t\t\t\t<li key={ variation.name }>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\t\tvariation.icon && variation.icon.src\n\t\t\t\t\t\t\t\t\t? variation.icon.src\n\t\t\t\t\t\t\t\t\t: variation.icon\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ticonSize={ 48 }\n\t\t\t\t\t\t\tonClick={ () => onSelect( variation ) }\n\t\t\t\t\t\t\tclassName=\"block-editor-block-variation-picker__variation\"\n\t\t\t\t\t\t\tlabel={ variation.description || variation.title }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<span className=\"block-editor-block-variation-picker__variation-label\">\n\t\t\t\t\t\t\t{ variation.title }\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</li>\n\t\t\t\t) ) }\n\t\t\t</ul>\n\t\t\t{ /* eslint-enable jsx-a11y/no-redundant-roles */ }\n\t\t\t{ allowSkip && (\n\t\t\t\t<div className=\"block-editor-block-variation-picker__skip\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tvariant=\"link\"\n\t\t\t\t\t\tonClick={ () => onSelect() }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Skip' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t</Placeholder>\n\t);\n}\n\nexport default BlockVariationPicker;\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,MAAM,EAAEC,WAAW,QAAQ,uBAAuB;AAC3D,SAASC,MAAM,QAAQ,kBAAkB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAE1C,SAASC,oBAAoBA,CAAE;EAC9BC,IAAI,GAAGN,MAAM;EACbO,KAAK,GAAGV,EAAE,CAAE,kBAAmB,CAAC;EAChCW,YAAY,GAAGX,EAAE,CAAE,mCAAoC,CAAC;EACxDY,UAAU;EACVC,QAAQ;EACRC;AACD,CAAC,EAAG;EACH,MAAMC,OAAO,GAAGhB,IAAI,CAAE,qCAAqC,EAAE;IAC5D,qBAAqB,EAAEa,UAAU,CAACI,MAAM,GAAG;EAC5C,CAAE,CAAC;EAEH,oBACCT,KAAA,CAACL,WAAW;IACXO,IAAI,EAAGA,IAAM;IACbC,KAAK,EAAGA,KAAO;IACfC,YAAY,EAAGA,YAAc;IAC7BM,SAAS,EAAGF,OAAS;IAAAG,QAAA,gBAOrBb,IAAA;MACCY,SAAS,EAAC,iDAAiD;MAC3DE,IAAI,EAAC,MAAM;MACX,cAAanB,EAAE,CAAE,kBAAmB,CAAG;MAAAkB,QAAA,EAErCN,UAAU,CAACQ,GAAG,CAAIC,SAAS,iBAC5Bd,KAAA;QAAAW,QAAA,gBACCb,IAAA,CAACJ,MAAM;UACNqB,qBAAqB;UACrBC,OAAO,EAAC,UAAU;UAClBd,IAAI,EACHY,SAAS,CAACZ,IAAI,IAAIY,SAAS,CAACZ,IAAI,CAACe,GAAG,GACjCH,SAAS,CAACZ,IAAI,CAACe,GAAG,GAClBH,SAAS,CAACZ,IACb;UACDgB,QAAQ,EAAG,EAAI;UACfC,OAAO,EAAGA,CAAA,KAAMb,QAAQ,CAAEQ,SAAU,CAAG;UACvCJ,SAAS,EAAC,gDAAgD;UAC1DP,KAAK,EAAGW,SAAS,CAACM,WAAW,IAAIN,SAAS,CAACO;QAAO,CAClD,CAAC,eACFvB,IAAA;UAAMY,SAAS,EAAC,sDAAsD;UAAAC,QAAA,EACnEG,SAAS,CAACO;QAAK,CACZ,CAAC;MAAA,GAhBEP,SAAS,CAACQ,IAiBhB,CACH;IAAC,CACA,CAAC,EAEHf,SAAS,iBACVT,IAAA;MAAKY,SAAS,EAAC,2CAA2C;MAAAC,QAAA,eACzDb,IAAA,CAACJ,MAAM;QACNqB,qBAAqB;QACrBC,OAAO,EAAC,MAAM;QACdG,OAAO,EAAGA,CAAA,KAAMb,QAAQ,CAAC,CAAG;QAAAK,QAAA,EAE1BlB,EAAE,CAAE,MAAO;MAAC,CACP;IAAC,CACL,CACL;EAAA,CACW,CAAC;AAEhB;AAEA,eAAeQ,oBAAoB","ignoreList":[]}
1
+ {"version":3,"names":["clsx","__","Button","Placeholder","layout","jsx","_jsx","jsxs","_jsxs","BlockVariationPicker","icon","label","instructions","variations","onSelect","allowSkip","classes","length","className","children","role","map","variation","__next40pxDefaultSize","variant","src","iconSize","onClick","description","title","name"],"sources":["@wordpress/block-editor/src/components/block-variation-picker/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Button, Placeholder } from '@wordpress/components';\nimport { layout } from '@wordpress/icons';\n\nfunction BlockVariationPicker( {\n\ticon = layout,\n\tlabel = __( 'Choose variation' ),\n\tinstructions = __( 'Select a variation to start with:' ),\n\tvariations,\n\tonSelect,\n\tallowSkip,\n} ) {\n\tconst classes = clsx( 'block-editor-block-variation-picker', {\n\t\t'has-many-variations': variations.length > 4,\n\t} );\n\n\treturn (\n\t\t<Placeholder\n\t\t\ticon={ icon }\n\t\t\tlabel={ label }\n\t\t\tinstructions={ instructions }\n\t\t\tclassName={ classes }\n\t\t>\n\t\t\t{ /*\n\t\t\t * Disable reason: The `list` ARIA role is redundant but\n\t\t\t * Safari+VoiceOver won't announce the list otherwise.\n\t\t\t */\n\t\t\t/* eslint-disable jsx-a11y/no-redundant-roles */ }\n\t\t\t<ul\n\t\t\t\tclassName=\"block-editor-block-variation-picker__variations\"\n\t\t\t\trole=\"list\"\n\t\t\t\taria-label={ __( 'Block variations' ) }\n\t\t\t>\n\t\t\t\t{ variations.map( ( variation ) => (\n\t\t\t\t\t<li key={ variation.name }>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\t\tvariation.icon && variation.icon.src\n\t\t\t\t\t\t\t\t\t? variation.icon.src\n\t\t\t\t\t\t\t\t\t: variation.icon\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ticonSize={ 48 }\n\t\t\t\t\t\t\tonClick={ () => onSelect( variation ) }\n\t\t\t\t\t\t\tclassName=\"block-editor-block-variation-picker__variation\"\n\t\t\t\t\t\t\tlabel={ variation.description || variation.title }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<span className=\"block-editor-block-variation-picker__variation-label\">\n\t\t\t\t\t\t\t{ variation.title }\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</li>\n\t\t\t\t) ) }\n\t\t\t</ul>\n\t\t\t{ /* eslint-enable jsx-a11y/no-redundant-roles */ }\n\t\t\t{ allowSkip && (\n\t\t\t\t<div className=\"block-editor-block-variation-picker__skip\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t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G,GACjCH,SAAS,CAACZ,IAAI,CAACe,GAAG,GAClBH,SAAS,CAACZ,IACb;UACDgB,QAAQ,EAAG,EAAI;UACfC,OAAO,EAAGA,CAAA,KAAMb,QAAQ,CAAEQ,SAAU,CAAG;UACvCJ,SAAS,EAAC,gDAAgD;UAC1DP,KAAK,EAAGW,SAAS,CAACM,WAAW,IAAIN,SAAS,CAACO;QAAO,CAClD,CAAC,eACFvB,IAAA;UAAMY,SAAS,EAAC,sDAAsD;UAAAC,QAAA,EACnEG,SAAS,CAACO;QAAK,CACZ,CAAC;MAAA,GAhBEP,SAAS,CAACQ,IAiBhB,CACH;IAAC,CACA,CAAC,EAEHf,SAAS,iBACVT,IAAA;MAAKY,SAAS,EAAC,2CAA2C;MAAAC,QAAA,eACzDb,IAAA,CAACJ,MAAM;QACNqB,qBAAqB;QACrBC,OAAO,EAAC,MAAM;QACdG,OAAO,EAAGA,CAAA,KAAMb,QAAQ,CAAC,CAAG;QAAAK,QAAA,EAE1BlB,EAAE,CAAE,MAAO;MAAC,CACP;IAAC,CACL,CACL;EAAA,CACW,CAAC;AAEhB;AAEA,eAAeQ,oBAAoB","ignoreList":[]}
@@ -1,4 +1,3 @@
1
- /* wp:polyfill */
2
1
  /**
3
2
  * External dependencies
4
3
  */
@@ -1 +1 @@
1
- {"version":3,"names":["ScrollView","View","Text","TouchableWithoutFeedback","Platform","useDispatch","usePreferredColorSchemeStyle","createBlocksFromInnerBlocksTemplate","__","PanelBody","BottomSheet","FooterMessageControl","Icon","close","styles","store","blockEditorStore","InserterButton","jsx","_jsx","jsxs","_jsxs","hitSlop","top","bottom","left","right","BlockVariationPicker","isVisible","onClose","clientId","variations","replaceInnerBlocks","isIOS","OS","cancelButtonStyle","cancelButton","cancelButtonDark","leftButton","onPress","children","style","maxFontSizeMultiplier","icon","size","closeIcon","onVariationSelect","variation","innerBlocks","title","contentStyle","testID","horizontal","showsHorizontalScrollIndicator","contentContainerStyle","containerStyle","map","v","item","onSelect","name","label"],"sources":["@wordpress/block-editor/src/components/block-variation-picker/index.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport {\n\tScrollView,\n\tView,\n\tText,\n\tTouchableWithoutFeedback,\n\tPlatform,\n} from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { useDispatch } from '@wordpress/data';\nimport { usePreferredColorSchemeStyle } from '@wordpress/compose';\nimport { createBlocksFromInnerBlocksTemplate } from '@wordpress/blocks';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tPanelBody,\n\tBottomSheet,\n\tFooterMessageControl,\n} from '@wordpress/components';\nimport { Icon, close } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\nimport { store as blockEditorStore } from '../../store';\nimport InserterButton from '../inserter-button';\n\nconst hitSlop = { top: 22, bottom: 22, left: 22, right: 22 };\n\nfunction BlockVariationPicker( { isVisible, onClose, clientId, variations } ) {\n\tconst { replaceInnerBlocks } = useDispatch( blockEditorStore );\n\tconst isIOS = Platform.OS === 'ios';\n\n\tconst cancelButtonStyle = usePreferredColorSchemeStyle(\n\t\tstyles.cancelButton,\n\t\tstyles.cancelButtonDark\n\t);\n\n\tconst leftButton = (\n\t\t<TouchableWithoutFeedback onPress={ onClose } hitSlop={ hitSlop }>\n\t\t\t<View>\n\t\t\t\t{ isIOS ? (\n\t\t\t\t\t<Text\n\t\t\t\t\t\tstyle={ cancelButtonStyle }\n\t\t\t\t\t\tmaxFontSizeMultiplier={ 2 }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t\t</Text>\n\t\t\t\t) : (\n\t\t\t\t\t<Icon\n\t\t\t\t\t\ticon={ close }\n\t\t\t\t\t\tsize={ 24 }\n\t\t\t\t\t\tstyle={ styles.closeIcon }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</View>\n\t\t</TouchableWithoutFeedback>\n\t);\n\n\tconst onVariationSelect = ( variation ) => {\n\t\treplaceInnerBlocks(\n\t\t\tclientId,\n\t\t\tcreateBlocksFromInnerBlocksTemplate( variation.innerBlocks )\n\t\t);\n\t\tonClose();\n\t};\n\n\treturn (\n\t\t<BottomSheet\n\t\t\tisVisible={ isVisible }\n\t\t\tonClose={ onClose }\n\t\t\ttitle={ __( 'Select a layout' ) }\n\t\t\tcontentStyle={ styles.contentStyle }\n\t\t\tleftButton={ leftButton }\n\t\t\ttestID=\"block-variation-modal\"\n\t\t>\n\t\t\t<ScrollView\n\t\t\t\thorizontal\n\t\t\t\tshowsHorizontalScrollIndicator={ false }\n\t\t\t\tcontentContainerStyle={ styles.contentContainerStyle }\n\t\t\t\tstyle={ styles.containerStyle }\n\t\t\t>\n\t\t\t\t{ variations.map( ( v ) => (\n\t\t\t\t\t<InserterButton\n\t\t\t\t\t\titem={ v }\n\t\t\t\t\t\tkey={ v.name }\n\t\t\t\t\t\tonSelect={ () => onVariationSelect( v ) }\n\t\t\t\t\t/>\n\t\t\t\t) ) }\n\t\t\t</ScrollView>\n\t\t\t<PanelBody>\n\t\t\t\t<FooterMessageControl\n\t\t\t\t\tlabel={ __(\n\t\t\t\t\t\t'Note: Column layout may vary between themes and screen sizes'\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t</PanelBody>\n\t\t</BottomSheet>\n\t);\n}\n\nexport default BlockVariationPicker;\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,UAAU,EACVC,IAAI,EACJC,IAAI,EACJC,wBAAwB,EACxBC,QAAQ,QACF,cAAc;;AAErB;AACA;AACA;AACA,SAASC,WAAW,QAAQ,iBAAiB;AAC7C,SAASC,4BAA4B,QAAQ,oBAAoB;AACjE,SAASC,mCAAmC,QAAQ,mBAAmB;AACvE,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SACCC,SAAS,EACTC,WAAW,EACXC,oBAAoB,QACd,uBAAuB;AAC9B,SAASC,IAAI,EAAEC,KAAK,QAAQ,kBAAkB;;AAE9C;AACA;AACA;AACA,OAAOC,MAAM,MAAM,cAAc;AACjC,S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BACCR,KAAA,CAACX,WAAW;IACXkB,SAAS,EAAGA,SAAW;IACvBC,OAAO,EAAGA,OAAS;IACnBoB,KAAK,EAAGzC,EAAE,CAAE,iBAAkB,CAAG;IACjC0C,YAAY,EAAGpC,MAAM,CAACoC,YAAc;IACpCZ,UAAU,EAAGA,UAAY;IACzBa,MAAM,EAAC,uBAAuB;IAAAX,QAAA,gBAE9BrB,IAAA,CAACnB,UAAU;MACVoD,UAAU;MACVC,8BAA8B,EAAG,KAAO;MACxCC,qBAAqB,EAAGxC,MAAM,CAACwC,qBAAuB;MACtDb,KAAK,EAAG3B,MAAM,CAACyC,cAAgB;MAAAf,QAAA,EAE7BT,UAAU,CAACyB,GAAG,CAAIC,CAAC,iBACpBtC,IAAA,CAACF,cAAc;QACdyC,IAAI,EAAGD,CAAG;QAEVE,QAAQ,EAAGA,CAAA,KAAMb,iBAAiB,CAAEW,CAAE;MAAG,GADnCA,CAAC,CAACG,IAER,CACA;IAAC,CACQ,CAAC,eACbzC,IAAA,CAACV,SAAS;MAAA+B,QAAA,eACTrB,IAAA,CAACR,oBAAoB;QACpBkD,KAAK,EAAGrD,EAAE,CACT,8DACD;MAAG,CACH;IAAC,CACQ,CAAC;EAAA,CACA,CAAC;AAEhB;AAEA,eAAemB,oBAAoB","ignoreList":[]}
1
+ {"version":3,"names":["ScrollView","View","Text","TouchableWithoutFeedback","Platform","useDispatch","usePreferredColorSchemeStyle","createBlocksFromInnerBlocksTemplate","__","PanelBody","BottomSheet","FooterMessageControl","Icon","close","styles","store","blockEditorStore","InserterButton","jsx","_jsx","jsxs","_jsxs","hitSlop","top","bottom","left","right","BlockVariationPicker","isVisible","onClose","clientId","variations","replaceInnerBlocks","isIOS","OS","cancelButtonStyle","cancelButton","cancelButtonDark","leftButton","onPress","children","style","maxFontSizeMultiplier","icon","size","closeIcon","onVariationSelect","variation","innerBlocks","title","contentStyle","testID","horizontal","showsHorizontalScrollIndicator","contentContainerStyle","containerStyle","map","v","item","onSelect","name","label"],"sources":["@wordpress/block-editor/src/components/block-variation-picker/index.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport {\n\tScrollView,\n\tView,\n\tText,\n\tTouchableWithoutFeedback,\n\tPlatform,\n} from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { useDispatch } from '@wordpress/data';\nimport { usePreferredColorSchemeStyle } from '@wordpress/compose';\nimport { createBlocksFromInnerBlocksTemplate } from '@wordpress/blocks';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tPanelBody,\n\tBottomSheet,\n\tFooterMessageControl,\n} from '@wordpress/components';\nimport { Icon, close } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\nimport { store as blockEditorStore } from '../../store';\nimport InserterButton from '../inserter-button';\n\nconst hitSlop = { top: 22, bottom: 22, left: 22, right: 22 };\n\nfunction BlockVariationPicker( { isVisible, onClose, clientId, variations } ) {\n\tconst { replaceInnerBlocks } = useDispatch( blockEditorStore );\n\tconst isIOS = Platform.OS === 'ios';\n\n\tconst cancelButtonStyle = usePreferredColorSchemeStyle(\n\t\tstyles.cancelButton,\n\t\tstyles.cancelButtonDark\n\t);\n\n\tconst leftButton = (\n\t\t<TouchableWithoutFeedback onPress={ onClose } hitSlop={ hitSlop }>\n\t\t\t<View>\n\t\t\t\t{ isIOS ? (\n\t\t\t\t\t<Text\n\t\t\t\t\t\tstyle={ cancelButtonStyle }\n\t\t\t\t\t\tmaxFontSizeMultiplier={ 2 }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t\t</Text>\n\t\t\t\t) : (\n\t\t\t\t\t<Icon\n\t\t\t\t\t\ticon={ close }\n\t\t\t\t\t\tsize={ 24 }\n\t\t\t\t\t\tstyle={ styles.closeIcon }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</View>\n\t\t</TouchableWithoutFeedback>\n\t);\n\n\tconst onVariationSelect = ( variation ) => {\n\t\treplaceInnerBlocks(\n\t\t\tclientId,\n\t\t\tcreateBlocksFromInnerBlocksTemplate( variation.innerBlocks )\n\t\t);\n\t\tonClose();\n\t};\n\n\treturn (\n\t\t<BottomSheet\n\t\t\tisVisible={ isVisible }\n\t\t\tonClose={ onClose }\n\t\t\ttitle={ __( 'Select a layout' ) }\n\t\t\tcontentStyle={ styles.contentStyle }\n\t\t\tleftButton={ leftButton }\n\t\t\ttestID=\"block-variation-modal\"\n\t\t>\n\t\t\t<ScrollView\n\t\t\t\thorizontal\n\t\t\t\tshowsHorizontalScrollIndicator={ false }\n\t\t\t\tcontentContainerStyle={ styles.contentContainerStyle }\n\t\t\t\tstyle={ styles.containerStyle }\n\t\t\t>\n\t\t\t\t{ variations.map( ( v ) => (\n\t\t\t\t\t<InserterButton\n\t\t\t\t\t\titem={ v }\n\t\t\t\t\t\tkey={ v.name }\n\t\t\t\t\t\tonSelect={ () => onVariationSelect( v ) }\n\t\t\t\t\t/>\n\t\t\t\t) ) }\n\t\t\t</ScrollView>\n\t\t\t<PanelBody>\n\t\t\t\t<FooterMessageControl\n\t\t\t\t\tlabel={ __(\n\t\t\t\t\t\t'Note: Column layout may vary between themes and screen sizes'\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t</PanelBody>\n\t\t</BottomSheet>\n\t);\n}\n\nexport default BlockVariationPicker;\n"],"mappings":"AAAA;AACA;AACA;AACA,SACCA,UAAU,EACVC,IAAI,EACJC,IAAI,EACJC,wBAAwB,EACxBC,QAAQ,QACF,cAAc;;AAErB;AACA;AACA;AACA,SAASC,WAAW,QAAQ,iBAAiB;AAC7C,SAASC,4BAA4B,QAAQ,oBAAoB;AACjE,SAASC,mCAAmC,QAAQ,mBAAmB;AACvE,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SACCC,SAAS,EACTC,WAAW,EACXC,oBAAoB,QACd,uBAAuB;AAC9B,SAASC,IAAI,EAAEC,KAAK,QAAQ,kBAAkB;;AAE9C;AACA;AACA;AACA,OAAOC,MAAM,MAAM,cAAc;AACj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ED,oBACCR,KAAA,CAACX,WAAW;IACXkB,SAAS,EAAGA,SAAW;IACvBC,OAAO,EAAGA,OAAS;IACnBoB,KAAK,EAAGzC,EAAE,CAAE,iBAAkB,CAAG;IACjC0C,YAAY,EAAGpC,MAAM,CAACoC,YAAc;IACpCZ,UAAU,EAAGA,UAAY;IACzBa,MAAM,EAAC,uBAAuB;IAAAX,QAAA,gBAE9BrB,IAAA,CAACnB,UAAU;MACVoD,UAAU;MACVC,8BAA8B,EAAG,KAAO;MACxCC,qBAAqB,EAAGxC,MAAM,CAACwC,qBAAuB;MACtDb,KAAK,EAAG3B,MAAM,CAACyC,cAAgB;MAAAf,QAAA,EAE7BT,UAAU,CAACyB,GAAG,CAAIC,CAAC,iBACpBtC,IAAA,CAACF,cAAc;QACdyC,IAAI,EAAGD,CAAG;QAEVE,QAAQ,EAAGA,CAAA,KAAMb,iBAAiB,CAAEW,CAAE;MAAG,GADnCA,CAAC,CAACG,IAER,CACA;IAAC,CACQ,CAAC,eACbzC,IAAA,CAACV,SAAS;MAAA+B,QAAA,eACTrB,IAAA,CAACR,oBAAoB;QACpBkD,KAAK,EAAGrD,EAAE,CACT,8DACD;MAAG,CACH;IAAC,CACQ,CAAC;EAAA,CACA,CAAC;AAEhB;AAEA,eAAemB,oBAAoB","ignoreList":[]}
@@ -1,4 +1,3 @@
1
- /* wp:polyfill */
2
1
  /**
3
2
  * WordPress dependencies
4
3
  */
@@ -1 +1 @@
1
- {"version":3,"names":["store","blocksStore","__","sprintf","Button","DropdownMenu","MenuGroup","MenuItemsChoice","__experimentalToggleGroupControl","ToggleGroupControl","__experimentalToggleGroupControlOptionIcon","ToggleGroupControlOptionIcon","VisuallyHidden","useSelect","useDispatch","useMemo","chevronDown","BlockIcon","blockEditorStore","unlock","jsx","_jsx","jsxs","_jsxs","VariationsButtons","className","onSelectVariation","selectedValue","variations","children","as","map","variation","__next40pxDefaultSize","size","icon","showColors","isPressed","name","label","title","onClick","showTooltip","VariationsDropdown","selectOptions","description","value","info","text","popoverProps","position","toggleProps","iconPosition","choices","onSelect","VariationsToggleGroupControl","hideLabelFromVision","onChange","__nextHasNoMarginBottom","__experimentalBlockVariationTransforms","blockClientId","updateBlockAttributes","activeBlockVariation","isContentOnly","select","getActiveBlockVariation","getBlockVariations","getBlockName","getBlockAttributes","getBlockEditingMode","hasContentRoleAttribute","isContentBlock","hasUniqueIcons","variationIcons","Set","forEach","add","src","length","variationName","find","attributes","baseClass","showButtons","ButtonComponent","Component"],"sources":["@wordpress/block-editor/src/components/block-variation-transforms/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport { __, sprintf } from '@wordpress/i18n';\nimport {\n\tButton,\n\tDropdownMenu,\n\tMenuGroup,\n\tMenuItemsChoice,\n\t__experimentalToggleGroupControl as ToggleGroupControl,\n\t__experimentalToggleGroupControlOptionIcon as ToggleGroupControlOptionIcon,\n\tVisuallyHidden,\n} from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useMemo } from '@wordpress/element';\nimport { chevronDown } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport BlockIcon from '../block-icon';\nimport { store as blockEditorStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nfunction VariationsButtons( {\n\tclassName,\n\tonSelectVariation,\n\tselectedValue,\n\tvariations,\n} ) {\n\treturn (\n\t\t<fieldset className={ className }>\n\t\t\t<VisuallyHidden as=\"legend\">\n\t\t\t\t{ __( 'Transform to variation' ) }\n\t\t\t</VisuallyHidden>\n\t\t\t{ variations.map( ( variation ) => (\n\t\t\t\t<Button\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\tkey={ variation.name }\n\t\t\t\t\ticon={ <BlockIcon icon={ variation.icon } showColors /> }\n\t\t\t\t\tisPressed={ selectedValue === variation.name }\n\t\t\t\t\tlabel={\n\t\t\t\t\t\tselectedValue === variation.name\n\t\t\t\t\t\t\t? variation.title\n\t\t\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t\t\t/* translators: %s: Block or block variation name. */\n\t\t\t\t\t\t\t\t\t__( 'Transform to %s' ),\n\t\t\t\t\t\t\t\t\tvariation.title\n\t\t\t\t\t\t\t )\n\t\t\t\t\t}\n\t\t\t\t\tonClick={ () => onSelectVariation( variation.name ) }\n\t\t\t\t\taria-label={ variation.title }\n\t\t\t\t\tshowTooltip\n\t\t\t\t/>\n\t\t\t) ) }\n\t\t</fieldset>\n\t);\n}\n\nfunction VariationsDropdown( {\n\tclassName,\n\tonSelectVariation,\n\tselectedValue,\n\tvariations,\n} ) {\n\tconst selectOptions = variations.map(\n\t\t( { name, title, description } ) => ( {\n\t\t\tvalue: name,\n\t\t\tlabel: title,\n\t\t\tinfo: description,\n\t\t} )\n\t);\n\n\treturn (\n\t\t<DropdownMenu\n\t\t\tclassName={ className }\n\t\t\tlabel={ __( 'Transform to variation' ) }\n\t\t\ttext={ __( 'Transform to variation' ) }\n\t\t\tpopoverProps={ {\n\t\t\t\tposition: 'bottom center',\n\t\t\t\tclassName: `${ className }__popover`,\n\t\t\t} }\n\t\t\ticon={ chevronDown }\n\t\t\ttoggleProps={ { iconPosition: 'right' } }\n\t\t>\n\t\t\t{ () => (\n\t\t\t\t<div className={ `${ className }__container` }>\n\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t<MenuItemsChoice\n\t\t\t\t\t\t\tchoices={ selectOptions }\n\t\t\t\t\t\t\tvalue={ selectedValue }\n\t\t\t\t\t\t\tonSelect={ onSelectVariation }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</MenuGroup>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t</DropdownMenu>\n\t);\n}\n\nfunction VariationsToggleGroupControl( {\n\tclassName,\n\tonSelectVariation,\n\tselectedValue,\n\tvariations,\n} ) {\n\treturn (\n\t\t<div className={ className }>\n\t\t\t<ToggleGroupControl\n\t\t\t\tlabel={ __( 'Transform to variation' ) }\n\t\t\t\tvalue={ selectedValue }\n\t\t\t\thideLabelFromVision\n\t\t\t\tonChange={ onSelectVariation }\n\t\t\t\t__next40pxDefaultSize\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t>\n\t\t\t\t{ variations.map( ( variation ) => (\n\t\t\t\t\t<ToggleGroupControlOptionIcon\n\t\t\t\t\t\tkey={ variation.name }\n\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\t<BlockIcon icon={ variation.icon } showColors />\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvalue={ variation.name }\n\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\tselectedValue === variation.name\n\t\t\t\t\t\t\t\t? variation.title\n\t\t\t\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t\t\t\t/* translators: %s: Block or block variation name. */\n\t\t\t\t\t\t\t\t\t\t__( 'Transform to %s' ),\n\t\t\t\t\t\t\t\t\t\tvariation.title\n\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t) ) }\n\t\t\t</ToggleGroupControl>\n\t\t</div>\n\t);\n}\n\nfunction __experimentalBlockVariationTransforms( { blockClientId } ) {\n\tconst { updateBlockAttributes } = useDispatch( blockEditorStore );\n\tconst { activeBlockVariation, variations, isContentOnly } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getActiveBlockVariation, getBlockVariations } =\n\t\t\t\tselect( blocksStore );\n\n\t\t\tconst { getBlockName, getBlockAttributes, getBlockEditingMode } =\n\t\t\t\tselect( blockEditorStore );\n\n\t\t\tconst name = blockClientId && getBlockName( blockClientId );\n\n\t\t\tconst { hasContentRoleAttribute } = unlock( select( blocksStore ) );\n\t\t\tconst isContentBlock = hasContentRoleAttribute( name );\n\n\t\t\treturn {\n\t\t\t\tactiveBlockVariation: getActiveBlockVariation(\n\t\t\t\t\tname,\n\t\t\t\t\tgetBlockAttributes( blockClientId )\n\t\t\t\t),\n\t\t\t\tvariations: name && getBlockVariations( name, 'transform' ),\n\t\t\t\tisContentOnly:\n\t\t\t\t\tgetBlockEditingMode( blockClientId ) === 'contentOnly' &&\n\t\t\t\t\t! isContentBlock,\n\t\t\t};\n\t\t},\n\t\t[ blockClientId ]\n\t);\n\n\tconst selectedValue = activeBlockVariation?.name;\n\n\t// Check if each variation has a unique icon.\n\tconst hasUniqueIcons = useMemo( () => {\n\t\tconst variationIcons = new Set();\n\t\tif ( ! variations ) {\n\t\t\treturn false;\n\t\t}\n\t\tvariations.forEach( ( variation ) => {\n\t\t\tif ( variation.icon ) {\n\t\t\t\tvariationIcons.add( variation.icon?.src || variation.icon );\n\t\t\t}\n\t\t} );\n\t\treturn variationIcons.size === variations.length;\n\t}, [ variations ] );\n\n\tconst onSelectVariation = ( variationName ) => {\n\t\tupdateBlockAttributes( blockClientId, {\n\t\t\t...variations.find( ( { name } ) => name === variationName )\n\t\t\t\t.attributes,\n\t\t} );\n\t};\n\n\tif ( ! variations?.length || isContentOnly ) {\n\t\treturn null;\n\t}\n\n\tconst baseClass = 'block-editor-block-variation-transforms';\n\n\t// Show buttons if there are more than 5 variations because the ToggleGroupControl does not wrap\n\tconst showButtons = variations.length > 5;\n\n\tconst ButtonComponent = showButtons\n\t\t? VariationsButtons\n\t\t: VariationsToggleGroupControl;\n\n\tconst Component = hasUniqueIcons ? ButtonComponent : VariationsDropdown;\n\n\treturn (\n\t\t<Component\n\t\t\tclassName={ baseClass }\n\t\t\tonSelectVariation={ onSelectVariation }\n\t\t\tselectedValue={ selectedValue }\n\t\t\tvariations={ variations }\n\t\t/>\n\t);\n}\n\nexport default __experimentalBlockVariationTransforms;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,KAAK,IAAIC,WAAW,QAAQ,mBAAmB;AACxD,SAASC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AAC7C,SACCC,MAAM,EACNC,YAAY,EACZC,SAAS,EACTC,eAAe,EACfC,gCAAgC,IAAIC,kBAAkB,EACtDC,0CAA0C,IAAIC,4BAA4B,EA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AACgE,SAAS;IACT5D,SAAS,EAAGyD,SAAW;IACvBxD,iBAAiB,EAAGA,iBAAmB;IACvCC,aAAa,EAAGA,aAAe;IAC/BC,UAAU,EAAGA;EAAY,CACzB,CAAC;AAEJ;AAEA,eAAe+B,sCAAsC","ignoreList":[]}
1
+ {"version":3,"names":["store","blocksStore","__","sprintf","Button","DropdownMenu","MenuGroup","MenuItemsChoice","__experimentalToggleGroupControl","ToggleGroupControl","__experimentalToggleGroupControlOptionIcon","ToggleGroupControlOptionIcon","VisuallyHidden","useSelect","useDispatch","useMemo","chevronDown","BlockIcon","blockEditorStore","unlock","jsx","_jsx","jsxs","_jsxs","VariationsButtons","className","onSelectVariation","selectedValue","variations","children","as","map","variation","__next40pxDefaultSize","size","icon","showColors","isPressed","name","label","title","onClick","showTooltip","VariationsDropdown","selectOptions","description","value","info","text","popoverProps","position","toggleProps","iconPosition","choices","onSelect","VariationsToggleGroupControl","hideLabelFromVision","onChange","__nextHasNoMarginBottom","__experimentalBlockVariationTransforms","blockClientId","updateBlockAttributes","activeBlockVariation","isContentOnly","select","getActiveBlockVariation","getBlockVariations","getBlockName","getBlockAttributes","getBlockEditingMode","hasContentRoleAttribute","isContentBlock","hasUniqueIcons","variationIcons","Set","forEach","add","src","length","variationName","find","attributes","baseClass","showButtons","ButtonComponent","Component"],"sources":["@wordpress/block-editor/src/components/block-variation-transforms/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport { __, sprintf } from '@wordpress/i18n';\nimport {\n\tButton,\n\tDropdownMenu,\n\tMenuGroup,\n\tMenuItemsChoice,\n\t__experimentalToggleGroupControl as ToggleGroupControl,\n\t__experimentalToggleGroupControlOptionIcon as ToggleGroupControlOptionIcon,\n\tVisuallyHidden,\n} from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useMemo } from '@wordpress/element';\nimport { chevronDown } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport BlockIcon from '../block-icon';\nimport { store as blockEditorStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nfunction VariationsButtons( {\n\tclassName,\n\tonSelectVariation,\n\tselectedValue,\n\tvariations,\n} ) {\n\treturn (\n\t\t<fieldset className={ className }>\n\t\t\t<VisuallyHidden as=\"legend\">\n\t\t\t\t{ __( 'Transform to variation' ) }\n\t\t\t</VisuallyHidden>\n\t\t\t{ variations.map( ( variation ) => (\n\t\t\t\t<Button\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\tkey={ variation.name }\n\t\t\t\t\ticon={ <BlockIcon icon={ variation.icon } showColors /> }\n\t\t\t\t\tisPressed={ selectedValue === variation.name }\n\t\t\t\t\tlabel={\n\t\t\t\t\t\tselectedValue === variation.name\n\t\t\t\t\t\t\t? variation.title\n\t\t\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t\t\t/* translators: %s: Block or block variation name. */\n\t\t\t\t\t\t\t\t\t__( 'Transform to %s' ),\n\t\t\t\t\t\t\t\t\tvariation.title\n\t\t\t\t\t\t\t )\n\t\t\t\t\t}\n\t\t\t\t\tonClick={ () => onSelectVariation( variation.name ) }\n\t\t\t\t\taria-label={ variation.title }\n\t\t\t\t\tshowTooltip\n\t\t\t\t/>\n\t\t\t) ) }\n\t\t</fieldset>\n\t);\n}\n\nfunction VariationsDropdown( {\n\tclassName,\n\tonSelectVariation,\n\tselectedValue,\n\tvariations,\n} ) {\n\tconst selectOptions = variations.map(\n\t\t( { name, title, description } ) => ( {\n\t\t\tvalue: name,\n\t\t\tlabel: title,\n\t\t\tinfo: description,\n\t\t} )\n\t);\n\n\treturn (\n\t\t<DropdownMenu\n\t\t\tclassName={ className }\n\t\t\tlabel={ __( 'Transform to variation' ) }\n\t\t\ttext={ __( 'Transform to variation' ) }\n\t\t\tpopoverProps={ {\n\t\t\t\tposition: 'bottom center',\n\t\t\t\tclassName: `${ className }__popover`,\n\t\t\t} }\n\t\t\ticon={ chevronDown }\n\t\t\ttoggleProps={ { iconPosition: 'right' } }\n\t\t>\n\t\t\t{ () => (\n\t\t\t\t<div className={ `${ className }__container` }>\n\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t<MenuItemsChoice\n\t\t\t\t\t\t\tchoices={ selectOptions }\n\t\t\t\t\t\t\tvalue={ selectedValue }\n\t\t\t\t\t\t\tonSelect={ onSelectVariation }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</MenuGroup>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t</DropdownMenu>\n\t);\n}\n\nfunction VariationsToggleGroupControl( {\n\tclassName,\n\tonSelectVariation,\n\tselectedValue,\n\tvariations,\n} ) {\n\treturn (\n\t\t<div className={ className }>\n\t\t\t<ToggleGroupControl\n\t\t\t\tlabel={ __( 'Transform to variation' ) }\n\t\t\t\tvalue={ selectedValue }\n\t\t\t\thideLabelFromVision\n\t\t\t\tonChange={ onSelectVariation }\n\t\t\t\t__next40pxDefaultSize\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t>\n\t\t\t\t{ variations.map( ( variation ) => (\n\t\t\t\t\t<ToggleGroupControlOptionIcon\n\t\t\t\t\t\tkey={ variation.name }\n\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\t<BlockIcon icon={ variation.icon } showColors />\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvalue={ variation.name }\n\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\tselectedValue === variation.name\n\t\t\t\t\t\t\t\t? variation.title\n\t\t\t\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t\t\t\t/* translators: %s: Block or block variation name. */\n\t\t\t\t\t\t\t\t\t\t__( 'Transform to %s' ),\n\t\t\t\t\t\t\t\t\t\tvariation.title\n\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t) ) }\n\t\t\t</ToggleGroupControl>\n\t\t</div>\n\t);\n}\n\nfunction __experimentalBlockVariationTransforms( { blockClientId } ) {\n\tconst { updateBlockAttributes } = useDispatch( blockEditorStore );\n\tconst { activeBlockVariation, variations, isContentOnly } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getActiveBlockVariation, getBlockVariations } =\n\t\t\t\tselect( blocksStore );\n\n\t\t\tconst { getBlockName, getBlockAttributes, getBlockEditingMode } =\n\t\t\t\tselect( blockEditorStore );\n\n\t\t\tconst name = blockClientId && getBlockName( blockClientId );\n\n\t\t\tconst { hasContentRoleAttribute } = unlock( select( blocksStore ) );\n\t\t\tconst isContentBlock = hasContentRoleAttribute( name );\n\n\t\t\treturn {\n\t\t\t\tactiveBlockVariation: getActiveBlockVariation(\n\t\t\t\t\tname,\n\t\t\t\t\tgetBlockAttributes( blockClientId )\n\t\t\t\t),\n\t\t\t\tvariations: name && getBlockVariations( name, 'transform' ),\n\t\t\t\tisContentOnly:\n\t\t\t\t\tgetBlockEditingMode( blockClientId ) === 'contentOnly' &&\n\t\t\t\t\t! isContentBlock,\n\t\t\t};\n\t\t},\n\t\t[ blockClientId ]\n\t);\n\n\tconst selectedValue = activeBlockVariation?.name;\n\n\t// Check if each variation has a unique icon.\n\tconst hasUniqueIcons = useMemo( () => {\n\t\tconst variationIcons = new Set();\n\t\tif ( ! variations ) {\n\t\t\treturn false;\n\t\t}\n\t\tvariations.forEach( ( variation ) => {\n\t\t\tif ( variation.icon ) {\n\t\t\t\tvariationIcons.add( variation.icon?.src || variation.icon );\n\t\t\t}\n\t\t} );\n\t\treturn variationIcons.size === variations.length;\n\t}, [ variations ] );\n\n\tconst onSelectVariation = ( variationName ) => {\n\t\tupdateBlockAttributes( blockClientId, {\n\t\t\t...variations.find( ( { name } ) => name === variationName )\n\t\t\t\t.attributes,\n\t\t} );\n\t};\n\n\tif ( ! variations?.length || isContentOnly ) {\n\t\treturn null;\n\t}\n\n\tconst baseClass = 'block-editor-block-variation-transforms';\n\n\t// Show buttons if there are more than 5 variations because the ToggleGroupControl does not wrap\n\tconst showButtons = variations.length > 5;\n\n\tconst ButtonComponent = showButtons\n\t\t? VariationsButtons\n\t\t: VariationsToggleGroupControl;\n\n\tconst Component = hasUniqueIcons ? ButtonComponent : VariationsDropdown;\n\n\treturn (\n\t\t<Component\n\t\t\tclassName={ baseClass }\n\t\t\tonSelectVariation={ onSelectVariation }\n\t\t\tselectedValue={ selectedValue }\n\t\t\tvariations={ variations }\n\t\t/>\n\t);\n}\n\nexport default __experimentalBlockVariationTransforms;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,KAAK,IAAIC,WAAW,QAAQ,mBAAmB;AACxD,SAASC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AAC7C,SACCC,MAAM,EACNC,YAAY,EACZC,SAAS,EACTC,eAAe,EACfC,gCAAgC,IAAIC,kBAAkB,EACtDC,0CAA0C,IAAIC,4BAA4B,EAC1EC,cAAc,QACR,uBAAuB;AAC9B,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SAASC,OAAO,QAAQ,oBAAoB;AAC5C,SAASC,WAAW,QAAQ,kBAAkB;;AAE9C;AACA;AACA;AACA,OAAOC,SAAS,MAAM,eAAe;AACrC,SAASjB,KAAK,IAAIkB,gBAAgB,QAAQ,aAAa;AACvD,SAASC,MAAM,QAAQ,mBAAmB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAE3C,SAASC,iBAAiBA,CAAE;EAC3BC,SAAS;EACTC,iBAAiB;EACjBC,aAAa;EACbC;AACD,CAAC,EAAG;EACH,oBACCL,KAAA;IAAUE,SAAS,EAAGA,SAAW;IAAAI,QAAA,gBAChCR,IAAA,CAACT,cAAc;MAACkB,EAAE,EAAC,QAAQ;MAAAD,QAAA,EACxB3B,EAAE,CAAE,wBAAyB;IAAC,CACjB,CAAC,EACf0B,UAAU,CAACG,GAAG,CAAIC,SAAS,iBAC5BX,IAAA,CAACjB,MAAM;MACN6B,qBAAqB;MACrBC,IAAI,EAAC,SAAS;MAEdC,IA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AAM;IAC9ClB,qBAAqB,CAAED,aAAa,EAAE;MACrC,GAAGhC,UAAU,CAACoD,IAAI,CAAE,CAAE;QAAE1C;MAAK,CAAC,KAAMA,IAAI,KAAKyC,aAAc,CAAC,CAC1DE;IACH,CAAE,CAAC;EACJ,CAAC;EAED,IAAK,CAAErD,UAAU,EAAEkD,MAAM,IAAIf,aAAa,EAAG;IAC5C,OAAO,IAAI;EACZ;EAEA,MAAMmB,SAAS,GAAG,yCAAyC;;EAE3D;EACA,MAAMC,WAAW,GAAGvD,UAAU,CAACkD,MAAM,GAAG,CAAC;EAEzC,MAAMM,eAAe,GAAGD,WAAW,GAChC3D,iBAAiB,GACjB+B,4BAA4B;EAE/B,MAAM8B,SAAS,GAAGb,cAAc,GAAGY,eAAe,GAAGzC,kBAAkB;EAEvE,oBACCtB,IAAA,CAACgE,SAAS;IACT5D,SAAS,EAAGyD,SAAW;IACvBxD,iBAAiB,EAAGA,iBAAmB;IACvCC,aAAa,EAAGA,aAAe;IAC/BC,UAAU,EAAGA;EAAY,CACzB,CAAC;AAEJ;AAEA,eAAe+B,sCAAsC","ignoreList":[]}
@@ -1,4 +1,3 @@
1
- /* wp:polyfill */
2
1
  /**
3
2
  * WordPress dependencies
4
3
  */
@@ -1 +1 @@
1
- {"version":3,"names":["_x","ToolbarGroup","ToolbarDropdownMenu","justifyTop","justifyCenterVertical","justifyBottom","justifyStretchVertical","justifySpaceBetweenVertical","jsx","_jsx","BLOCK_ALIGNMENTS_CONTROLS","top","icon","title","center","bottom","stretch","DEFAULT_CONTROLS","DEFAULT_CONTROL","BlockVerticalAlignmentUI","value","onChange","controls","isCollapsed","isToolbar","applyOrUnset","align","undefined","activeAlignment","defaultAlignmentControl","UIComponent","extraProps","label","map","control","isActive","role","onClick"],"sources":["@wordpress/block-editor/src/components/block-vertical-alignment-control/ui.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { _x } from '@wordpress/i18n';\nimport { ToolbarGroup, ToolbarDropdownMenu } from '@wordpress/components';\nimport {\n\tjustifyTop,\n\tjustifyCenterVertical,\n\tjustifyBottom,\n\tjustifyStretchVertical,\n\tjustifySpaceBetweenVertical,\n} from '@wordpress/icons';\n\nconst BLOCK_ALIGNMENTS_CONTROLS = {\n\ttop: {\n\t\ticon: justifyTop,\n\t\ttitle: _x( 'Align top', 'Block vertical alignment setting' ),\n\t},\n\tcenter: {\n\t\ticon: justifyCenterVertical,\n\t\ttitle: _x( 'Align middle', 'Block vertical alignment setting' ),\n\t},\n\tbottom: {\n\t\ticon: justifyBottom,\n\t\ttitle: _x( 'Align bottom', 'Block vertical alignment setting' ),\n\t},\n\tstretch: {\n\t\ticon: justifyStretchVertical,\n\t\ttitle: _x( 'Stretch to fill', 'Block vertical alignment setting' ),\n\t},\n\t'space-between': {\n\t\ticon: justifySpaceBetweenVertical,\n\t\ttitle: _x( 'Space between', 'Block vertical alignment setting' ),\n\t},\n};\n\nconst DEFAULT_CONTROLS = [ 'top', 'center', 'bottom' ];\nconst DEFAULT_CONTROL = 'top';\n\nfunction BlockVerticalAlignmentUI( {\n\tvalue,\n\tonChange,\n\tcontrols = DEFAULT_CONTROLS,\n\tisCollapsed = true,\n\tisToolbar,\n} ) {\n\tfunction applyOrUnset( align ) {\n\t\treturn () => onChange( value === align ? undefined : align );\n\t}\n\n\tconst activeAlignment = BLOCK_ALIGNMENTS_CONTROLS[ value ];\n\tconst defaultAlignmentControl =\n\t\tBLOCK_ALIGNMENTS_CONTROLS[ DEFAULT_CONTROL ];\n\n\tconst UIComponent = isToolbar ? ToolbarGroup : ToolbarDropdownMenu;\n\tconst extraProps = isToolbar ? { isCollapsed } : {};\n\n\treturn (\n\t\t<UIComponent\n\t\t\ticon={\n\t\t\t\tactiveAlignment\n\t\t\t\t\t? activeAlignment.icon\n\t\t\t\t\t: defaultAlignmentControl.icon\n\t\t\t}\n\t\t\tlabel={ _x(\n\t\t\t\t'Change vertical alignment',\n\t\t\t\t'Block vertical alignment setting label'\n\t\t\t) }\n\t\t\tcontrols={ controls.map( ( control ) => {\n\t\t\t\treturn {\n\t\t\t\t\t...BLOCK_ALIGNMENTS_CONTROLS[ control ],\n\t\t\t\t\tisActive: value === control,\n\t\t\t\t\trole: isCollapsed ? 'menuitemradio' : undefined,\n\t\t\t\t\tonClick: applyOrUnset( control ),\n\t\t\t\t};\n\t\t\t} ) }\n\t\t\t{ ...extraProps }\n\t\t/>\n\t);\n}\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/block-vertical-alignment-toolbar/README.md\n */\nexport default BlockVerticalAlignmentUI;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,YAAY,EAAEC,mBAAmB,QAAQ,uBAAuB;AACzE,SACCC,UAAU,EACVC,qBAAqB,EACrBC,aAAa,EACbC,sBAAsB,EACtBC,2BAA2B,QACrB,kBAAkB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE1B,MAAMC,yBAAyB,GAAG;EACjCC,GAAG,EAAE;IACJC,IAAI,EAAET,UAAU;IAChBU,KAAK,EAAEb,EAAE,CAAE,WAAW,EAAE,kCAAmC;EAC5D,CAAC;EACDc,MAAM,EAAE;IACPF,IAAI,EAAER,qBAAqB;IAC3BS,KAAK,EAAEb,EAAE,CAAE,cAAc,EAAE,kCAAmC;EAC/D,CAAC;EACDe,MAAM,EAAE;IACPH,IAAI,EAAEP,aAAa;IACnBQ,KAAK,EAAEb,EAAE,CAAE,cAAc,EAAE,kCAAmC;EAC/D,CAAC;EACDgB,OAAO,EAAE;IACRJ,IAAI,EAAEN,sBAAsB;IAC5BO,KAAK,EAAEb,EAAE,CAAE,iBAAiB,EAAE,kCAAmC;EAClE,CAAC;EACD,eAAe,EAAE;IAChBY,IAAI,EAAEL,2BAA2B;IACjCM,KAAK,EAAEb,EAAE,CAAE,eAAe,EAAE,kCAAmC;EAChE;AACD,CAAC;AAED,MAAMiB,gBAAgB,GAAG,CAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,CAAE;AACtD,MAAMC,eAAe,GAAG,KAAK;AAE7B,SAASC,wBAAwBA,CAAE;EAClCC,KAAK;EACLC,QAAQ;EACRC,QAAQ,GAAGL,gBAAgB;EAC3BM,WAAW,GAAG,IAAI;EAClBC;AACD,CAAC,EAAG;EACH,SAASC,YAAYA,CAAEC,KAAK,EAAG;IAC9B,OAAO,MAAML,QAAQ,CAAED,KAAK,KAAKM,KAAK,GAAGC,SAAS,GAAGD,KAAM,CAAC;EAC7D;EAEA,MAAME,eAAe,GAAGlB,yBAAyB,CAAEU,KAAK,CAAE;EAC1D,MAAMS,uBAAuB,GAC5BnB,yBAAyB,CAAEQ,eAAe,CAAE;EAE7C,MAAMY,WAAW,GAAGN,SAAS,GAAGvB,YAAY,GAAGC,mBAAmB;EAClE,MAAM6B,UAAU,GAAGP,SAAS,GAAG;IAAED;EAAY,CAAC,GAAG,CAAC,CAAC;EAEnD,oBACCd,IAAA,CAACqB,WAAW;IACXlB,IAAI,EACHgB,eAAe,GACZA,eAAe,CAAChB,IAAI,GACpBiB,uBAAuB,CAACjB,IAC3B;IACDoB,KAAK,EAAGhC,EAAE,CACT,2BAA2B,EAC3B,wCACD,CAAG;IACHsB,QAAQ,EAAGA,QAAQ,CAACW,GAAG,CAAIC,OAAO,IAAM;MACvC,OAAO;QACN,GAAGxB,yBAAyB,CAAEwB,OAAO,CAAE;QACvCC,QAAQ,EAAEf,KAAK,KAAKc,OAAO;QAC3BE,IAAI,EAAEb,WAAW,GAAG,eAAe,GAAGI,SAAS;QAC/CU,OAAO,EAAEZ,YAAY,CAAES,OAAQ;MAChC,CAAC;IACF,CAAE,CAAG;IAAA,GACAH;EAAU,CACf,CAAC;AAEJ;;AAEA;AACA;AACA;AACA,eAAeZ,wBAAwB","ignoreList":[]}
1
+ {"version":3,"names":["_x","ToolbarGroup","ToolbarDropdownMenu","justifyTop","justifyCenterVertical","justifyBottom","justifyStretchVertical","justifySpaceBetweenVertical","jsx","_jsx","BLOCK_ALIGNMENTS_CONTROLS","top","icon","title","center","bottom","stretch","DEFAULT_CONTROLS","DEFAULT_CONTROL","BlockVerticalAlignmentUI","value","onChange","controls","isCollapsed","isToolbar","applyOrUnset","align","undefined","activeAlignment","defaultAlignmentControl","UIComponent","extraProps","label","map","control","isActive","role","onClick"],"sources":["@wordpress/block-editor/src/components/block-vertical-alignment-control/ui.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { _x } from '@wordpress/i18n';\nimport { ToolbarGroup, ToolbarDropdownMenu } from '@wordpress/components';\nimport {\n\tjustifyTop,\n\tjustifyCenterVertical,\n\tjustifyBottom,\n\tjustifyStretchVertical,\n\tjustifySpaceBetweenVertical,\n} from '@wordpress/icons';\n\nconst BLOCK_ALIGNMENTS_CONTROLS = {\n\ttop: {\n\t\ticon: justifyTop,\n\t\ttitle: _x( 'Align top', 'Block vertical alignment setting' ),\n\t},\n\tcenter: {\n\t\ticon: justifyCenterVertical,\n\t\ttitle: _x( 'Align middle', 'Block vertical alignment setting' ),\n\t},\n\tbottom: {\n\t\ticon: justifyBottom,\n\t\ttitle: _x( 'Align bottom', 'Block vertical alignment setting' ),\n\t},\n\tstretch: {\n\t\ticon: justifyStretchVertical,\n\t\ttitle: _x( 'Stretch to fill', 'Block vertical alignment setting' ),\n\t},\n\t'space-between': {\n\t\ticon: justifySpaceBetweenVertical,\n\t\ttitle: _x( 'Space between', 'Block vertical alignment setting' ),\n\t},\n};\n\nconst DEFAULT_CONTROLS = [ 'top', 'center', 'bottom' ];\nconst DEFAULT_CONTROL = 'top';\n\nfunction BlockVerticalAlignmentUI( {\n\tvalue,\n\tonChange,\n\tcontrols = DEFAULT_CONTROLS,\n\tisCollapsed = true,\n\tisToolbar,\n} ) {\n\tfunction applyOrUnset( align ) {\n\t\treturn () => onChange( value === align ? undefined : align );\n\t}\n\n\tconst activeAlignment = BLOCK_ALIGNMENTS_CONTROLS[ value ];\n\tconst defaultAlignmentControl =\n\t\tBLOCK_ALIGNMENTS_CONTROLS[ DEFAULT_CONTROL ];\n\n\tconst UIComponent = isToolbar ? ToolbarGroup : ToolbarDropdownMenu;\n\tconst extraProps = isToolbar ? { isCollapsed } : {};\n\n\treturn (\n\t\t<UIComponent\n\t\t\ticon={\n\t\t\t\tactiveAlignment\n\t\t\t\t\t? activeAlignment.icon\n\t\t\t\t\t: defaultAlignmentControl.icon\n\t\t\t}\n\t\t\tlabel={ _x(\n\t\t\t\t'Change vertical alignment',\n\t\t\t\t'Block vertical alignment setting label'\n\t\t\t) }\n\t\t\tcontrols={ controls.map( ( control ) => {\n\t\t\t\treturn {\n\t\t\t\t\t...BLOCK_ALIGNMENTS_CONTROLS[ control ],\n\t\t\t\t\tisActive: value === control,\n\t\t\t\t\trole: isCollapsed ? 'menuitemradio' : undefined,\n\t\t\t\t\tonClick: applyOrUnset( control ),\n\t\t\t\t};\n\t\t\t} ) }\n\t\t\t{ ...extraProps }\n\t\t/>\n\t);\n}\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/block-vertical-alignment-toolbar/README.md\n */\nexport default BlockVerticalAlignmentUI;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,YAAY,EAAEC,mBAAmB,QAAQ,uBAAuB;AACzE,SACCC,UAAU,EACVC,qBAAqB,EACrBC,aAAa,EACbC,sBAAsB,EACtBC,2BAA2B,QACrB,kBAAkB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE1B,MAAMC,yBAAyB,GAAG;EACjCC,GAAG,EAAE;IACJC,IAAI,EAAET,UAAU;IAChBU,KAAK,EAAEb,EAAE,CAAE,WAAW,EAAE,kCAAmC;EAC5D,CAAC;EACDc,MAAM,EAAE;IACPF,IAAI,EAAER,qBAAqB;IAC3BS,KAAK,EAAEb,EAAE,CAAE,cAAc,EAAE,kCAAmC;EAC/D,CAAC;EACDe,MAAM,EAAE;IACPH,IAAI,EAAEP,aAAa;IACnBQ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,KAAKc,OAAO;QAC3BE,IAAI,EAAEb,WAAW,GAAG,eAAe,GAAGI,SAAS;QAC/CU,OAAO,EAAEZ,YAAY,CAAES,OAAQ;MAChC,CAAC;IACF,CAAE,CAAG;IAAA,GACAH;EAAU,CACf,CAAC;AAEJ;;AAEA;AACA;AACA;AACA,eAAeZ,wBAAwB","ignoreList":[]}
@@ -1,4 +1,3 @@
1
- /* wp:polyfill */
2
1
  /**
3
2
  * WordPress dependencies
4
3
  */
@@ -1 +1 @@
1
- {"version":3,"names":["BaseControl","RangeControl","__experimentalParseQuantityAndUnitFromRawValue","parseQuantityAndUnitFromRawValue","__experimentalUseCustomUnits","useCustomUnits","useState","__","AllInputControl","InputControls","LinkedButton","useSettings","getAllValue","getAllUnit","hasDefinedValues","hasMixedValues","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","DEFAULT_VALUES","topLeft","undefined","topRight","bottomLeft","bottomRight","MIN_BORDER_RADIUS_VALUE","MAX_BORDER_RADIUS_VALUES","px","em","rem","BorderRadiusControl","onChange","values","isLinked","setIsLinked","selectedUnits","setSelectedUnits","flat","availableUnits","units","unit","unitConfig","find","item","value","step","allValue","toggleLinked","handleSliderChange","next","className","children","VisualLabel","as","min","__next40pxDefaultSize","label","hideLabelFromVision","max","initialPosition","withInputField","__nextHasNoMarginBottom","onClick"],"sources":["@wordpress/block-editor/src/components/border-radius-control/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tBaseControl,\n\tRangeControl,\n\t__experimentalParseQuantityAndUnitFromRawValue as parseQuantityAndUnitFromRawValue,\n\t__experimentalUseCustomUnits as useCustomUnits,\n} from '@wordpress/components';\nimport { useState } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport AllInputControl from './all-input-control';\nimport InputControls from './input-controls';\nimport LinkedButton from './linked-button';\nimport { useSettings } from '../use-settings';\nimport {\n\tgetAllValue,\n\tgetAllUnit,\n\thasDefinedValues,\n\thasMixedValues,\n} from './utils';\n\nconst DEFAULT_VALUES = {\n\ttopLeft: undefined,\n\ttopRight: undefined,\n\tbottomLeft: undefined,\n\tbottomRight: undefined,\n};\nconst MIN_BORDER_RADIUS_VALUE = 0;\nconst MAX_BORDER_RADIUS_VALUES = {\n\tpx: 100,\n\tem: 20,\n\trem: 20,\n};\n\n/**\n * Control to display border radius options.\n *\n * @param {Object} props Component props.\n * @param {Function} props.onChange Callback to handle onChange.\n * @param {Object} props.values Border radius values.\n *\n * @return {Element} Custom border radius control.\n */\nexport default function BorderRadiusControl( { onChange, values } ) {\n\tconst [ isLinked, setIsLinked ] = useState(\n\t\t! hasDefinedValues( values ) || ! hasMixedValues( values )\n\t);\n\n\t// Tracking selected units via internal state allows filtering of CSS unit\n\t// only values from being saved while maintaining preexisting unit selection\n\t// behaviour. Filtering CSS unit only values prevents invalid style values.\n\tconst [ selectedUnits, setSelectedUnits ] = useState( {\n\t\tflat:\n\t\t\ttypeof values === 'string'\n\t\t\t\t? parseQuantityAndUnitFromRawValue( values )[ 1 ]\n\t\t\t\t: undefined,\n\t\ttopLeft: parseQuantityAndUnitFromRawValue( values?.topLeft )[ 1 ],\n\t\ttopRight: parseQuantityAndUnitFromRawValue( values?.topRight )[ 1 ],\n\t\tbottomLeft: parseQuantityAndUnitFromRawValue( values?.bottomLeft )[ 1 ],\n\t\tbottomRight: parseQuantityAndUnitFromRawValue(\n\t\t\tvalues?.bottomRight\n\t\t)[ 1 ],\n\t} );\n\n\tconst [ availableUnits ] = useSettings( 'spacing.units' );\n\tconst units = useCustomUnits( {\n\t\tavailableUnits: availableUnits || [ 'px', 'em', 'rem' ],\n\t} );\n\n\tconst unit = getAllUnit( selectedUnits );\n\tconst unitConfig = units && units.find( ( item ) => item.value === unit );\n\tconst step = unitConfig?.step || 1;\n\n\tconst [ allValue ] = parseQuantityAndUnitFromRawValue(\n\t\tgetAllValue( values )\n\t);\n\n\tconst toggleLinked = () => setIsLinked( ! isLinked );\n\n\tconst handleSliderChange = ( next ) => {\n\t\tonChange( next !== undefined ? `${ next }${ unit }` : undefined );\n\t};\n\n\treturn (\n\t\t<fieldset className=\"components-border-radius-control\">\n\t\t\t<BaseControl.VisualLabel as=\"legend\">\n\t\t\t\t{ __( 'Radius' ) }\n\t\t\t</BaseControl.VisualLabel>\n\t\t\t<div className=\"components-border-radius-control__wrapper\">\n\t\t\t\t{ isLinked ? (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<AllInputControl\n\t\t\t\t\t\t\tclassName=\"components-border-radius-control__unit-control\"\n\t\t\t\t\t\t\tvalues={ values }\n\t\t\t\t\t\t\tmin={ MIN_BORDER_RADIUS_VALUE }\n\t\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\t\tselectedUnits={ selectedUnits }\n\t\t\t\t\t\t\tsetSelectedUnits={ setSelectedUnits }\n\t\t\t\t\t\t\tunits={ units }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<RangeControl\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tlabel={ __( 'Border radius' ) }\n\t\t\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t\t\tclassName=\"components-border-radius-control__range-control\"\n\t\t\t\t\t\t\tvalue={ allValue ?? '' }\n\t\t\t\t\t\t\tmin={ MIN_BORDER_RADIUS_VALUE }\n\t\t\t\t\t\t\tmax={ MAX_BORDER_RADIUS_VALUES[ unit ] }\n\t\t\t\t\t\t\tinitialPosition={ 0 }\n\t\t\t\t\t\t\twithInputField={ false }\n\t\t\t\t\t\t\tonChange={ handleSliderChange }\n\t\t\t\t\t\t\tstep={ step }\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t/>\n\t\t\t\t\t</>\n\t\t\t\t) : (\n\t\t\t\t\t<InputControls\n\t\t\t\t\t\tmin={ MIN_BORDER_RADIUS_VALUE }\n\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\tselectedUnits={ selectedUnits }\n\t\t\t\t\t\tsetSelectedUnits={ setSelectedUnits }\n\t\t\t\t\t\tvalues={ values || DEFAULT_VALUES }\n\t\t\t\t\t\tunits={ units }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t<LinkedButton onClick={ toggleLinked } isLinked={ isLinked } />\n\t\t\t</div>\n\t\t</fieldset>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,WAAW,EACXC,YAAY,EACZC,8CAA8C,IAAIC,gCAAgC,EAClFC,4BAA4B,IAAIC,cAAc,QACxC,uBAAuB;AAC9B,SAASC,QAAQ,QAAQ,oBAAoB;AAC7C,SAASC,EAAE,QAAQ,iBAAiB;;AAEpC;AACA;AACA;AACA,OAAOC,eAAe,MAAM,qBAAqB;AACjD,OAAOC,aAAa,MAAM,kBAAkB;AAC5C,OAAOC,YAAY,MAAM,iBAAiB;AAC1C,SAASC,WAAW,QAAQ,iBAAiB;AAC7C,SACCC,WAAW,EACXC,UAAU,EACVC,gBAAgB,EAChBC,cAAc,QACR,SAAS;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,QAAA,IAAAC,SAAA,EAAAC,IAAA,IAAAC,KAAA;AAEjB,MAAMC,cAAc,GAAG;EACtBC,OAAO,EAAEC,SAAS;EAClBC,QAAQ,EAAED,SAAS;EACnBE,UAAU,EAAEF,SAAS;EACrBG,WAAW,EAAEH;AACd,CAAC;AACD,MAAMI,uBAAuB,GAAG,CAAC;AACjC,MAAMC,wBAAwB,GAAG;EAChCC,EAAE,EAAE,GAAG;EACPC,EAAE,EAAE,EAAE;EACNC,GAAG,EAAE;AACN,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAASC,mBAAmBA,CAAE;EAAEC,QAAQ;EAAEC;AAAO,CAAC,EAAG;EACnE,MAAM,CAAEC,QAAQ,EAAEC,WAAW,CAAE,GAAG/B,QAAQ,CACzC,CAAEQ,gBAAgB,CAAEqB,MAAO,CAAC,IAAI,CAAEpB,cAAc,CA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Ib,cAAgB;QACnCoB,KAAK,EAAGA;MAAO,CACf,CACD,eACDzB,IAAA,CAACP,YAAY;QAACuD,OAAO,EAAGf,YAAc;QAACd,QAAQ,EAAGA;MAAU,CAAE,CAAC;IAAA,CAC3D,CAAC;EAAA,CACG,CAAC;AAEb","ignoreList":[]}
1
+ {"version":3,"names":["BaseControl","RangeControl","__experimentalParseQuantityAndUnitFromRawValue","parseQuantityAndUnitFromRawValue","__experimentalUseCustomUnits","useCustomUnits","useState","__","AllInputControl","InputControls","LinkedButton","useSettings","getAllValue","getAllUnit","hasDefinedValues","hasMixedValues","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","DEFAULT_VALUES","topLeft","undefined","topRight","bottomLeft","bottomRight","MIN_BORDER_RADIUS_VALUE","MAX_BORDER_RADIUS_VALUES","px","em","rem","BorderRadiusControl","onChange","values","isLinked","setIsLinked","selectedUnits","setSelectedUnits","flat","availableUnits","units","unit","unitConfig","find","item","value","step","allValue","toggleLinked","handleSliderChange","next","className","children","VisualLabel","as","min","__next40pxDefaultSize","label","hideLabelFromVision","max","initialPosition","withInputField","__nextHasNoMarginBottom","onClick"],"sources":["@wordpress/block-editor/src/components/border-radius-control/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tBaseControl,\n\tRangeControl,\n\t__experimentalParseQuantityAndUnitFromRawValue as parseQuantityAndUnitFromRawValue,\n\t__experimentalUseCustomUnits as useCustomUnits,\n} from '@wordpress/components';\nimport { useState } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport AllInputControl from './all-input-control';\nimport InputControls from './input-controls';\nimport LinkedButton from './linked-button';\nimport { useSettings } from '../use-settings';\nimport {\n\tgetAllValue,\n\tgetAllUnit,\n\thasDefinedValues,\n\thasMixedValues,\n} from './utils';\n\nconst DEFAULT_VALUES = {\n\ttopLeft: undefined,\n\ttopRight: undefined,\n\tbottomLeft: undefined,\n\tbottomRight: undefined,\n};\nconst MIN_BORDER_RADIUS_VALUE = 0;\nconst MAX_BORDER_RADIUS_VALUES = {\n\tpx: 100,\n\tem: 20,\n\trem: 20,\n};\n\n/**\n * Control to display border radius options.\n *\n * @param {Object} props Component props.\n * @param {Function} props.onChange Callback to handle onChange.\n * @param {Object} props.values Border radius values.\n *\n * @return {Element} Custom border radius control.\n */\nexport default function BorderRadiusControl( { onChange, values } ) {\n\tconst [ isLinked, setIsLinked ] = useState(\n\t\t! hasDefinedValues( values ) || ! hasMixedValues( values )\n\t);\n\n\t// Tracking selected units via internal state allows filtering of CSS unit\n\t// only values from being saved while maintaining preexisting unit selection\n\t// behaviour. Filtering CSS unit only values prevents invalid style values.\n\tconst [ selectedUnits, setSelectedUnits ] = useState( {\n\t\tflat:\n\t\t\ttypeof values === 'string'\n\t\t\t\t? parseQuantityAndUnitFromRawValue( values )[ 1 ]\n\t\t\t\t: undefined,\n\t\ttopLeft: parseQuantityAndUnitFromRawValue( values?.topLeft )[ 1 ],\n\t\ttopRight: parseQuantityAndUnitFromRawValue( values?.topRight )[ 1 ],\n\t\tbottomLeft: parseQuantityAndUnitFromRawValue( values?.bottomLeft )[ 1 ],\n\t\tbottomRight: parseQuantityAndUnitFromRawValue(\n\t\t\tvalues?.bottomRight\n\t\t)[ 1 ],\n\t} );\n\n\tconst [ availableUnits ] = useSettings( 'spacing.units' );\n\tconst units = useCustomUnits( {\n\t\tavailableUnits: availableUnits || [ 'px', 'em', 'rem' ],\n\t} );\n\n\tconst unit = getAllUnit( selectedUnits );\n\tconst unitConfig = units && units.find( ( item ) => item.value === unit );\n\tconst step = unitConfig?.step || 1;\n\n\tconst [ allValue ] = parseQuantityAndUnitFromRawValue(\n\t\tgetAllValue( values )\n\t);\n\n\tconst toggleLinked = () => setIsLinked( ! isLinked );\n\n\tconst handleSliderChange = ( next ) => {\n\t\tonChange( next !== undefined ? `${ next }${ unit }` : undefined );\n\t};\n\n\treturn (\n\t\t<fieldset className=\"components-border-radius-control\">\n\t\t\t<BaseControl.VisualLabel as=\"legend\">\n\t\t\t\t{ __( 'Radius' ) }\n\t\t\t</BaseControl.VisualLabel>\n\t\t\t<div className=\"components-border-radius-control__wrapper\">\n\t\t\t\t{ isLinked ? (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<AllInputControl\n\t\t\t\t\t\t\tclassName=\"components-border-radius-control__unit-control\"\n\t\t\t\t\t\t\tvalues={ values }\n\t\t\t\t\t\t\tmin={ MIN_BORDER_RADIUS_VALUE }\n\t\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\t\tselectedUnits={ selectedUnits }\n\t\t\t\t\t\t\tsetSelectedUnits={ setSelectedUnits }\n\t\t\t\t\t\t\tunits={ units }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<RangeControl\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tlabel={ __( 'Border radius' ) }\n\t\t\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t\t\tclassName=\"components-border-radius-control__range-control\"\n\t\t\t\t\t\t\tvalue={ allValue ?? '' }\n\t\t\t\t\t\t\tmin={ MIN_BORDER_RADIUS_VALUE }\n\t\t\t\t\t\t\tmax={ MAX_BORDER_RADIUS_VALUES[ unit ] }\n\t\t\t\t\t\t\tinitialPosition={ 0 }\n\t\t\t\t\t\t\twithInputField={ false }\n\t\t\t\t\t\t\tonChange={ handleSliderChange }\n\t\t\t\t\t\t\tstep={ step }\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t/>\n\t\t\t\t\t</>\n\t\t\t\t) : (\n\t\t\t\t\t<InputControls\n\t\t\t\t\t\tmin={ MIN_BORDER_RADIUS_VALUE }\n\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\tselectedUnits={ selectedUnits }\n\t\t\t\t\t\tsetSelectedUnits={ setSelectedUnits }\n\t\t\t\t\t\tvalues={ values || DEFAULT_VALUES }\n\t\t\t\t\t\tunits={ units }\n\t\t\t\t\t/>\n\t\t\t\t) }\n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A;MAAU,CAAE,CAAC;IAAA,CAC3D,CAAC;EAAA,CACG,CAAC;AAEb","ignoreList":[]}
@@ -1,4 +1,3 @@
1
- /* wp:polyfill */
2
1
  /**
3
2
  * WordPress dependencies
4
3
  */
@@ -1 +1 @@
1
- {"version":3,"names":["__experimentalParseQuantityAndUnitFromRawValue","parseQuantityAndUnitFromRawValue","__experimentalUnitControl","UnitControl","Tooltip","__","jsx","_jsx","CORNERS","topLeft","topRight","bottomLeft","bottomRight","BoxInputControls","onChange","selectedUnits","setSelectedUnits","values","valuesProp","props","createHandleOnChange","corner","next","isNumeric","isNaN","parseFloat","nextValue","undefined","createHandleOnUnitChange","side","newUnits","className","children","Object","entries","map","label","parsedQuantity","parsedUnit","computedUnit","flat","text","placement","value","join","onUnitChange","size"],"sources":["@wordpress/block-editor/src/components/border-radius-control/input-controls.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalParseQuantityAndUnitFromRawValue as parseQuantityAndUnitFromRawValue,\n\t__experimentalUnitControl as UnitControl,\n\tTooltip,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\nconst CORNERS = {\n\ttopLeft: __( 'Top left' ),\n\ttopRight: __( 'Top right' ),\n\tbottomLeft: __( 'Bottom left' ),\n\tbottomRight: __( 'Bottom right' ),\n};\n\nexport default function BoxInputControls( {\n\tonChange,\n\tselectedUnits,\n\tsetSelectedUnits,\n\tvalues: valuesProp,\n\t...props\n} ) {\n\tconst createHandleOnChange = ( corner ) => ( next ) => {\n\t\tif ( ! onChange ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Filter out CSS-unit-only values to prevent invalid styles.\n\t\tconst isNumeric = ! isNaN( parseFloat( next ) );\n\t\tconst nextValue = isNumeric ? next : undefined;\n\n\t\tonChange( {\n\t\t\t...values,\n\t\t\t[ corner ]: nextValue,\n\t\t} );\n\t};\n\n\tconst createHandleOnUnitChange = ( side ) => ( next ) => {\n\t\tconst newUnits = { ...selectedUnits };\n\t\tnewUnits[ side ] = next;\n\t\tsetSelectedUnits( newUnits );\n\t};\n\n\t// For shorthand style & backwards compatibility, handle flat string value.\n\tconst values =\n\t\ttypeof valuesProp !== 'string'\n\t\t\t? valuesProp\n\t\t\t: {\n\t\t\t\t\ttopLeft: valuesProp,\n\t\t\t\t\ttopRight: valuesProp,\n\t\t\t\t\tbottomLeft: valuesProp,\n\t\t\t\t\tbottomRight: valuesProp,\n\t\t\t };\n\n\t// Controls are wrapped in tooltips as visible labels aren't desired here.\n\t// Tooltip rendering also requires the UnitControl to be wrapped. See:\n\t// https://github.com/WordPress/gutenberg/pull/24966#issuecomment-685875026\n\treturn (\n\t\t<div className=\"components-border-radius-control__input-controls-wrapper\">\n\t\t\t{ Object.entries( CORNERS ).map( ( [ corner, label ] ) => {\n\t\t\t\tconst [ parsedQuantity, parsedUnit ] =\n\t\t\t\t\tparseQuantityAndUnitFromRawValue( values[ corner ] );\n\n\t\t\t\tconst computedUnit = values[ corner ]\n\t\t\t\t\t? parsedUnit\n\t\t\t\t\t: selectedUnits[ corner ] || selectedUnits.flat;\n\n\t\t\t\treturn (\n\t\t\t\t\t<Tooltip text={ label } placement=\"top\" key={ corner }>\n\t\t\t\t\t\t<div className=\"components-border-radius-control__tooltip-wrapper\">\n\t\t\t\t\t\t\t<UnitControl\n\t\t\t\t\t\t\t\t{ ...props }\n\t\t\t\t\t\t\t\taria-label={ label }\n\t\t\t\t\t\t\t\tvalue={ [ parsedQuantity, computedUnit ].join(\n\t\t\t\t\t\t\t\t\t''\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tonChange={ createHandleOnChange( corner ) }\n\t\t\t\t\t\t\t\tonUnitChange={ createHandleOnUnitChange(\n\t\t\t\t\t\t\t\t\tcorner\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tsize=\"__unstable-large\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</Tooltip>\n\t\t\t\t);\n\t\t\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AEO,UAAU;IACtBN,WAAW,EAAEM;EACb,CAAC;;EAEL;EACA;EACA;EACA,oBACCX,IAAA;IAAKwB,SAAS,EAAC,0DAA0D;IAAAC,QAAA,EACtEC,MAAM,CAACC,OAAO,CAAE1B,OAAQ,CAAC,CAAC2B,GAAG,CAAE,CAAE,CAAEd,MAAM,EAAEe,KAAK,CAAE,KAAM;MACzD,MAAM,CAAEC,cAAc,EAAEC,UAAU,CAAE,GACnCrC,gCAAgC,CAAEgB,MAAM,CAAEI,MAAM,CAAG,CAAC;MAErD,MAAMkB,YAAY,GAAGtB,MAAM,CAAEI,MAAM,CAAE,GAClCiB,UAAU,GACVvB,aAAa,CAAEM,MAAM,CAAE,IAAIN,aAAa,CAACyB,IAAI;MAEhD,oBACCjC,IAAA,CAACH,OAAO;QAACqC,IAAI,EAAGL,KAAO;QAACM,SAAS,EAAC,KAAK;QAAAV,QAAA,eACtCzB,IAAA;UAAKwB,SAAS,EAAC,mDAAmD;UAAAC,QAAA,eACjEzB,IAAA,CAACJ,WAAW;YAAA,GACNgB,KAAK;YACV,cAAaiB,KAAO;YACpBO,KAAK,EAAG,CAAEN,cAAc,EAAEE,YAAY,CAAE,CAACK,IAAI,CAC5C,EACD,CAAG;YACH9B,QAAQ,EAAGM,oBAAoB,CAAEC,MAAO,CAAG;YAC3CwB,YAAY,EAAGjB,wBAAwB,CACtCP,MACD,CAAG;YACHyB,IAAI,EAAC;UAAkB,CACvB;QAAC,CACE;MAAC,GAduCzB,MAerC,CAAC;IAEZ,CAAE;EAAC,CACC,CAAC;AAER","ignoreList":[]}
1
+ {"version":3,"names":["__experimentalParseQuantityAndUnitFromRawValue","parseQuantityAndUnitFromRawValue","__experimentalUnitControl","UnitControl","Tooltip","__","jsx","_jsx","CORNERS","topLeft","topRight","bottomLeft","bottomRight","BoxInputControls","onChange","selectedUnits","setSelectedUnits","values","valuesProp","props","createHandleOnChange","corner","next","isNumeric","isNaN","parseFloat","nextValue","undefined","createHandleOnUnitChange","side","newUnits","className","children","Object","entries","map","label","parsedQuantity","parsedUnit","computedUnit","flat","text","placement","value","join","onUnitChange","size"],"sources":["@wordpress/block-editor/src/components/border-radius-control/input-controls.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalParseQuantityAndUnitFromRawValue as parseQuantityAndUnitFromRawValue,\n\t__experimentalUnitControl as UnitControl,\n\tTooltip,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\nconst CORNERS = {\n\ttopLeft: __( 'Top left' ),\n\ttopRight: __( 'Top right' ),\n\tbottomLeft: __( 'Bottom left' ),\n\tbottomRight: __( 'Bottom right' ),\n};\n\nexport default function BoxInputControls( {\n\tonChange,\n\tselectedUnits,\n\tsetSelectedUnits,\n\tvalues: valuesProp,\n\t...props\n} ) {\n\tconst createHandleOnChange = ( corner ) => ( next ) => {\n\t\tif ( ! onChange ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Filter out CSS-unit-only values to prevent invalid styles.\n\t\tconst isNumeric = ! isNaN( parseFloat( next ) );\n\t\tconst nextValue = isNumeric ? next : undefined;\n\n\t\tonChange( {\n\t\t\t...values,\n\t\t\t[ corner ]: nextValue,\n\t\t} );\n\t};\n\n\tconst createHandleOnUnitChange = ( side ) => ( next ) => {\n\t\tconst newUnits = { ...selectedUnits };\n\t\tnewUnits[ side ] = next;\n\t\tsetSelectedUnits( newUnits );\n\t};\n\n\t// For shorthand style & backwards compatibility, handle flat string value.\n\tconst values =\n\t\ttypeof valuesProp !== 'string'\n\t\t\t? valuesProp\n\t\t\t: {\n\t\t\t\t\ttopLeft: valuesProp,\n\t\t\t\t\ttopRight: valuesProp,\n\t\t\t\t\tbottomLeft: valuesProp,\n\t\t\t\t\tbottomRight: valuesProp,\n\t\t\t };\n\n\t// Controls are wrapped in tooltips as visible labels aren't desired here.\n\t// Tooltip rendering also requires the UnitControl to be wrapped. See:\n\t// https://github.com/WordPress/gutenberg/pull/24966#issuecomment-685875026\n\treturn (\n\t\t<div className=\"components-border-radius-control__input-controls-wrapper\">\n\t\t\t{ Object.entries( CORNERS ).map( ( [ corner, label ] ) => {\n\t\t\t\tconst [ parsedQuantity, parsedUnit ] =\n\t\t\t\t\tparseQuantityAndUnitFromRawValue( values[ corner ] );\n\n\t\t\t\tconst computedUnit = values[ corner ]\n\t\t\t\t\t? parsedUnit\n\t\t\t\t\t: selectedUnits[ corner ] || selectedUnits.flat;\n\n\t\t\t\treturn (\n\t\t\t\t\t<Tooltip text={ label } placement=\"top\" key={ corner }>\n\t\t\t\t\t\t<div className=\"components-border-radius-control__tooltip-wrapper\">\n\t\t\t\t\t\t\t<UnitControl\n\t\t\t\t\t\t\t\t{ ...props }\n\t\t\t\t\t\t\t\taria-label={ label }\n\t\t\t\t\t\t\t\tvalue={ [ parsedQuantity, computedUnit ].join(\n\t\t\t\t\t\t\t\t\t''\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tonChange={ createHandleOnChange( corner ) }\n\t\t\t\t\t\t\t\tonUnitChange={ createHandleOnUnitChange(\n\t\t\t\t\t\t\t\t\tcorner\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tsize=\"__unstable-large\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</Tooltip>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</div>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SACCA,8CAA8C,IAAIC,gCAAgC,EAClFC,yBAAyB,IAAIC,WAAW,EACxCC,OAAO,QACD,uBAAuB;AAC9B,SAASC,EAAE,QAAQ,iBAAiB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAErC,MAAMC,OAAO,GAAG;EACfC,OAAO,EAAEJ,EAAE,CAAE,UAAW,CAAC;EACzBK,QAAQ,EAAEL,EAAE,CAAE,WAAY,CAAC;EAC3BM,UAAU,EAAEN,EAAE,CAAE,aAAc,CAAC;EAC/BO,WAAW,EAAEP,EAAE,CAAE,cAAe;A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CAAEM,MAAM,CAAE,IAAIN,aAAa,CAACyB,IAAI;MAEhD,oBACCjC,IAAA,CAACH,OAAO;QAACqC,IAAI,EAAGL,KAAO;QAACM,SAAS,EAAC,KAAK;QAAAV,QAAA,eACtCzB,IAAA;UAAKwB,SAAS,EAAC,mDAAmD;UAAAC,QAAA,eACjEzB,IAAA,CAACJ,WAAW;YAAA,GACNgB,KAAK;YACV,cAAaiB,KAAO;YACpBO,KAAK,EAAG,CAAEN,cAAc,EAAEE,YAAY,CAAE,CAACK,IAAI,CAC5C,EACD,CAAG;YACH9B,QAAQ,EAAGM,oBAAoB,CAAEC,MAAO,CAAG;YAC3CwB,YAAY,EAAGjB,wBAAwB,CACtCP,MACD,CAAG;YACHyB,IAAI,EAAC;UAAkB,CACvB;QAAC,CACE;MAAC,GAduCzB,MAerC,CAAC;IAEZ,CAAE;EAAC,CACC,CAAC;AAER","ignoreList":[]}
@@ -1,4 +1,3 @@
1
- /* wp:polyfill */
2
1
  /**
3
2
  * WordPress dependencies
4
3
  */
@@ -1 +1 @@
1
- {"version":3,"names":["__experimentalParseQuantityAndUnitFromRawValue","parseQuantityAndUnitFromRawValue","mode","inputArray","arr","sort","a","b","filter","v","length","shift","getAllUnit","selectedUnits","flat","cornerUnits","Object","values","Boolean","getAllValue","parsedQuantitiesAndUnits","map","value","allValues","_value$","allUnits","every","unit","allValue","undefined","hasMixedValues","isMixed","isNaN","parseFloat","hasDefinedValues","filteredValues"],"sources":["@wordpress/block-editor/src/components/border-radius-control/utils.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __experimentalParseQuantityAndUnitFromRawValue as parseQuantityAndUnitFromRawValue } from '@wordpress/components';\n\n/**\n * Gets the (non-undefined) item with the highest occurrence within an array\n * Based in part on: https://stackoverflow.com/a/20762713\n *\n * Undefined values are always sorted to the end by `sort`, so this function\n * returns the first element, to always prioritize real values over undefined\n * values.\n *\n * See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#description\n *\n * @param {Array<any>} inputArray Array of items to check.\n * @return {any} The item with the most occurrences.\n */\nexport function mode( inputArray ) {\n\tconst arr = [ ...inputArray ];\n\treturn arr\n\t\t.sort(\n\t\t\t( a, b ) =>\n\t\t\t\tinputArray.filter( ( v ) => v === b ).length -\n\t\t\t\tinputArray.filter( ( v ) => v === a ).length\n\t\t)\n\t\t.shift();\n}\n\n/**\n * Returns the most common CSS unit from the current CSS unit selections.\n *\n * - If a single flat border radius is set, its unit will be used\n * - If individual corner selections, the most common of those will be used\n * - Failing any unit selections a default of 'px' is returned.\n *\n * @param {Object} selectedUnits Unit selections for flat radius & each corner.\n * @return {string} Most common CSS unit from current selections. Default: `px`.\n */\nexport function getAllUnit( selectedUnits = {} ) {\n\tconst { flat, ...cornerUnits } = selectedUnits;\n\treturn (\n\t\tflat || mode( Object.values( cornerUnits ).filter( Boolean ) ) || 'px'\n\t);\n}\n\n/**\n * Gets the 'all' input value and unit from values data.\n *\n * @param {Object|string} values Radius values.\n * @return {string} A value + unit for the 'all' input.\n */\nexport function getAllValue( values = {} ) {\n\t/**\n\t * Border radius support was originally a single pixel value.\n\t *\n\t * To maintain backwards compatibility treat this case as the all value.\n\t */\n\tif ( typeof values === 'string' ) {\n\t\treturn values;\n\t}\n\n\tconst parsedQuantitiesAndUnits = Object.values( values ).map( ( value ) =>\n\t\tparseQuantityAndUnitFromRawValue( value )\n\t);\n\n\tconst allValues = parsedQuantitiesAndUnits.map(\n\t\t( value ) => value[ 0 ] ?? ''\n\t);\n\tconst allUnits = parsedQuantitiesAndUnits.map( ( value ) => value[ 1 ] );\n\n\tconst value = allValues.every( ( v ) => v === allValues[ 0 ] )\n\t\t? allValues[ 0 ]\n\t\t: '';\n\tconst unit = mode( allUnits );\n\n\tconst allValue = value === 0 || value ? `${ value }${ unit }` : undefined;\n\n\treturn allValue;\n}\n\n/**\n * Checks to determine if values are mixed.\n *\n * @param {Object} values Radius values.\n * @return {boolean} Whether values are mixed.\n */\nexport function hasMixedValues( values = {} ) {\n\tconst allValue = getAllValue( values );\n\tconst isMixed =\n\t\ttypeof values === 'string' ? false : isNaN( parseFloat( allValue ) );\n\n\treturn isMixed;\n}\n\n/**\n * Checks to determine if values are defined.\n *\n * @param {Object} values Radius values.\n * @return {boolean} Whether values are mixed.\n */\nexport function hasDefinedValues( values ) {\n\tif ( ! values ) {\n\t\treturn false;\n\t}\n\n\t// A string value represents a shorthand value.\n\tif ( typeof values === 'string' ) {\n\t\treturn true;\n\t}\n\n\t// An object represents longhand border radius values, if any are set\n\t// flag values as being defined.\n\tconst filteredValues = Object.values( values ).filter( ( value ) => {\n\t\treturn !! value || value === 0;\n\t} );\n\n\treturn !! filteredValues.length;\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,8CAA8C,IAAIC,gCAAgC,QAAQ,uBAAuB;;AAE1H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,IAAIA,CAAEC,UAAU,EAAG;EAClC,MAAMC,GAAG,GAAG,CAAE,GAAGD,UAAU,CAAE;EAC7B,OAAOC,GAAG,CACRC,IAAI,CACJ,CAAEC,CAAC,EAAEC,CAAC,KACLJ,UAAU,CAACK,MAAM,CAAIC,CAAC,IAAMA,CAAC,KAAKF,CAAE,CAAC,CAACG,MAAM,GAC5CP,UAAU,CAACK,MAAM,CAAIC,CAAC,IAAMA,CAAC,KAAKH,CAAE,CAAC,CAACI,MACxC,CAAC,CACAC,KAAK,CAAC,CAAC;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,UAAUA,CAAEC,aAAa,GAAG,CAAC,CAAC,EAAG;EAChD,MAAM;IAAEC,IAAI;IAAE,GAAGC;EAAY,CAAC,GAAGF,aAAa;EAC9C,OACCC,IAAI,IAAIZ,IAAI,CAAEc,MAAM,CAACC,MAAM,CAAEF,WAAY,CAAC,CAACP,MAAM,CAAEU,OAAQ,CAAE,CAA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C;EAErE,OAAOG,OAAO;AACf;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASG,gBAAgBA,CAAEjB,MAAM,EAAG;EAC1C,IAAK,CAAEA,MAAM,EAAG;IACf,OAAO,KAAK;EACb;;EAEA;EACA,IAAK,OAAOA,MAAM,KAAK,QAAQ,EAAG;IACjC,OAAO,IAAI;EACZ;;EAEA;EACA;EACA,MAAMkB,cAAc,GAAGnB,MAAM,CAACC,MAAM,CAAEA,MAAO,CAAC,CAACT,MAAM,CAAIc,KAAK,IAAM;IACnE,OAAO,CAAC,CAAEA,KAAK,IAAIA,KAAK,KAAK,CAAC;EAC/B,CAAE,CAAC;EAEH,OAAO,CAAC,CAAEa,cAAc,CAACzB,MAAM;AAChC","ignoreList":[]}
1
+ {"version":3,"names":["__experimentalParseQuantityAndUnitFromRawValue","parseQuantityAndUnitFromRawValue","mode","inputArray","arr","sort","a","b","filter","v","length","shift","getAllUnit","selectedUnits","flat","cornerUnits","Object","values","Boolean","getAllValue","parsedQuantitiesAndUnits","map","value","allValues","_value$","allUnits","every","unit","allValue","undefined","hasMixedValues","isMixed","isNaN","parseFloat","hasDefinedValues","filteredValues"],"sources":["@wordpress/block-editor/src/components/border-radius-control/utils.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __experimentalParseQuantityAndUnitFromRawValue as parseQuantityAndUnitFromRawValue } from '@wordpress/components';\n\n/**\n * Gets the (non-undefined) item with the highest occurrence within an array\n * Based in part on: https://stackoverflow.com/a/20762713\n *\n * Undefined values are always sorted to the end by `sort`, so this function\n * returns the first element, to always prioritize real values over undefined\n * values.\n *\n * See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#description\n *\n * @param {Array<any>} inputArray Array of items to check.\n * @return {any} The item with the most occurrences.\n */\nexport function mode( inputArray ) {\n\tconst arr = [ ...inputArray ];\n\treturn arr\n\t\t.sort(\n\t\t\t( a, b ) =>\n\t\t\t\tinputArray.filter( ( v ) => v === b ).length -\n\t\t\t\tinputArray.filter( ( v ) => v === a ).length\n\t\t)\n\t\t.shift();\n}\n\n/**\n * Returns the most common CSS unit from the current CSS unit selections.\n *\n * - If a single flat border radius is set, its unit will be used\n * - If individual corner selections, the most common of those will be used\n * - Failing any unit selections a default of 'px' is returned.\n *\n * @param {Object} selectedUnits Unit selections for flat radius & each corner.\n * @return {string} Most common CSS unit from current selections. Default: `px`.\n */\nexport function getAllUnit( selectedUnits = {} ) {\n\tconst { flat, ...cornerUnits } = selectedUnits;\n\treturn (\n\t\tflat || mode( Object.values( cornerUnits ).filter( Boolean ) ) || 'px'\n\t);\n}\n\n/**\n * Gets the 'all' input value and unit from values data.\n *\n * @param {Object|string} values Radius values.\n * @return {string} A value + unit for the 'all' input.\n */\nexport function getAllValue( values = {} ) {\n\t/**\n\t * Border radius support was originally a single pixel value.\n\t *\n\t * To maintain backwards compatibility treat this case as the all value.\n\t */\n\tif ( typeof values === 'string' ) {\n\t\treturn values;\n\t}\n\n\tconst parsedQuantitiesAndUnits = Object.values( values ).map( ( value ) =>\n\t\tparseQuantityAndUnitFromRawValue( value )\n\t);\n\n\tconst allValues = parsedQuantitiesAndUnits.map(\n\t\t( value ) => value[ 0 ] ?? ''\n\t);\n\tconst allUnits = parsedQuantitiesAndUnits.map( ( value ) => value[ 1 ] );\n\n\tconst value = allValues.every( ( v ) => v === allValues[ 0 ] )\n\t\t? allValues[ 0 ]\n\t\t: '';\n\tconst unit = mode( allUnits );\n\n\tconst allValue = value === 0 || value ? `${ value }${ unit }` : undefined;\n\n\treturn allValue;\n}\n\n/**\n * Checks to determine if values are mixed.\n *\n * @param {Object} values Radius values.\n * @return {boolean} Whether values are mixed.\n */\nexport function hasMixedValues( values = {} ) {\n\tconst allValue = getAllValue( values );\n\tconst isMixed =\n\t\ttypeof values === 'string' ? false : isNaN( parseFloat( allValue ) );\n\n\treturn isMixed;\n}\n\n/**\n * Checks to determine if values are defined.\n *\n * @param {Object} values Radius values.\n * @return {boolean} Whether values are mixed.\n */\nexport function hasDefinedValues( values ) {\n\tif ( ! values ) {\n\t\treturn false;\n\t}\n\n\t// A string value represents a shorthand value.\n\tif ( typeof values === 'string' ) {\n\t\treturn true;\n\t}\n\n\t// An object represents longhand border radius values, if any are set\n\t// flag values as being defined.\n\tconst filteredValues = Object.values( values ).filter( ( value ) => {\n\t\treturn !! value || value === 0;\n\t} );\n\n\treturn !! filteredValues.length;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,8CAA8C,IAAIC,gCAAgC,QAAQ,uBAAuB;;AAE1H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,IAAIA,CAAEC,UAAU,EAAG;EAClC,MAAMC,GAAG,GAAG,CAAE,GAAGD,UAAU,CAAE;EAC7B,OAAOC,GAAG,CACRC,IAAI,CACJ,CAAEC,CAAC,EAAEC,CAAC,KACLJ,UAAU,CAACK,MAAM,CAAIC,CAAC,IAAMA,CAAC,KAAKF,CAAE,CAAC,CAACG,MAAM,GAC5CP,UAAU,CAACK,MAAM,CAAIC,CAAC,IAAMA,CAAC,KAAKH,CAAE,CAAC,CAACI,MACxC,CAAC,CACAC,KAAK,CAAC,CAAC;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,UAAUA,CAAEC,aAAa,GAAG,CAAC,CAAC,EAAG;EAChD,MAAM;IAAEC,IAAI;IAAE,GAAGC;EAAY,CAAC,GAAGF,aAAa;EAC9C,OACCC,IAAI,IAAIZ,IAAI,CAAEc,MAAM,CAACC,MAAM,CAAEF,WAAY,CAAC,CAACP,MAAM,CAAEU,OAAQ,CAAE,CAAC,IAAI,IAAI;AAExE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,WAAWA,CAAEF,MAAM,GAAG,CAAC,CAAC,EAAG;EAC1C;AACD;AACA;AACA;AACA;EACC,IAAK,OAAOA,MAAM,KAAK,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,IAAK,OAAOA,MAAM,KAAK,QAAQ,EAAG;IACjC,OAAO,IAAI;EACZ;;EAEA;EACA;EACA,MAAMkB,cAAc,GAAGnB,MAAM,CAACC,MAAM,CAAEA,MAAO,CAAC,CAACT,MAAM,CAAIc,KAAK,IAAM;IACnE,OAAO,CAAC,CAAEA,KAAK,IAAIA,KAAK,KAAK,CAAC;EAC/B,CAAE,CAAC;EAEH,OAAO,CAAC,CAAEa,cAAc,CAACzB,MAAM;AAChC","ignoreList":[]}
@@ -1,4 +1,3 @@
1
- /* wp:polyfill */
2
1
  /**
3
2
  * External dependencies
4
3
  */
@@ -1 +1 @@
1
- {"version":3,"names":["colord","extend","namesPlugin","a11yPlugin","privateApis","componentsPrivateApis","unlock","kebabCase","getColorObjectByAttributeValues","colors","definedColor","customColor","colorObj","find","color","slug","getColorObjectByColorValue","colorValue","getColorClassName","colorContextName","colorSlug","undefined","getMostReadableColor","colordColor","getColorContrast","contrast","maxContrast","Math","max","map"],"sources":["@wordpress/block-editor/src/components/colors/utils.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { colord, extend } from 'colord';\nimport namesPlugin from 'colord/plugins/names';\nimport a11yPlugin from 'colord/plugins/a11y';\n\n/**\n * WordPress dependencies\n */\nimport { privateApis as componentsPrivateApis } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\nextend( [ namesPlugin, a11yPlugin ] );\n\nconst { kebabCase } = unlock( componentsPrivateApis );\n\n/**\n * Provided an array of color objects as set by the theme or by the editor defaults,\n * and the values of the defined color or custom color returns a color object describing the color.\n *\n * @param {Array} colors Array of color objects as set by the theme or by the editor defaults.\n * @param {?string} definedColor A string containing the color slug.\n * @param {?string} customColor A string containing the customColor value.\n *\n * @return {?Object} If definedColor is passed and the name is found in colors,\n * the color object exactly as set by the theme or editor defaults is returned.\n * Otherwise, an object that just sets the color is defined.\n */\nexport const getColorObjectByAttributeValues = (\n\tcolors,\n\tdefinedColor,\n\tcustomColor\n) => {\n\tif ( definedColor ) {\n\t\tconst colorObj = colors?.find(\n\t\t\t( color ) => color.slug === definedColor\n\t\t);\n\n\t\tif ( colorObj ) {\n\t\t\treturn colorObj;\n\t\t}\n\t}\n\treturn {\n\t\tcolor: customColor,\n\t};\n};\n\n/**\n * Provided an array of color objects as set by the theme or by the editor defaults, and a color value returns the color object matching that value or undefined.\n *\n * @param {Array} colors Array of color objects as set by the theme or by the editor defaults.\n * @param {?string} colorValue A string containing the color value.\n *\n * @return {?Object} Color object included in the colors array whose color property equals colorValue.\n * Returns undefined if no color object matches this requirement.\n */\nexport const getColorObjectByColorValue = ( colors, colorValue ) => {\n\treturn colors?.find( ( color ) => color.color === colorValue );\n};\n\n/**\n * Returns a class based on the context a color is being used and its slug.\n *\n * @param {string} colorContextName Context/place where color is being used e.g: background, text etc...\n * @param {string} colorSlug Slug of the color.\n *\n * @return {?string} String with the class corresponding to the color in the provided context.\n * Returns undefined if either colorContextName or colorSlug are not provided.\n */\nexport function getColorClassName( colorContextName, colorSlug ) {\n\tif ( ! colorContextName || ! colorSlug ) {\n\t\treturn undefined;\n\t}\n\n\treturn `has-${ kebabCase( colorSlug ) }-${ colorContextName }`;\n}\n\n/**\n * Given an array of color objects and a color value returns the color value of the most readable color in the array.\n *\n * @param {Array} colors Array of color objects as set by the theme or by the editor defaults.\n * @param {?string} colorValue A string containing the color value.\n *\n * @return {string} String with the color value of the most readable color.\n */\nexport function getMostReadableColor( colors, colorValue ) {\n\tconst colordColor = colord( colorValue );\n\tconst getColorContrast = ( { color } ) => colordColor.contrast( color );\n\n\tconst maxContrast = Math.max( ...colors.map( getColorContrast ) );\n\treturn colors.find( ( color ) => getColorContrast( color ) === maxContrast )\n\t\t.color;\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,MAAM,EAAEC,MAAM,QAAQ,QAAQ;AACvC,OAAOC,WAAW,MAAM,sBAAsB;AAC9C,OAAOC,UAAU,MAAM,qBAAqB;;AAE5C;AACA;AACA;AAC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AMO,gBAAgB,GAAGA,CAAE;IAAEV;EAAM,CAAC,KAAMS,WAAW,CAACE,QAAQ,CAAEX,KAAM,CAAC;EAEvE,MAAMY,WAAW,GAAGC,IAAI,CAACC,GAAG,CAAE,GAAGnB,MAAM,CAACoB,GAAG,CAAEL,gBAAiB,CAAE,CAAC;EACjE,OAAOf,MAAM,CAACI,IAAI,CAAIC,KAAK,IAAMU,gBAAgB,CAAEV,KAAM,CAAC,KAAKY,WAAY,CAAC,CAC1EZ,KAAK;AACR","ignoreList":[]}
1
+ {"version":3,"names":["colord","extend","namesPlugin","a11yPlugin","privateApis","componentsPrivateApis","unlock","kebabCase","getColorObjectByAttributeValues","colors","definedColor","customColor","colorObj","find","color","slug","getColorObjectByColorValue","colorValue","getColorClassName","colorContextName","colorSlug","undefined","getMostReadableColor","colordColor","getColorContrast","contrast","maxContrast","Math","max","map"],"sources":["@wordpress/block-editor/src/components/colors/utils.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { colord, extend } from 'colord';\nimport namesPlugin from 'colord/plugins/names';\nimport a11yPlugin from 'colord/plugins/a11y';\n\n/**\n * WordPress dependencies\n */\nimport { privateApis as componentsPrivateApis } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\nextend( [ namesPlugin, a11yPlugin ] );\n\nconst { kebabCase } = unlock( componentsPrivateApis );\n\n/**\n * Provided an array of color objects as set by the theme or by the editor defaults,\n * and the values of the defined color or custom color returns a color object describing the color.\n *\n * @param {Array} colors Array of color objects as set by the theme or by the editor defaults.\n * @param {?string} definedColor A string containing the color slug.\n * @param {?string} customColor A string containing the customColor value.\n *\n * @return {?Object} If definedColor is passed and the name is found in colors,\n * the color object exactly as set by the theme or editor defaults is returned.\n * Otherwise, an object that just sets the color is defined.\n */\nexport const getColorObjectByAttributeValues = (\n\tcolors,\n\tdefinedColor,\n\tcustomColor\n) => {\n\tif ( definedColor ) {\n\t\tconst colorObj = colors?.find(\n\t\t\t( color ) => color.slug === definedColor\n\t\t);\n\n\t\tif ( colorObj ) {\n\t\t\treturn colorObj;\n\t\t}\n\t}\n\treturn {\n\t\tcolor: customColor,\n\t};\n};\n\n/**\n * Provided an array of color objects as set by the theme or by the editor defaults, and a color value returns the color object matching that value or undefined.\n *\n * @param {Array} colors Array of color objects as set by the theme or by the editor defaults.\n * @param {?string} colorValue A string containing the color value.\n *\n * @return {?Object} Color object included in the colors array whose color property equals colorValue.\n * Returns undefined if no color object matches this requirement.\n */\nexport const getColorObjectByColorValue = ( colors, colorValue ) => {\n\treturn colors?.find( ( color ) => color.color === colorValue );\n};\n\n/**\n * Returns a class based on the context a color is being used and its slug.\n *\n * @param {string} colorContextName Context/place where color is being used e.g: background, text etc...\n * @param {string} colorSlug Slug of the color.\n *\n * @return {?string} String with the class corresponding to the color in the provided context.\n * Returns undefined if either colorContextName or colorSlug are not provided.\n */\nexport function getColorClassName( colorContextName, colorSlug ) {\n\tif ( ! colorContextName || ! colorSlug ) {\n\t\treturn undefined;\n\t}\n\n\treturn `has-${ kebabCase( colorSlug ) }-${ colorContextName }`;\n}\n\n/**\n * Given an array of color objects and a color value returns the color value of the most readable color in the array.\n *\n * @param {Array} colors Array of color objects as set by the theme or by the editor defaults.\n * @param {?string} colorValue A string containing the color value.\n *\n * @return {string} String with the color value of the most readable color.\n */\nexport function getMostReadableColor( colors, colorValue ) {\n\tconst colordColor = colord( colorValue );\n\tconst getColorContrast = ( { color } ) => colordColor.contrast( color );\n\n\tconst maxContrast = Math.max( ...colors.map( getColorContrast ) );\n\treturn colors.find( ( color ) => getColorContrast( color ) === maxContrast )\n\t\t.color;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,MAAM,EAAEC,MAAM,QAAQ,QAAQ;AACvC,OAAOC,WAAW,MAAM,sBAAsB;AAC9C,OAAOC,UAAU,MAAM,qBAAqB;;AAE5C;AACA;AACA;AACA,SAASC,WAAW,IAAIC,qBAAqB,QAAQ,uBAAuB;;AAE5E;AACA;AACA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E,QAAQ,CAAEX,KAAM,CAAC;EAEvE,MAAMY,WAAW,GAAGC,IAAI,CAACC,GAAG,CAAE,GAAGnB,MAAM,CAACoB,GAAG,CAAEL,gBAAiB,CAAE,CAAC;EACjE,OAAOf,MAAM,CAACI,IAAI,CAAIC,KAAK,IAAMU,gBAAgB,CAAEV,KAAM,CAAC,KAAKY,WAAY,CAAC,CAC1EZ,KAAK;AACR","ignoreList":[]}
@@ -1,4 +1,3 @@
1
- /* wp:polyfill */
2
1
  /**
3
2
  * WordPress dependencies
4
3
  */
@@ -1 +1 @@
1
- {"version":3,"names":["useMemo","Component","compose","createHigherOrderComponent","privateApis","componentsPrivateApis","getColorClassName","getColorObjectByColorValue","getColorObjectByAttributeValues","getMostReadableColor","useSettings","unlock","jsx","_jsx","kebabCase","upperFirst","firstLetter","rest","toUpperCase","join","withCustomColorPalette","colorsArray","WrappedComponent","props","colors","withEditorColorPalette","userPalette","themePalette","defaultPalette","allColors","createColorHOC","colorTypes","withColorPalette","colorMap","reduce","colorObject","colorType","constructor","setters","createSetters","colorUtils","bind","state","colorValue","Object","keys","settersAccumulator","colorAttributeName","upperFirstColorAttributeName","customColorAttributeName","createSetColor","setAttributes","slug","undefined","getDerivedStateFromProps","attributes","previousState","entries","newState","colorContext","previousColorObject","previousColor","color","class","render","createCustomColorsHOC","withColors"],"sources":["@wordpress/block-editor/src/components/colors/with-colors.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useMemo, Component } from '@wordpress/element';\nimport { compose, createHigherOrderComponent } from '@wordpress/compose';\nimport { privateApis as componentsPrivateApis } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport {\n\tgetColorClassName,\n\tgetColorObjectByColorValue,\n\tgetColorObjectByAttributeValues,\n\tgetMostReadableColor,\n} from './utils';\nimport { useSettings } from '../use-settings';\nimport { unlock } from '../../lock-unlock';\n\nconst { kebabCase } = unlock( componentsPrivateApis );\n\n/**\n * Capitalizes the first letter in a string.\n *\n * @param {string} str The string whose first letter the function will capitalize.\n *\n * @return {string} Capitalized string.\n */\nconst upperFirst = ( [ firstLetter, ...rest ] ) =>\n\tfirstLetter.toUpperCase() + rest.join( '' );\n\n/**\n * Higher order component factory for injecting the `colorsArray` argument as\n * the colors prop in the `withCustomColors` HOC.\n *\n * @param {Array} colorsArray An array of color objects.\n *\n * @return {Function} The higher order component.\n */\nconst withCustomColorPalette = ( colorsArray ) =>\n\tcreateHigherOrderComponent(\n\t\t( WrappedComponent ) => ( props ) => (\n\t\t\t<WrappedComponent { ...props } colors={ colorsArray } />\n\t\t),\n\t\t'withCustomColorPalette'\n\t);\n\n/**\n * Higher order component factory for injecting the editor colors as the\n * `colors` prop in the `withColors` HOC.\n *\n * @return {Function} The higher order component.\n */\nconst withEditorColorPalette = () =>\n\tcreateHigherOrderComponent(\n\t\t( WrappedComponent ) => ( props ) => {\n\t\t\tconst [ userPalette, themePalette, defaultPalette ] = useSettings(\n\t\t\t\t'color.palette.custom',\n\t\t\t\t'color.palette.theme',\n\t\t\t\t'color.palette.default'\n\t\t\t);\n\t\t\tconst allColors = useMemo(\n\t\t\t\t() => [\n\t\t\t\t\t...( userPalette || [] ),\n\t\t\t\t\t...( themePalette || [] ),\n\t\t\t\t\t...( defaultPalette || [] ),\n\t\t\t\t],\n\t\t\t\t[ userPalette, themePalette, defaultPalette ]\n\t\t\t);\n\t\t\treturn <WrappedComponent { ...props } colors={ allColors } />;\n\t\t},\n\t\t'withEditorColorPalette'\n\t);\n\n/**\n * Helper function used with `createHigherOrderComponent` to create\n * higher order components for managing color logic.\n *\n * @param {Array} colorTypes An array of color types (e.g. 'backgroundColor, borderColor).\n * @param {Function} withColorPalette A HOC for injecting the 'colors' prop into the WrappedComponent.\n *\n * @return {Component} The component that can be used as a HOC.\n */\nfunction createColorHOC( colorTypes, withColorPalette ) {\n\tconst colorMap = colorTypes.reduce( ( colorObject, colorType ) => {\n\t\treturn {\n\t\t\t...colorObject,\n\t\t\t...( typeof colorType === 'string'\n\t\t\t\t? { [ colorType ]: kebabCase( colorType ) }\n\t\t\t\t: colorType ),\n\t\t};\n\t}, {} );\n\n\treturn compose( [\n\t\twithColorPalette,\n\t\t( WrappedComponent ) => {\n\t\t\treturn class extends Component {\n\t\t\t\tconstructor( props ) {\n\t\t\t\t\tsuper( props );\n\n\t\t\t\t\tthis.setters = this.createSetters();\n\t\t\t\t\tthis.colorUtils = {\n\t\t\t\t\t\tgetMostReadableColor:\n\t\t\t\t\t\t\tthis.getMostReadableColor.bind( this ),\n\t\t\t\t\t};\n\n\t\t\t\t\tthis.state = {};\n\t\t\t\t}\n\n\t\t\t\tgetMostReadableColor( colorValue ) {\n\t\t\t\t\tconst { colors } = this.props;\n\t\t\t\t\treturn getMostReadableColor( colors, colorValue );\n\t\t\t\t}\n\n\t\t\t\tcreateSetters() {\n\t\t\t\t\treturn Object.keys( colorMap ).reduce(\n\t\t\t\t\t\t( settersAccumulator, colorAttributeName ) => {\n\t\t\t\t\t\t\tconst upperFirstColorAttributeName =\n\t\t\t\t\t\t\t\tupperFirst( colorAttributeName );\n\t\t\t\t\t\t\tconst customColorAttributeName = `custom${ upperFirstColorAttributeName }`;\n\t\t\t\t\t\t\tsettersAccumulator[\n\t\t\t\t\t\t\t\t`set${ upperFirstColorAttributeName }`\n\t\t\t\t\t\t\t] = this.createSetColor(\n\t\t\t\t\t\t\t\tcolorAttributeName,\n\t\t\t\t\t\t\t\tcustomColorAttributeName\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\treturn settersAccumulator;\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{}\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tcreateSetColor( colorAttributeName, customColorAttributeName ) {\n\t\t\t\t\treturn ( colorValue ) => {\n\t\t\t\t\t\tconst colorObject = getColorObjectByColorValue(\n\t\t\t\t\t\t\tthis.props.colors,\n\t\t\t\t\t\t\tcolorValue\n\t\t\t\t\t\t);\n\t\t\t\t\t\tthis.props.setAttributes( {\n\t\t\t\t\t\t\t[ colorAttributeName ]:\n\t\t\t\t\t\t\t\tcolorObject && colorObject.slug\n\t\t\t\t\t\t\t\t\t? colorObject.slug\n\t\t\t\t\t\t\t\t\t: undefined,\n\t\t\t\t\t\t\t[ customColorAttributeName ]:\n\t\t\t\t\t\t\t\tcolorObject && colorObject.slug\n\t\t\t\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t\t\t\t: colorValue,\n\t\t\t\t\t\t} );\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\tstatic getDerivedStateFromProps(\n\t\t\t\t\t{ attributes, colors },\n\t\t\t\t\tpreviousState\n\t\t\t\t) {\n\t\t\t\t\treturn Object.entries( colorMap ).reduce(\n\t\t\t\t\t\t( newState, [ colorAttributeName, colorContext ] ) => {\n\t\t\t\t\t\t\tconst colorObject = getColorObjectByAttributeValues(\n\t\t\t\t\t\t\t\tcolors,\n\t\t\t\t\t\t\t\tattributes[ colorAttributeName ],\n\t\t\t\t\t\t\t\tattributes[\n\t\t\t\t\t\t\t\t\t`custom${ upperFirst(\n\t\t\t\t\t\t\t\t\t\tcolorAttributeName\n\t\t\t\t\t\t\t\t\t) }`\n\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\tconst previousColorObject =\n\t\t\t\t\t\t\t\tpreviousState[ colorAttributeName ];\n\t\t\t\t\t\t\tconst previousColor = previousColorObject?.color;\n\t\t\t\t\t\t\t/**\n\t\t\t\t\t\t\t * The \"and previousColorObject\" condition checks that a previous color object was already computed.\n\t\t\t\t\t\t\t * At the start previousColorObject and colorValue are both equal to undefined\n\t\t\t\t\t\t\t * bus as previousColorObject does not exist we should compute the object.\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\tpreviousColor === colorObject.color &&\n\t\t\t\t\t\t\t\tpreviousColorObject\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tnewState[ colorAttributeName ] =\n\t\t\t\t\t\t\t\t\tpreviousColorObject;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tnewState[ colorAttributeName ] = {\n\t\t\t\t\t\t\t\t\t...colorObject,\n\t\t\t\t\t\t\t\t\tclass: getColorClassName(\n\t\t\t\t\t\t\t\t\t\tcolorContext,\n\t\t\t\t\t\t\t\t\t\tcolorObject.slug\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn newState;\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{}\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\trender() {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<WrappedComponent\n\t\t\t\t\t\t\t{ ...{\n\t\t\t\t\t\t\t\t...this.props,\n\t\t\t\t\t\t\t\tcolors: undefined,\n\t\t\t\t\t\t\t\t...this.state,\n\t\t\t\t\t\t\t\t...this.setters,\n\t\t\t\t\t\t\t\tcolorUtils: this.colorUtils,\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t/>\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t};\n\t\t},\n\t] );\n}\n\n/**\n * A higher-order component factory for creating a 'withCustomColors' HOC, which handles color logic\n * for class generation color value, retrieval and color attribute setting.\n *\n * Use this higher-order component to work with a custom set of colors.\n *\n * @example\n *\n * ```jsx\n * const CUSTOM_COLORS = [ { name: 'Red', slug: 'red', color: '#ff0000' }, { name: 'Blue', slug: 'blue', color: '#0000ff' } ];\n * const withCustomColors = createCustomColorsHOC( CUSTOM_COLORS );\n * // ...\n * export default compose(\n * withCustomColors( 'backgroundColor', 'borderColor' ),\n * MyColorfulComponent,\n * );\n * ```\n *\n * @param {Array} colorsArray The array of color objects (name, slug, color, etc... ).\n *\n * @return {Function} Higher-order component.\n */\nexport function createCustomColorsHOC( colorsArray ) {\n\treturn ( ...colorTypes ) => {\n\t\tconst withColorPalette = withCustomColorPalette( colorsArray );\n\t\treturn createHigherOrderComponent(\n\t\t\tcreateColorHOC( colorTypes, withColorPalette ),\n\t\t\t'withCustomColors'\n\t\t);\n\t};\n}\n\n/**\n * A higher-order component, which handles color logic for class generation color value, retrieval and color attribute setting.\n *\n * For use with the default editor/theme color palette.\n *\n * @example\n *\n * ```jsx\n * export default compose(\n * withColors( 'backgroundColor', { textColor: 'color' } ),\n * MyColorfulComponent,\n * );\n * ```\n *\n * @param {...(Object|string)} colorTypes The arguments can be strings or objects. If the argument is an object,\n * it should contain the color attribute name as key and the color context as value.\n * If the argument is a string the value should be the color attribute name,\n * the color context is computed by applying a kebab case transform to the value.\n * Color context represents the context/place where the color is going to be used.\n * The class name of the color is generated using 'has' followed by the color name\n * and ending with the color context all in kebab case e.g: has-green-background-color.\n *\n * @return {Function} Higher-order component.\n */\nexport default function withColors( ...colorTypes ) {\n\tconst withColorPalette = withEditorColorPalette();\n\treturn createHigherOrderComponent(\n\t\tcreateColorHOC( colorTypes, withColorPalette ),\n\t\t'withColors'\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,OAAO,EAAEC,SAAS,QAAQ,oBAAoB;AACvD,SAASC,OAAO,EAAEC,0BAA0B,QAAQ,oBAAoB;AACxE,SAASC,WAAW,IAAIC,qBAAqB,QAAQ,uBAAuB;;AAE5E;AACA;AACA;AACA,SACCC,iBAAiB,EACjBC,0BAA0B,EAC1BC,+BAA+B,EAC/BC,oBAAoB,QACd,SAAS;AAChB,SAASC,WAAW,QAAQ,iBAAiB;AAC7C,SAASC,MAAM,QAAQ,mBAAmB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE3C,MAAM;EAAEC;AAAU,CAAC,GAAGH,MAAM,CAAEN,qBAAsB,CAAC;;AAErD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMU,UAAU,GAAGA,CAAE,CAAEC,WAAW,EAAE,GAAGC,IAAI,CAAE,KAC5CD,WAAW,CAACE,WAAW,CAAC,CAAC,GAAGD,IAAI,CAACE,IAAI,CAAE,EAA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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASyB,qBAAqBA,CAAE5C,WAAW,EAAG;EACpD,OAAO,CAAE,GAAGU,UAAU,KAAM;IAC3B,MAAMC,gBAAgB,GAAGZ,sBAAsB,CAAEC,WAAY,CAAC;IAC9D,OAAOlB,0BAA0B,CAChC2B,cAAc,CAAEC,UAAU,EAAEC,gBAAiB,CAAC,EAC9C,kBACD,CAAC;EACF,CAAC;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAASkC,UAAUA,CAAE,GAAGnC,UAAU,EAAG;EACnD,MAAMC,gBAAgB,GAAGP,sBAAsB,CAAC,CAAC;EACjD,OAAOtB,0BAA0B,CAChC2B,cAAc,CAAEC,UAAU,EAAEC,gBAAiB,CAAC,EAC9C,YACD,CAAC;AACF","ignoreList":[]}
1
+ {"version":3,"names":["useMemo","Component","compose","createHigherOrderComponent","privateApis","componentsPrivateApis","getColorClassName","getColorObjectByColorValue","getColorObjectByAttributeValues","getMostReadableColor","useSettings","unlock","jsx","_jsx","kebabCase","upperFirst","firstLetter","rest","toUpperCase","join","withCustomColorPalette","colorsArray","WrappedComponent","props","colors","withEditorColorPalette","userPalette","themePalette","defaultPalette","allColors","createColorHOC","colorTypes","withColorPalette","colorMap","reduce","colorObject","colorType","constructor","setters","createSetters","colorUtils","bind","state","colorValue","Object","keys","settersAccumulator","colorAttributeName","upperFirstColorAttributeName","customColorAttributeName","createSetColor","setAttributes","slug","undefined","getDerivedStateFromProps","attributes","previousState","entries","newState","colorContext","previousColorObject","previousColor","color","class","render","createCustomColorsHOC","withColors"],"sources":["@wordpress/block-editor/src/components/colors/with-colors.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useMemo, Component } from '@wordpress/element';\nimport { compose, createHigherOrderComponent } from '@wordpress/compose';\nimport { privateApis as componentsPrivateApis } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport {\n\tgetColorClassName,\n\tgetColorObjectByColorValue,\n\tgetColorObjectByAttributeValues,\n\tgetMostReadableColor,\n} from './utils';\nimport { useSettings } from '../use-settings';\nimport { unlock } from '../../lock-unlock';\n\nconst { kebabCase } = unlock( componentsPrivateApis );\n\n/**\n * Capitalizes the first letter in a string.\n *\n * @param {string} str The string whose first letter the function will capitalize.\n *\n * @return {string} Capitalized string.\n */\nconst upperFirst = ( [ firstLetter, ...rest ] ) =>\n\tfirstLetter.toUpperCase() + rest.join( '' );\n\n/**\n * Higher order component factory for injecting the `colorsArray` argument as\n * the colors prop in the `withCustomColors` HOC.\n *\n * @param {Array} colorsArray An array of color objects.\n *\n * @return {Function} The higher order component.\n */\nconst withCustomColorPalette = ( colorsArray ) =>\n\tcreateHigherOrderComponent(\n\t\t( WrappedComponent ) => ( props ) => (\n\t\t\t<WrappedComponent { ...props } colors={ colorsArray } />\n\t\t),\n\t\t'withCustomColorPalette'\n\t);\n\n/**\n * Higher order component factory for injecting the editor colors as the\n * `colors` prop in the `withColors` HOC.\n *\n * @return {Function} The higher order component.\n */\nconst withEditorColorPalette = () =>\n\tcreateHigherOrderComponent(\n\t\t( WrappedComponent ) => ( props ) => {\n\t\t\tconst [ userPalette, themePalette, defaultPalette ] = useSettings(\n\t\t\t\t'color.palette.custom',\n\t\t\t\t'color.palette.theme',\n\t\t\t\t'color.palette.default'\n\t\t\t);\n\t\t\tconst allColors = useMemo(\n\t\t\t\t() => [\n\t\t\t\t\t...( userPalette || [] ),\n\t\t\t\t\t...( themePalette || [] ),\n\t\t\t\t\t...( defaultPalette || [] ),\n\t\t\t\t],\n\t\t\t\t[ userPalette, themePalette, defaultPalette ]\n\t\t\t);\n\t\t\treturn <WrappedComponent { ...props } colors={ allColors } />;\n\t\t},\n\t\t'withEditorColorPalette'\n\t);\n\n/**\n * Helper function used with `createHigherOrderComponent` to create\n * higher order components for managing color logic.\n *\n * @param {Array} colorTypes An array of color types (e.g. 'backgroundColor, borderColor).\n * @param {Function} withColorPalette A HOC for injecting the 'colors' prop into the WrappedComponent.\n *\n * @return {Component} The component that can be used as a HOC.\n */\nfunction createColorHOC( colorTypes, withColorPalette ) {\n\tconst colorMap = colorTypes.reduce( ( colorObject, colorType ) => {\n\t\treturn {\n\t\t\t...colorObject,\n\t\t\t...( typeof colorType === 'string'\n\t\t\t\t? { [ colorType ]: kebabCase( colorType ) }\n\t\t\t\t: colorType ),\n\t\t};\n\t}, {} );\n\n\treturn compose( [\n\t\twithColorPalette,\n\t\t( WrappedComponent ) => {\n\t\t\treturn class extends Component {\n\t\t\t\tconstructor( props ) {\n\t\t\t\t\tsuper( props );\n\n\t\t\t\t\tthis.setters = this.createSetters();\n\t\t\t\t\tthis.colorUtils = {\n\t\t\t\t\t\tgetMostReadableColor:\n\t\t\t\t\t\t\tthis.getMostReadableColor.bind( this ),\n\t\t\t\t\t};\n\n\t\t\t\t\tthis.state = {};\n\t\t\t\t}\n\n\t\t\t\tgetMostReadableColor( colorValue ) {\n\t\t\t\t\tconst { colors } = this.props;\n\t\t\t\t\treturn getMostReadableColor( colors, colorValue );\n\t\t\t\t}\n\n\t\t\t\tcreateSetters() {\n\t\t\t\t\treturn Object.keys( colorMap ).reduce(\n\t\t\t\t\t\t( settersAccumulator, colorAttributeName ) => {\n\t\t\t\t\t\t\tconst upperFirstColorAttributeName =\n\t\t\t\t\t\t\t\tupperFirst( colorAttributeName );\n\t\t\t\t\t\t\tconst customColorAttributeName = `custom${ upperFirstColorAttributeName }`;\n\t\t\t\t\t\t\tsettersAccumulator[\n\t\t\t\t\t\t\t\t`set${ upperFirstColorAttributeName }`\n\t\t\t\t\t\t\t] = this.createSetColor(\n\t\t\t\t\t\t\t\tcolorAttributeName,\n\t\t\t\t\t\t\t\tcustomColorAttributeName\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\treturn settersAccumulator;\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{}\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tcreateSetColor( colorAttributeName, customColorAttributeName ) {\n\t\t\t\t\treturn ( colorValue ) => {\n\t\t\t\t\t\tconst colorObject = getColorObjectByColorValue(\n\t\t\t\t\t\t\tthis.props.colors,\n\t\t\t\t\t\t\tcolorValue\n\t\t\t\t\t\t);\n\t\t\t\t\t\tthis.props.setAttributes( {\n\t\t\t\t\t\t\t[ colorAttributeName ]:\n\t\t\t\t\t\t\t\tcolorObject && colorObject.slug\n\t\t\t\t\t\t\t\t\t? colorObject.slug\n\t\t\t\t\t\t\t\t\t: undefined,\n\t\t\t\t\t\t\t[ customColorAttributeName ]:\n\t\t\t\t\t\t\t\tcolorObject && colorObject.slug\n\t\t\t\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t\t\t\t: colorValue,\n\t\t\t\t\t\t} );\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\tstatic getDerivedStateFromProps(\n\t\t\t\t\t{ attributes, colors },\n\t\t\t\t\tpreviousState\n\t\t\t\t) {\n\t\t\t\t\treturn Object.entries( colorMap ).reduce(\n\t\t\t\t\t\t( newState, [ colorAttributeName, colorContext ] ) => {\n\t\t\t\t\t\t\tconst colorObject = getColorObjectByAttributeValues(\n\t\t\t\t\t\t\t\tcolors,\n\t\t\t\t\t\t\t\tattributes[ colorAttributeName ],\n\t\t\t\t\t\t\t\tattributes[\n\t\t\t\t\t\t\t\t\t`custom${ upperFirst(\n\t\t\t\t\t\t\t\t\t\tcolorAttributeName\n\t\t\t\t\t\t\t\t\t) }`\n\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\tconst previousColorObject =\n\t\t\t\t\t\t\t\tpreviousState[ colorAttributeName ];\n\t\t\t\t\t\t\tconst previousColor = previousColorObject?.color;\n\t\t\t\t\t\t\t/**\n\t\t\t\t\t\t\t * The \"and previousColorObject\" condition checks that a previous color object was already computed.\n\t\t\t\t\t\t\t * At the start previousColorObject and colorValue are both equal to undefined\n\t\t\t\t\t\t\t * bus as previousColorObject does not exist we should compute the object.\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\tpreviousColor === colorObject.color &&\n\t\t\t\t\t\t\t\tpreviousColorObject\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tnewState[ colorAttributeName ] =\n\t\t\t\t\t\t\t\t\tpreviousColorObject;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tnewState[ colorAttributeName ] = {\n\t\t\t\t\t\t\t\t\t...colorObject,\n\t\t\t\t\t\t\t\t\tclass: getColorClassName(\n\t\t\t\t\t\t\t\t\t\tcolorContext,\n\t\t\t\t\t\t\t\t\t\tcolorObject.slug\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn newState;\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{}\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\trender() {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<WrappedComponent\n\t\t\t\t\t\t\t{ ...{\n\t\t\t\t\t\t\t\t...this.props,\n\t\t\t\t\t\t\t\tcolors: undefined,\n\t\t\t\t\t\t\t\t...this.state,\n\t\t\t\t\t\t\t\t...this.setters,\n\t\t\t\t\t\t\t\tcolorUtils: this.colorUtils,\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t/>\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t};\n\t\t},\n\t] );\n}\n\n/**\n * A higher-order component factory for creating a 'withCustomColors' HOC, which handles color logic\n * for class generation color value, retrieval and color attribute setting.\n *\n * Use this higher-order component to work with a custom set of colors.\n *\n * @example\n *\n * ```jsx\n * const CUSTOM_COLORS = [ { name: 'Red', slug: 'red', color: '#ff0000' }, { name: 'Blue', slug: 'blue', color: '#0000ff' } ];\n * const withCustomColors = createCustomColorsHOC( CUSTOM_COLORS );\n * // ...\n * export default compose(\n * withCustomColors( 'backgroundColor', 'borderColor' ),\n * MyColorfulComponent,\n * );\n * ```\n *\n * @param {Array} colorsArray The array of color objects (name, slug, color, etc... ).\n *\n * @return {Function} Higher-order component.\n */\nexport function createCustomColorsHOC( colorsArray ) {\n\treturn ( ...colorTypes ) => {\n\t\tconst withColorPalette = withCustomColorPalette( colorsArray );\n\t\treturn createHigherOrderComponent(\n\t\t\tcreateColorHOC( colorTypes, withColorPalette ),\n\t\t\t'withCustomColors'\n\t\t);\n\t};\n}\n\n/**\n * A higher-order component, which handles color logic for class generation color value, retrieval and color attribute setting.\n *\n * For use with the default editor/theme color palette.\n *\n * @example\n *\n * ```jsx\n * export default compose(\n * withColors( 'backgroundColor', { textColor: 'color' } ),\n * MyColorfulComponent,\n * );\n * ```\n *\n * @param {...(Object|string)} colorTypes The arguments can be strings or objects. If the argument is an object,\n * it should contain the color attribute name as key and the color context as value.\n * If the argument is a string the value should be the color attribute name,\n * the color context is computed by applying a kebab case transform to the value.\n * Color context represents the context/place where the color is going to be used.\n * The class name of the color is generated using 'has' followed by the color name\n * and ending with the color context all in kebab case e.g: has-green-background-color.\n *\n * @return {Function} Higher-order component.\n */\nexport default function withColors( ...colorTypes ) {\n\tconst withColorPalette = withEditorColorPalette();\n\treturn createHigherOrderComponent(\n\t\tcreateColorHOC( colorTypes, withColorPalette ),\n\t\t'withColors'\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,OAAO,EAAEC,SAAS,QAAQ,oBAAoB;AACvD,SAASC,OAAO,EAAEC,0BAA0B,QAAQ,oBAAoB;AACxE,SAASC,WAAW,IAAIC,qBAAqB,QAAQ,uBAAuB;;AAE5E;AACA;AACA;AACA,SACCC,iBAAiB,EACjBC,0BAA0B,EAC1BC,+BAA+B,EAC/BC,oBAAoB,QACd,SAAS;AAChB,SAASC,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C;UACF;UACA,OAAOM,QAAQ;QAChB,CAAC,EACD,CAAC,CACF,CAAC;MACF;MAEAM,MAAMA,CAAA,EAAG;QACR,oBACCnD,IAAA,CAACS,gBAAgB;UAEf,GAAG,IAAI,CAACC,KAAK;UACbC,MAAM,EAAE6B,SAAS;UACjB,GAAG,IAAI,CAACX,KAAK;UACb,GAAG,IAAI,CAACJ,OAAO;UACfE,UAAU,EAAE,IAAI,CAACA;QAAU,CAE5B,CAAC;MAEJ;IACD,CAAC;EACF,CAAC,CACA,CAAC;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASyB,qBAAqBA,CAAE5C,WAAW,EAAG;EACpD,OAAO,CAAE,GAAGU,UAAU,KAAM;IAC3B,MAAMC,gBAAgB,GAAGZ,sBAAsB,CAAEC,WAAY,CAAC;IAC9D,OAAOlB,0BAA0B,CAChC2B,cAAc,CAAEC,UAAU,EAAEC,gBAAiB,CAAC,EAC9C,kBACD,CAAC;EACF,CAAC;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAASkC,UAAUA,CAAE,GAAGnC,UAAU,EAAG;EACnD,MAAMC,gBAAgB,GAAGP,sBAAsB,CAAC,CAAC;EACjD,OAAOtB,0BAA0B,CAChC2B,cAAc,CAAEC,UAAU,EAAEC,gBAAiB,CAAC,EAC9C,YACD,CAAC;AACF","ignoreList":[]}
@@ -1,4 +1,3 @@
1
- /* wp:polyfill */
2
1
  /**
3
2
  * External dependencies
4
3
  */