@wordpress/block-editor 12.15.0 → 12.16.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 (500) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/README.md +9 -4
  3. package/build/components/block-canvas/index.js +22 -6
  4. package/build/components/block-canvas/index.js.map +1 -1
  5. package/build/components/block-card/index.js +1 -1
  6. package/build/components/block-card/index.js.map +1 -1
  7. package/build/components/block-controls/hook.js +3 -23
  8. package/build/components/block-controls/hook.js.map +1 -1
  9. package/build/components/block-edit/context.js +5 -1
  10. package/build/components/block-edit/context.js.map +1 -1
  11. package/build/components/block-edit/index.js +18 -9
  12. package/build/components/block-edit/index.js.map +1 -1
  13. package/build/components/block-info-slot-fill/index.js +3 -4
  14. package/build/components/block-info-slot-fill/index.js.map +1 -1
  15. package/build/components/block-list/block.js +28 -9
  16. package/build/components/block-list/block.js.map +1 -1
  17. package/build/components/block-list/block.native.js +14 -5
  18. package/build/components/block-list/block.native.js.map +1 -1
  19. package/build/components/block-list/use-block-props/index.js +61 -18
  20. package/build/components/block-list/use-block-props/index.js.map +1 -1
  21. package/build/components/block-list/use-block-props/use-focus-first-element.js +4 -29
  22. package/build/components/block-list/use-block-props/use-focus-first-element.js.map +1 -1
  23. package/build/components/block-list/use-block-props/use-is-hovered.js +4 -14
  24. package/build/components/block-list/use-block-props/use-is-hovered.js.map +1 -1
  25. package/build/components/block-list/use-block-props/use-selected-block-event-handlers.js +4 -2
  26. package/build/components/block-list/use-block-props/use-selected-block-event-handlers.js.map +1 -1
  27. package/build/components/block-patterns-list/index.js +1 -1
  28. package/build/components/block-patterns-list/index.js.map +1 -1
  29. package/build/components/block-removal-warning-modal/index.js +2 -9
  30. package/build/components/block-removal-warning-modal/index.js.map +1 -1
  31. package/build/components/block-rename/modal.js +3 -0
  32. package/build/components/block-rename/modal.js.map +1 -1
  33. package/build/components/block-settings/container.native.js +6 -4
  34. package/build/components/block-settings/container.native.js.map +1 -1
  35. package/build/components/block-styles/index.js +1 -1
  36. package/build/components/block-styles/index.js.map +1 -1
  37. package/build/components/block-styles/index.native.js +3 -2
  38. package/build/components/block-styles/index.native.js.map +1 -1
  39. package/build/components/block-toolbar/index.js +89 -27
  40. package/build/components/block-toolbar/index.js.map +1 -1
  41. package/build/components/block-tools/block-toolbar-breadcrumb.js +49 -0
  42. package/build/components/block-tools/block-toolbar-breadcrumb.js.map +1 -0
  43. package/build/components/block-tools/block-toolbar-popover.js +86 -0
  44. package/build/components/block-tools/block-toolbar-popover.js.map +1 -0
  45. package/build/components/block-tools/index.js +27 -24
  46. package/build/components/block-tools/index.js.map +1 -1
  47. package/build/components/block-types-list/index.native.js +4 -3
  48. package/build/components/block-types-list/index.native.js.map +1 -1
  49. package/build/components/block-variation-picker/index.native.js +2 -1
  50. package/build/components/block-variation-picker/index.native.js.map +1 -1
  51. package/build/components/colors-gradients/control.js +28 -17
  52. package/build/components/colors-gradients/control.js.map +1 -1
  53. package/build/components/duotone-control/index.js +1 -4
  54. package/build/components/duotone-control/index.js.map +1 -1
  55. package/build/components/global-styles/color-panel.js +22 -20
  56. package/build/components/global-styles/color-panel.js.map +1 -1
  57. package/build/components/global-styles/filters-panel.js +9 -3
  58. package/build/components/global-styles/filters-panel.js.map +1 -1
  59. package/build/components/global-styles/typography-panel.js +20 -31
  60. package/build/components/global-styles/typography-panel.js.map +1 -1
  61. package/build/components/image-link-destinations/index.native.js +118 -0
  62. package/build/components/image-link-destinations/index.native.js.map +1 -0
  63. package/build/components/index.native.js +8 -0
  64. package/build/components/index.native.js.map +1 -1
  65. package/build/components/inserter/media-tab/media-panel.js +2 -2
  66. package/build/components/inserter/media-tab/media-panel.js.map +1 -1
  67. package/build/components/inserter/menu.js +14 -7
  68. package/build/components/inserter/menu.js.map +1 -1
  69. package/build/components/inserter/preview-panel.js +2 -2
  70. package/build/components/inserter/preview-panel.js.map +1 -1
  71. package/build/components/inserter-button/index.native.js +98 -0
  72. package/build/components/inserter-button/index.native.js.map +1 -0
  73. package/build/components/inserter-button/sparkles.js +23 -0
  74. package/build/components/inserter-button/sparkles.js.map +1 -0
  75. package/build/components/inserter-draggable-blocks/index.js +8 -4
  76. package/build/components/inserter-draggable-blocks/index.js.map +1 -1
  77. package/build/components/inspector-controls/fill.js +3 -3
  78. package/build/components/inspector-controls/fill.js.map +1 -1
  79. package/build/components/inspector-controls/fill.native.js +3 -3
  80. package/build/components/inspector-controls/fill.native.js.map +1 -1
  81. package/build/components/navigable-toolbar/index.js +2 -2
  82. package/build/components/navigable-toolbar/index.js.map +1 -1
  83. package/build/components/preview-options/index.js +6 -62
  84. package/build/components/preview-options/index.js.map +1 -1
  85. package/build/components/rich-text/content.js +26 -23
  86. package/build/components/rich-text/content.js.map +1 -1
  87. package/build/components/rich-text/get-rich-text-values.js +2 -1
  88. package/build/components/rich-text/get-rich-text-values.js.map +1 -1
  89. package/build/components/rich-text/index.js +2 -30
  90. package/build/components/rich-text/index.js.map +1 -1
  91. package/build/components/rich-text/index.native.js +9 -16
  92. package/build/components/rich-text/index.native.js.map +1 -1
  93. package/build/components/rich-text/native/get-format-colors.native.js +22 -24
  94. package/build/components/rich-text/native/get-format-colors.native.js.map +1 -1
  95. package/build/components/rich-text/native/index.native.js +7 -34
  96. package/build/components/rich-text/native/index.native.js.map +1 -1
  97. package/build/components/rich-text/use-input-rules.js +5 -1
  98. package/build/components/rich-text/use-input-rules.js.map +1 -1
  99. package/build/components/rich-text/with-deprecations.js +50 -0
  100. package/build/components/rich-text/with-deprecations.js.map +1 -0
  101. package/build/components/use-block-drop-zone/index.js +70 -8
  102. package/build/components/use-block-drop-zone/index.js.map +1 -1
  103. package/build/components/use-on-block-drop/index.js +1 -1
  104. package/build/components/use-on-block-drop/index.js.map +1 -1
  105. package/build/components/use-resize-canvas/index.js +4 -1
  106. package/build/components/use-resize-canvas/index.js.map +1 -1
  107. package/build/components/use-settings/index.js +14 -0
  108. package/build/components/use-settings/index.js.map +1 -1
  109. package/build/hooks/align.js +20 -68
  110. package/build/hooks/align.js.map +1 -1
  111. package/build/hooks/align.native.js +11 -1
  112. package/build/hooks/align.native.js.map +1 -1
  113. package/build/hooks/anchor.js +13 -29
  114. package/build/hooks/anchor.js.map +1 -1
  115. package/build/hooks/background.js +28 -31
  116. package/build/hooks/background.js.map +1 -1
  117. package/build/hooks/block-hooks.js +24 -32
  118. package/build/hooks/block-hooks.js.map +1 -1
  119. package/build/hooks/block-renaming.js +18 -22
  120. package/build/hooks/block-renaming.js.map +1 -1
  121. package/build/hooks/border.js +58 -80
  122. package/build/hooks/border.js.map +1 -1
  123. package/build/hooks/color.js +76 -89
  124. package/build/hooks/color.js.map +1 -1
  125. package/build/hooks/content-lock-ui.js +29 -29
  126. package/build/hooks/content-lock-ui.js.map +1 -1
  127. package/build/hooks/custom-class-name.js +12 -29
  128. package/build/hooks/custom-class-name.js.map +1 -1
  129. package/build/hooks/custom-fields.js +24 -38
  130. package/build/hooks/custom-fields.js.map +1 -1
  131. package/build/hooks/dimensions.js +21 -17
  132. package/build/hooks/dimensions.js.map +1 -1
  133. package/build/hooks/duotone.js +31 -61
  134. package/build/hooks/duotone.js.map +1 -1
  135. package/build/hooks/font-family.js +16 -25
  136. package/build/hooks/font-family.js.map +1 -1
  137. package/build/hooks/font-size.js +51 -119
  138. package/build/hooks/font-size.js.map +1 -1
  139. package/build/hooks/index.js +25 -14
  140. package/build/hooks/index.js.map +1 -1
  141. package/build/hooks/index.native.js +10 -3
  142. package/build/hooks/index.native.js.map +1 -1
  143. package/build/hooks/layout-child.js +68 -0
  144. package/build/hooks/layout-child.js.map +1 -0
  145. package/build/hooks/layout.js +16 -101
  146. package/build/hooks/layout.js.map +1 -1
  147. package/build/hooks/padding.js +2 -2
  148. package/build/hooks/padding.js.map +1 -1
  149. package/build/hooks/position.js +40 -62
  150. package/build/hooks/position.js.map +1 -1
  151. package/build/hooks/style.js +51 -88
  152. package/build/hooks/style.js.map +1 -1
  153. package/build/hooks/typography.js +34 -14
  154. package/build/hooks/typography.js.map +1 -1
  155. package/build/hooks/utils.js +154 -7
  156. package/build/hooks/utils.js.map +1 -1
  157. package/build/private-apis.js +0 -2
  158. package/build/private-apis.js.map +1 -1
  159. package/build/store/private-actions.js +8 -0
  160. package/build/store/private-actions.js.map +1 -1
  161. package/build/store/private-selectors.js +34 -0
  162. package/build/store/private-selectors.js.map +1 -1
  163. package/build/store/reducer.js +8 -0
  164. package/build/store/reducer.js.map +1 -1
  165. package/build/store/selectors.js +10 -60
  166. package/build/store/selectors.js.map +1 -1
  167. package/build/store/utils.js +66 -0
  168. package/build/store/utils.js.map +1 -0
  169. package/build/utils/object.js +21 -61
  170. package/build/utils/object.js.map +1 -1
  171. package/build/utils/selection.js +9 -1
  172. package/build/utils/selection.js.map +1 -1
  173. package/build-module/components/block-canvas/index.js +23 -7
  174. package/build-module/components/block-canvas/index.js.map +1 -1
  175. package/build-module/components/block-card/index.js +1 -1
  176. package/build-module/components/block-card/index.js.map +1 -1
  177. package/build-module/components/block-controls/hook.js +4 -24
  178. package/build-module/components/block-controls/hook.js.map +1 -1
  179. package/build-module/components/block-edit/context.js +2 -0
  180. package/build-module/components/block-edit/context.js.map +1 -1
  181. package/build-module/components/block-edit/index.js +19 -10
  182. package/build-module/components/block-edit/index.js.map +1 -1
  183. package/build-module/components/block-info-slot-fill/index.js +3 -3
  184. package/build-module/components/block-info-slot-fill/index.js.map +1 -1
  185. package/build-module/components/block-list/block.js +29 -10
  186. package/build-module/components/block-list/block.js.map +1 -1
  187. package/build-module/components/block-list/block.native.js +14 -5
  188. package/build-module/components/block-list/block.native.js.map +1 -1
  189. package/build-module/components/block-list/use-block-props/index.js +62 -19
  190. package/build-module/components/block-list/use-block-props/index.js.map +1 -1
  191. package/build-module/components/block-list/use-block-props/use-focus-first-element.js +4 -29
  192. package/build-module/components/block-list/use-block-props/use-focus-first-element.js.map +1 -1
  193. package/build-module/components/block-list/use-block-props/use-is-hovered.js +4 -14
  194. package/build-module/components/block-list/use-block-props/use-is-hovered.js.map +1 -1
  195. package/build-module/components/block-list/use-block-props/use-selected-block-event-handlers.js +4 -2
  196. package/build-module/components/block-list/use-block-props/use-selected-block-event-handlers.js.map +1 -1
  197. package/build-module/components/block-patterns-list/index.js +1 -1
  198. package/build-module/components/block-patterns-list/index.js.map +1 -1
  199. package/build-module/components/block-removal-warning-modal/index.js +3 -10
  200. package/build-module/components/block-removal-warning-modal/index.js.map +1 -1
  201. package/build-module/components/block-rename/modal.js +3 -0
  202. package/build-module/components/block-rename/modal.js.map +1 -1
  203. package/build-module/components/block-settings/container.native.js +4 -2
  204. package/build-module/components/block-settings/container.native.js.map +1 -1
  205. package/build-module/components/block-styles/index.js +1 -1
  206. package/build-module/components/block-styles/index.js.map +1 -1
  207. package/build-module/components/block-styles/index.native.js +3 -2
  208. package/build-module/components/block-styles/index.native.js.map +1 -1
  209. package/build-module/components/block-toolbar/index.js +88 -25
  210. package/build-module/components/block-toolbar/index.js.map +1 -1
  211. package/build-module/components/block-tools/block-toolbar-breadcrumb.js +41 -0
  212. package/build-module/components/block-tools/block-toolbar-breadcrumb.js.map +1 -0
  213. package/build-module/components/block-tools/block-toolbar-popover.js +76 -0
  214. package/build-module/components/block-tools/block-toolbar-popover.js.map +1 -0
  215. package/build-module/components/block-tools/index.js +27 -24
  216. package/build-module/components/block-tools/index.js.map +1 -1
  217. package/build-module/components/block-types-list/index.native.js +2 -1
  218. package/build-module/components/block-types-list/index.native.js.map +1 -1
  219. package/build-module/components/block-variation-picker/index.native.js +2 -1
  220. package/build-module/components/block-variation-picker/index.native.js.map +1 -1
  221. package/build-module/components/colors-gradients/control.js +29 -18
  222. package/build-module/components/colors-gradients/control.js.map +1 -1
  223. package/build-module/components/duotone-control/index.js +1 -4
  224. package/build-module/components/duotone-control/index.js.map +1 -1
  225. package/build-module/components/global-styles/color-panel.js +23 -21
  226. package/build-module/components/global-styles/color-panel.js.map +1 -1
  227. package/build-module/components/global-styles/filters-panel.js +10 -4
  228. package/build-module/components/global-styles/filters-panel.js.map +1 -1
  229. package/build-module/components/global-styles/typography-panel.js +20 -31
  230. package/build-module/components/global-styles/typography-panel.js.map +1 -1
  231. package/build-module/components/image-link-destinations/index.native.js +109 -0
  232. package/build-module/components/image-link-destinations/index.native.js.map +1 -0
  233. package/build-module/components/index.native.js +1 -0
  234. package/build-module/components/index.native.js.map +1 -1
  235. package/build-module/components/inserter/media-tab/media-panel.js +1 -1
  236. package/build-module/components/inserter/media-tab/media-panel.js.map +1 -1
  237. package/build-module/components/inserter/menu.js +14 -7
  238. package/build-module/components/inserter/menu.js.map +1 -1
  239. package/build-module/components/inserter/preview-panel.js +2 -2
  240. package/build-module/components/inserter/preview-panel.js.map +1 -1
  241. package/build-module/components/inserter-button/index.native.js +89 -0
  242. package/build-module/components/inserter-button/index.native.js.map +1 -0
  243. package/build-module/components/inserter-button/sparkles.js +15 -0
  244. package/build-module/components/inserter-button/sparkles.js.map +1 -0
  245. package/build-module/components/inserter-draggable-blocks/index.js +9 -5
  246. package/build-module/components/inserter-draggable-blocks/index.js.map +1 -1
  247. package/build-module/components/inspector-controls/fill.js +3 -3
  248. package/build-module/components/inspector-controls/fill.js.map +1 -1
  249. package/build-module/components/inspector-controls/fill.native.js +3 -3
  250. package/build-module/components/inspector-controls/fill.native.js.map +1 -1
  251. package/build-module/components/navigable-toolbar/index.js +2 -2
  252. package/build-module/components/navigable-toolbar/index.js.map +1 -1
  253. package/build-module/components/preview-options/index.js +6 -62
  254. package/build-module/components/preview-options/index.js.map +1 -1
  255. package/build-module/components/rich-text/content.js +25 -21
  256. package/build-module/components/rich-text/content.js.map +1 -1
  257. package/build-module/components/rich-text/get-rich-text-values.js +2 -1
  258. package/build-module/components/rich-text/get-rich-text-values.js.map +1 -1
  259. package/build-module/components/rich-text/index.js +4 -32
  260. package/build-module/components/rich-text/index.js.map +1 -1
  261. package/build-module/components/rich-text/index.native.js +10 -18
  262. package/build-module/components/rich-text/index.native.js.map +1 -1
  263. package/build-module/components/rich-text/native/get-format-colors.native.js +22 -24
  264. package/build-module/components/rich-text/native/get-format-colors.native.js.map +1 -1
  265. package/build-module/components/rich-text/native/index.native.js +7 -34
  266. package/build-module/components/rich-text/native/index.native.js.map +1 -1
  267. package/build-module/components/rich-text/use-input-rules.js +5 -1
  268. package/build-module/components/rich-text/use-input-rules.js.map +1 -1
  269. package/build-module/components/rich-text/with-deprecations.js +42 -0
  270. package/build-module/components/rich-text/with-deprecations.js.map +1 -0
  271. package/build-module/components/use-block-drop-zone/index.js +69 -8
  272. package/build-module/components/use-block-drop-zone/index.js.map +1 -1
  273. package/build-module/components/use-on-block-drop/index.js +1 -1
  274. package/build-module/components/use-on-block-drop/index.js.map +1 -1
  275. package/build-module/components/use-resize-canvas/index.js +4 -1
  276. package/build-module/components/use-resize-canvas/index.js.map +1 -1
  277. package/build-module/components/use-settings/index.js +13 -1
  278. package/build-module/components/use-settings/index.js.map +1 -1
  279. package/build-module/hooks/align.js +19 -66
  280. package/build-module/hooks/align.js.map +1 -1
  281. package/build-module/hooks/align.native.js +1 -0
  282. package/build-module/hooks/align.native.js.map +1 -1
  283. package/build-module/hooks/anchor.js +11 -26
  284. package/build-module/hooks/anchor.js.map +1 -1
  285. package/build-module/hooks/background.js +26 -28
  286. package/build-module/hooks/background.js.map +1 -1
  287. package/build-module/hooks/block-hooks.js +22 -30
  288. package/build-module/hooks/block-hooks.js.map +1 -1
  289. package/build-module/hooks/block-renaming.js +17 -21
  290. package/build-module/hooks/block-renaming.js.map +1 -1
  291. package/build-module/hooks/border.js +57 -78
  292. package/build-module/hooks/border.js.map +1 -1
  293. package/build-module/hooks/color.js +74 -86
  294. package/build-module/hooks/color.js.map +1 -1
  295. package/build-module/hooks/content-lock-ui.js +27 -27
  296. package/build-module/hooks/content-lock-ui.js.map +1 -1
  297. package/build-module/hooks/custom-class-name.js +11 -27
  298. package/build-module/hooks/custom-class-name.js.map +1 -1
  299. package/build-module/hooks/custom-fields.js +20 -39
  300. package/build-module/hooks/custom-fields.js.map +1 -1
  301. package/build-module/hooks/dimensions.js +21 -16
  302. package/build-module/hooks/dimensions.js.map +1 -1
  303. package/build-module/hooks/duotone.js +30 -61
  304. package/build-module/hooks/duotone.js.map +1 -1
  305. package/build-module/hooks/font-family.js +14 -23
  306. package/build-module/hooks/font-family.js.map +1 -1
  307. package/build-module/hooks/font-size.js +49 -119
  308. package/build-module/hooks/font-size.js.map +1 -1
  309. package/build-module/hooks/index.js +18 -14
  310. package/build-module/hooks/index.js.map +1 -1
  311. package/build-module/hooks/index.native.js +5 -3
  312. package/build-module/hooks/index.native.js.map +1 -1
  313. package/build-module/hooks/layout-child.js +60 -0
  314. package/build-module/hooks/layout-child.js.map +1 -0
  315. package/build-module/hooks/layout.js +13 -98
  316. package/build-module/hooks/layout.js.map +1 -1
  317. package/build-module/hooks/padding.js +2 -2
  318. package/build-module/hooks/padding.js.map +1 -1
  319. package/build-module/hooks/position.js +38 -59
  320. package/build-module/hooks/position.js.map +1 -1
  321. package/build-module/hooks/style.js +51 -84
  322. package/build-module/hooks/style.js.map +1 -1
  323. package/build-module/hooks/typography.js +33 -12
  324. package/build-module/hooks/typography.js.map +1 -1
  325. package/build-module/hooks/utils.js +149 -6
  326. package/build-module/hooks/utils.js.map +1 -1
  327. package/build-module/private-apis.js +0 -2
  328. package/build-module/private-apis.js.map +1 -1
  329. package/build-module/store/private-actions.js +7 -0
  330. package/build-module/store/private-actions.js.map +1 -1
  331. package/build-module/store/private-selectors.js +33 -1
  332. package/build-module/store/private-selectors.js.map +1 -1
  333. package/build-module/store/reducer.js +8 -0
  334. package/build-module/store/reducer.js.map +1 -1
  335. package/build-module/store/selectors.js +3 -53
  336. package/build-module/store/selectors.js.map +1 -1
  337. package/build-module/store/utils.js +56 -0
  338. package/build-module/store/utils.js.map +1 -0
  339. package/build-module/utils/object.js +21 -60
  340. package/build-module/utils/object.js.map +1 -1
  341. package/build-module/utils/selection.js +9 -1
  342. package/build-module/utils/selection.js.map +1 -1
  343. package/build-style/style-rtl.css +113 -293
  344. package/build-style/style.css +113 -293
  345. package/package.json +31 -31
  346. package/src/components/block-canvas/index.js +31 -17
  347. package/src/components/block-caption/README.md +2 -2
  348. package/src/components/block-card/index.js +5 -3
  349. package/src/components/block-card/style.scss +7 -3
  350. package/src/components/block-controls/hook.js +8 -30
  351. package/src/components/block-controls/test/index.js +3 -3
  352. package/src/components/block-edit/context.js +3 -0
  353. package/src/components/block-edit/index.js +36 -10
  354. package/src/components/block-info-slot-fill/index.js +6 -3
  355. package/src/components/block-inspector/style.scss +0 -4
  356. package/src/components/block-list/block.js +39 -5
  357. package/src/components/block-list/block.native.js +18 -4
  358. package/src/components/block-list/use-block-props/index.js +74 -21
  359. package/src/components/block-list/use-block-props/use-focus-first-element.js +1 -34
  360. package/src/components/block-list/use-block-props/use-is-hovered.js +2 -13
  361. package/src/components/block-list/use-block-props/use-selected-block-event-handlers.js +1 -5
  362. package/src/components/block-patterns-list/index.js +1 -1
  363. package/src/components/block-removal-warning-modal/index.js +7 -14
  364. package/src/components/block-rename/modal.js +7 -1
  365. package/src/components/block-settings/container.native.js +3 -5
  366. package/src/components/block-styles/index.js +1 -1
  367. package/src/components/block-styles/index.native.js +4 -2
  368. package/src/components/block-styles/style.scss +0 -11
  369. package/src/components/block-switcher/test/__snapshots__/index.js.snap +3 -1
  370. package/src/components/block-toolbar/index.js +180 -95
  371. package/src/components/block-toolbar/style.scss +50 -66
  372. package/src/components/block-tools/block-toolbar-breadcrumb.js +46 -0
  373. package/src/components/block-tools/block-toolbar-popover.js +90 -0
  374. package/src/components/block-tools/index.js +42 -29
  375. package/src/components/block-tools/style.scss +60 -172
  376. package/src/components/block-types-list/index.native.js +2 -1
  377. package/src/components/block-variation-picker/index.native.js +1 -1
  378. package/src/components/colors-gradients/control.js +49 -30
  379. package/src/components/colors-gradients/style.scss +0 -7
  380. package/src/components/duotone-control/index.js +2 -5
  381. package/src/components/duotone-control/style.scss +1 -6
  382. package/src/components/global-styles/color-panel.js +34 -25
  383. package/src/components/global-styles/filters-panel.js +8 -4
  384. package/src/components/global-styles/typography-panel.js +23 -43
  385. package/src/components/image-link-destinations/index.native.js +152 -0
  386. package/src/components/image-link-destinations/style.native.scss +16 -0
  387. package/src/components/index.native.js +1 -0
  388. package/src/components/inner-blocks/README.md +13 -2
  389. package/src/components/inserter/media-tab/media-panel.js +1 -1
  390. package/src/components/inserter/menu.js +16 -8
  391. package/src/components/inserter/preview-panel.js +2 -2
  392. package/src/components/inserter/style.scss +15 -17
  393. package/src/components/inserter-button/README.md +62 -0
  394. package/src/components/inserter-button/index.native.js +116 -0
  395. package/src/components/inserter-button/sparkles.js +15 -0
  396. package/src/components/inserter-button/style.native.scss +72 -0
  397. package/src/components/inserter-draggable-blocks/index.js +18 -5
  398. package/src/components/inspector-controls/fill.js +6 -3
  399. package/src/components/inspector-controls/fill.native.js +6 -3
  400. package/src/components/link-control/style.scss +1 -1
  401. package/src/components/link-control/test/index.js +1 -1
  402. package/src/components/navigable-toolbar/README.md +2 -0
  403. package/src/components/navigable-toolbar/index.js +2 -2
  404. package/src/components/preview-options/index.js +6 -86
  405. package/src/components/rich-text/content.js +27 -20
  406. package/src/components/rich-text/get-rich-text-values.js +6 -1
  407. package/src/components/rich-text/index.js +5 -46
  408. package/src/components/rich-text/index.native.js +8 -25
  409. package/src/components/rich-text/native/get-format-colors.native.js +33 -40
  410. package/src/components/rich-text/native/index.native.js +7 -48
  411. package/src/components/rich-text/use-input-rules.js +6 -1
  412. package/src/components/rich-text/with-deprecations.js +51 -0
  413. package/src/components/use-block-drop-zone/index.js +114 -14
  414. package/src/components/use-on-block-drop/index.js +2 -1
  415. package/src/components/use-resize-canvas/README.md +3 -3
  416. package/src/components/use-resize-canvas/index.js +4 -1
  417. package/src/components/use-settings/index.js +15 -1
  418. package/src/hooks/align.js +15 -76
  419. package/src/hooks/align.native.js +1 -0
  420. package/src/hooks/anchor.js +13 -33
  421. package/src/hooks/background.js +28 -23
  422. package/src/hooks/block-hooks.js +22 -51
  423. package/src/hooks/block-renaming.js +23 -37
  424. package/src/hooks/border.js +67 -118
  425. package/src/hooks/color.js +100 -132
  426. package/src/hooks/content-lock-ui.js +110 -122
  427. package/src/hooks/custom-class-name.js +8 -40
  428. package/src/hooks/custom-fields.js +20 -47
  429. package/src/hooks/dimensions.js +20 -16
  430. package/src/hooks/duotone.js +70 -127
  431. package/src/hooks/font-family.js +10 -29
  432. package/src/hooks/font-size.js +66 -162
  433. package/src/hooks/index.js +42 -14
  434. package/src/hooks/index.native.js +6 -3
  435. package/src/hooks/layout-child.js +53 -0
  436. package/src/hooks/layout.js +13 -102
  437. package/src/hooks/padding.js +2 -2
  438. package/src/hooks/position.js +50 -90
  439. package/src/hooks/style.js +117 -187
  440. package/src/hooks/test/align.js +1 -178
  441. package/src/hooks/typography.js +20 -16
  442. package/src/hooks/utils.js +187 -6
  443. package/src/private-apis.js +0 -2
  444. package/src/store/private-actions.js +8 -0
  445. package/src/store/private-selectors.js +45 -0
  446. package/src/store/reducer.js +8 -0
  447. package/src/store/selectors.js +5 -69
  448. package/src/store/utils.js +74 -0
  449. package/src/style.scss +0 -2
  450. package/src/utils/object.js +18 -69
  451. package/src/utils/selection.js +9 -2
  452. package/build/components/block-list/use-block-props/use-block-class-names.js +0 -67
  453. package/build/components/block-list/use-block-props/use-block-class-names.js.map +0 -1
  454. package/build/components/block-list/use-block-props/use-block-custom-class-name.js +0 -46
  455. package/build/components/block-list/use-block-props/use-block-custom-class-name.js.map +0 -1
  456. package/build/components/block-list/use-block-props/use-block-default-class-name.js +0 -37
  457. package/build/components/block-list/use-block-props/use-block-default-class-name.js.map +0 -1
  458. package/build/components/block-tools/back-compat.js +0 -45
  459. package/build/components/block-tools/back-compat.js.map +0 -1
  460. package/build/components/block-tools/block-contextual-toolbar.js +0 -91
  461. package/build/components/block-tools/block-contextual-toolbar.js.map +0 -1
  462. package/build/components/block-tools/selected-block-tools.js +0 -113
  463. package/build/components/block-tools/selected-block-tools.js.map +0 -1
  464. package/build/components/inserter/hooks/use-debounced-input.js +0 -22
  465. package/build/components/inserter/hooks/use-debounced-input.js.map +0 -1
  466. package/build/components/use-display-block-controls/index.js +0 -39
  467. package/build/components/use-display-block-controls/index.js.map +0 -1
  468. package/build/components/use-display-block-controls/index.native.js +0 -39
  469. package/build/components/use-display-block-controls/index.native.js.map +0 -1
  470. package/build-module/components/block-list/use-block-props/use-block-class-names.js +0 -60
  471. package/build-module/components/block-list/use-block-props/use-block-class-names.js.map +0 -1
  472. package/build-module/components/block-list/use-block-props/use-block-custom-class-name.js +0 -40
  473. package/build-module/components/block-list/use-block-props/use-block-custom-class-name.js.map +0 -1
  474. package/build-module/components/block-list/use-block-props/use-block-default-class-name.js +0 -31
  475. package/build-module/components/block-list/use-block-props/use-block-default-class-name.js.map +0 -1
  476. package/build-module/components/block-tools/back-compat.js +0 -35
  477. package/build-module/components/block-tools/back-compat.js.map +0 -1
  478. package/build-module/components/block-tools/block-contextual-toolbar.js +0 -83
  479. package/build-module/components/block-tools/block-contextual-toolbar.js.map +0 -1
  480. package/build-module/components/block-tools/selected-block-tools.js +0 -105
  481. package/build-module/components/block-tools/selected-block-tools.js.map +0 -1
  482. package/build-module/components/inserter/hooks/use-debounced-input.js +0 -15
  483. package/build-module/components/inserter/hooks/use-debounced-input.js.map +0 -1
  484. package/build-module/components/use-display-block-controls/index.js +0 -32
  485. package/build-module/components/use-display-block-controls/index.js.map +0 -1
  486. package/build-module/components/use-display-block-controls/index.native.js +0 -32
  487. package/build-module/components/use-display-block-controls/index.native.js.map +0 -1
  488. package/src/components/block-list/use-block-props/use-block-class-names.js +0 -66
  489. package/src/components/block-list/use-block-props/use-block-custom-class-name.js +0 -44
  490. package/src/components/block-list/use-block-props/use-block-default-class-name.js +0 -35
  491. package/src/components/block-parent-selector/style.scss +0 -11
  492. package/src/components/block-tools/back-compat.js +0 -35
  493. package/src/components/block-tools/block-contextual-toolbar.js +0 -100
  494. package/src/components/block-tools/selected-block-tools.js +0 -127
  495. package/src/components/inserter/hooks/use-debounced-input.js +0 -18
  496. package/src/components/preview-options/README.md +0 -94
  497. package/src/components/preview-options/style.scss +0 -64
  498. package/src/components/use-display-block-controls/index.js +0 -36
  499. package/src/components/use-display-block-controls/index.native.js +0 -37
  500. package/src/hooks/test/color.js +0 -112
@@ -1,67 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.useBlockClassNames = useBlockClassNames;
8
- var _classnames = _interopRequireDefault(require("classnames"));
9
- var _data = require("@wordpress/data");
10
- var _blocks = require("@wordpress/blocks");
11
- var _store = require("../../../store");
12
- /**
13
- * External dependencies
14
- */
15
-
16
- /**
17
- * WordPress dependencies
18
- */
19
-
20
- /**
21
- * Internal dependencies
22
- */
23
-
24
- /**
25
- * Returns the class names used for the different states of the block.
26
- *
27
- * @param {string} clientId The block client ID.
28
- *
29
- * @return {string} The class names.
30
- */
31
- function useBlockClassNames(clientId) {
32
- return (0, _data.useSelect)(select => {
33
- const {
34
- isBlockBeingDragged,
35
- isBlockHighlighted,
36
- isBlockSelected,
37
- isBlockMultiSelected,
38
- getBlockName,
39
- getSettings,
40
- hasSelectedInnerBlock,
41
- isTyping,
42
- __unstableIsFullySelected,
43
- __unstableSelectionHasUnmergeableBlock
44
- } = select(_store.store);
45
- const {
46
- outlineMode
47
- } = getSettings();
48
- const isDragging = isBlockBeingDragged(clientId);
49
- const isSelected = isBlockSelected(clientId);
50
- const name = getBlockName(clientId);
51
- const checkDeep = true;
52
- // "ancestor" is the more appropriate label due to "deep" check.
53
- const isAncestorOfSelectedBlock = hasSelectedInnerBlock(clientId, checkDeep);
54
- const isMultiSelected = isBlockMultiSelected(clientId);
55
- return (0, _classnames.default)({
56
- 'is-selected': isSelected,
57
- 'is-highlighted': isBlockHighlighted(clientId),
58
- 'is-multi-selected': isMultiSelected,
59
- 'is-partially-selected': isMultiSelected && !__unstableIsFullySelected() && !__unstableSelectionHasUnmergeableBlock(),
60
- 'is-reusable': (0, _blocks.isReusableBlock)((0, _blocks.getBlockType)(name)),
61
- 'is-dragging': isDragging,
62
- 'has-child-selected': isAncestorOfSelectedBlock,
63
- 'remove-outline': isSelected && outlineMode && isTyping()
64
- });
65
- }, [clientId]);
66
- }
67
- //# sourceMappingURL=use-block-class-names.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_classnames","_interopRequireDefault","require","_data","_blocks","_store","useBlockClassNames","clientId","useSelect","select","isBlockBeingDragged","isBlockHighlighted","isBlockSelected","isBlockMultiSelected","getBlockName","getSettings","hasSelectedInnerBlock","isTyping","__unstableIsFullySelected","__unstableSelectionHasUnmergeableBlock","blockEditorStore","outlineMode","isDragging","isSelected","name","checkDeep","isAncestorOfSelectedBlock","isMultiSelected","classnames","isReusableBlock","getBlockType"],"sources":["@wordpress/block-editor/src/components/block-list/use-block-props/use-block-class-names.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { isReusableBlock, getBlockType } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../../store';\n\n/**\n * Returns the class names used for the different states of the block.\n *\n * @param {string} clientId The block client ID.\n *\n * @return {string} The class names.\n */\nexport function useBlockClassNames( clientId ) {\n\treturn useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tisBlockBeingDragged,\n\t\t\t\tisBlockHighlighted,\n\t\t\t\tisBlockSelected,\n\t\t\t\tisBlockMultiSelected,\n\t\t\t\tgetBlockName,\n\t\t\t\tgetSettings,\n\t\t\t\thasSelectedInnerBlock,\n\t\t\t\tisTyping,\n\t\t\t\t__unstableIsFullySelected,\n\t\t\t\t__unstableSelectionHasUnmergeableBlock,\n\t\t\t} = select( blockEditorStore );\n\t\t\tconst { outlineMode } = getSettings();\n\t\t\tconst isDragging = isBlockBeingDragged( clientId );\n\t\t\tconst isSelected = isBlockSelected( clientId );\n\t\t\tconst name = getBlockName( clientId );\n\t\t\tconst checkDeep = true;\n\t\t\t// \"ancestor\" is the more appropriate label due to \"deep\" check.\n\t\t\tconst isAncestorOfSelectedBlock = hasSelectedInnerBlock(\n\t\t\t\tclientId,\n\t\t\t\tcheckDeep\n\t\t\t);\n\t\t\tconst isMultiSelected = isBlockMultiSelected( clientId );\n\t\t\treturn classnames( {\n\t\t\t\t'is-selected': isSelected,\n\t\t\t\t'is-highlighted': isBlockHighlighted( clientId ),\n\t\t\t\t'is-multi-selected': isMultiSelected,\n\t\t\t\t'is-partially-selected':\n\t\t\t\t\tisMultiSelected &&\n\t\t\t\t\t! __unstableIsFullySelected() &&\n\t\t\t\t\t! __unstableSelectionHasUnmergeableBlock(),\n\t\t\t\t'is-reusable': isReusableBlock( getBlockType( name ) ),\n\t\t\t\t'is-dragging': isDragging,\n\t\t\t\t'has-child-selected': isAncestorOfSelectedBlock,\n\t\t\t\t'remove-outline': isSelected && outlineMode && isTyping(),\n\t\t\t} );\n\t\t},\n\t\t[ clientId ]\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AAKA,IAAAG,MAAA,GAAAH,OAAA;AAdA;AACA;AACA;;AAGA;AACA;AACA;;AAIA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASI,kBAAkBA,CAAEC,QAAQ,EAAG;EAC9C,OAAO,IAAAC,eAAS,EACbC,MAAM,IAAM;IACb,MAAM;MACLC,mBAAmB;MACnBC,kBAAkB;MAClBC,eAAe;MACfC,oBAAoB;MACpBC,YAAY;MACZC,WAAW;MACXC,qBAAqB;MACrBC,QAAQ;MACRC,yBAAyB;MACzBC;IACD,CAAC,GAAGV,MAAM,CAAEW,YAAiB,CAAC;IAC9B,MAAM;MAAEC;IAAY,CAAC,GAAGN,WAAW,CAAC,CAAC;IACrC,MAAMO,UAAU,GAAGZ,mBAAmB,CAAEH,QAAS,CAAC;IAClD,MAAMgB,UAAU,GAAGX,eAAe,CAAEL,QAAS,CAAC;IAC9C,MAAMiB,IAAI,GAAGV,YAAY,CAAEP,QAAS,CAAC;IACrC,MAAMkB,SAAS,GAAG,IAAI;IACtB;IACA,MAAMC,yBAAyB,GAAGV,qBAAqB,CACtDT,QAAQ,EACRkB,SACD,CAAC;IACD,MAAME,eAAe,GAAGd,oBAAoB,CAAEN,QAAS,CAAC;IACxD,OAAO,IAAAqB,mBAAU,EAAE;MAClB,aAAa,EAAEL,UAAU;MACzB,gBAAgB,EAAEZ,kBAAkB,CAAEJ,QAAS,CAAC;MAChD,mBAAmB,EAAEoB,eAAe;MACpC,uBAAuB,EACtBA,eAAe,IACf,CAAET,yBAAyB,CAAC,CAAC,IAC7B,CAAEC,sCAAsC,CAAC,CAAC;MAC3C,aAAa,EAAE,IAAAU,uBAAe,EAAE,IAAAC,oBAAY,EAAEN,IAAK,CAAE,CAAC;MACtD,aAAa,EAAEF,UAAU;MACzB,oBAAoB,EAAEI,yBAAyB;MAC/C,gBAAgB,EAAEH,UAAU,IAAIF,WAAW,IAAIJ,QAAQ,CAAC;IACzD,CAAE,CAAC;EACJ,CAAC,EACD,CAAEV,QAAQ,CACX,CAAC;AACF"}
@@ -1,46 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.useBlockCustomClassName = useBlockCustomClassName;
7
- var _data = require("@wordpress/data");
8
- var _blocks = require("@wordpress/blocks");
9
- var _store = require("../../../store");
10
- /**
11
- * WordPress dependencies
12
- */
13
-
14
- /**
15
- * Internal dependencies
16
- */
17
-
18
- /**
19
- * Returns the custom class name if the block is a light block.
20
- *
21
- * @param {string} clientId The block client ID.
22
- *
23
- * @return {string} The custom class name.
24
- */
25
- function useBlockCustomClassName(clientId) {
26
- // It's good for this to be a separate selector because it will be executed
27
- // on every attribute change, while the other selectors are not re-evaluated
28
- // as much.
29
- return (0, _data.useSelect)(select => {
30
- const {
31
- getBlockName,
32
- getBlockAttributes
33
- } = select(_store.store);
34
- const attributes = getBlockAttributes(clientId);
35
- if (!attributes?.className) {
36
- return;
37
- }
38
- const blockType = (0, _blocks.getBlockType)(getBlockName(clientId));
39
- const hasLightBlockWrapper = blockType?.apiVersion > 1;
40
- if (!hasLightBlockWrapper) {
41
- return;
42
- }
43
- return attributes.className;
44
- }, [clientId]);
45
- }
46
- //# sourceMappingURL=use-block-custom-class-name.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_data","require","_blocks","_store","useBlockCustomClassName","clientId","useSelect","select","getBlockName","getBlockAttributes","blockEditorStore","attributes","className","blockType","getBlockType","hasLightBlockWrapper","apiVersion"],"sources":["@wordpress/block-editor/src/components/block-list/use-block-props/use-block-custom-class-name.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { getBlockType } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../../store';\n\n/**\n * Returns the custom class name if the block is a light block.\n *\n * @param {string} clientId The block client ID.\n *\n * @return {string} The custom class name.\n */\nexport function useBlockCustomClassName( clientId ) {\n\t// It's good for this to be a separate selector because it will be executed\n\t// on every attribute change, while the other selectors are not re-evaluated\n\t// as much.\n\treturn useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockName, getBlockAttributes } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\tconst attributes = getBlockAttributes( clientId );\n\n\t\t\tif ( ! attributes?.className ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst blockType = getBlockType( getBlockName( clientId ) );\n\t\t\tconst hasLightBlockWrapper = blockType?.apiVersion > 1;\n\n\t\t\tif ( ! hasLightBlockWrapper ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\treturn attributes.className;\n\t\t},\n\t\t[ clientId ]\n\t);\n}\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AAKA,IAAAE,MAAA,GAAAF,OAAA;AATA;AACA;AACA;;AAIA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASG,uBAAuBA,CAAEC,QAAQ,EAAG;EACnD;EACA;EACA;EACA,OAAO,IAAAC,eAAS,EACbC,MAAM,IAAM;IACb,MAAM;MAAEC,YAAY;MAAEC;IAAmB,CAAC,GACzCF,MAAM,CAAEG,YAAiB,CAAC;IAC3B,MAAMC,UAAU,GAAGF,kBAAkB,CAAEJ,QAAS,CAAC;IAEjD,IAAK,CAAEM,UAAU,EAAEC,SAAS,EAAG;MAC9B;IACD;IAEA,MAAMC,SAAS,GAAG,IAAAC,oBAAY,EAAEN,YAAY,CAAEH,QAAS,CAAE,CAAC;IAC1D,MAAMU,oBAAoB,GAAGF,SAAS,EAAEG,UAAU,GAAG,CAAC;IAEtD,IAAK,CAAED,oBAAoB,EAAG;MAC7B;IACD;IAEA,OAAOJ,UAAU,CAACC,SAAS;EAC5B,CAAC,EACD,CAAEP,QAAQ,CACX,CAAC;AACF"}
@@ -1,37 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.useBlockDefaultClassName = useBlockDefaultClassName;
7
- var _data = require("@wordpress/data");
8
- var _blocks = require("@wordpress/blocks");
9
- var _store = require("../../../store");
10
- /**
11
- * WordPress dependencies
12
- */
13
-
14
- /**
15
- * Internal dependencies
16
- */
17
-
18
- /**
19
- * Returns the default class name if the block is a light block and it supports
20
- * `className`.
21
- *
22
- * @param {string} clientId The block client ID.
23
- *
24
- * @return {string} The class name, e.g. `wp-block-paragraph`.
25
- */
26
- function useBlockDefaultClassName(clientId) {
27
- return (0, _data.useSelect)(select => {
28
- const name = select(_store.store).getBlockName(clientId);
29
- const blockType = (0, _blocks.getBlockType)(name);
30
- const hasLightBlockWrapper = blockType?.apiVersion > 1;
31
- if (!hasLightBlockWrapper) {
32
- return;
33
- }
34
- return (0, _blocks.getBlockDefaultClassName)(name);
35
- }, [clientId]);
36
- }
37
- //# sourceMappingURL=use-block-default-class-name.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_data","require","_blocks","_store","useBlockDefaultClassName","clientId","useSelect","select","name","blockEditorStore","getBlockName","blockType","getBlockType","hasLightBlockWrapper","apiVersion","getBlockDefaultClassName"],"sources":["@wordpress/block-editor/src/components/block-list/use-block-props/use-block-default-class-name.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { getBlockType, getBlockDefaultClassName } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../../store';\n\n/**\n * Returns the default class name if the block is a light block and it supports\n * `className`.\n *\n * @param {string} clientId The block client ID.\n *\n * @return {string} The class name, e.g. `wp-block-paragraph`.\n */\nexport function useBlockDefaultClassName( clientId ) {\n\treturn useSelect(\n\t\t( select ) => {\n\t\t\tconst name = select( blockEditorStore ).getBlockName( clientId );\n\t\t\tconst blockType = getBlockType( name );\n\t\t\tconst hasLightBlockWrapper = blockType?.apiVersion > 1;\n\n\t\t\tif ( ! hasLightBlockWrapper ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\treturn getBlockDefaultClassName( name );\n\t\t},\n\t\t[ clientId ]\n\t);\n}\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AAKA,IAAAE,MAAA,GAAAF,OAAA;AATA;AACA;AACA;;AAIA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASG,wBAAwBA,CAAEC,QAAQ,EAAG;EACpD,OAAO,IAAAC,eAAS,EACbC,MAAM,IAAM;IACb,MAAMC,IAAI,GAAGD,MAAM,CAAEE,YAAiB,CAAC,CAACC,YAAY,CAAEL,QAAS,CAAC;IAChE,MAAMM,SAAS,GAAG,IAAAC,oBAAY,EAAEJ,IAAK,CAAC;IACtC,MAAMK,oBAAoB,GAAGF,SAAS,EAAEG,UAAU,GAAG,CAAC;IAEtD,IAAK,CAAED,oBAAoB,EAAG;MAC7B;IACD;IAEA,OAAO,IAAAE,gCAAwB,EAAEP,IAAK,CAAC;EACxC,CAAC,EACD,CAAEH,QAAQ,CACX,CAAC;AACF"}
@@ -1,45 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.default = BlockToolsBackCompat;
8
- var _react = require("react");
9
- var _element = require("@wordpress/element");
10
- var _components = require("@wordpress/components");
11
- var _deprecated = _interopRequireDefault(require("@wordpress/deprecated"));
12
- var _insertionPoint = _interopRequireWildcard(require("./insertion-point"));
13
- var _selectedBlockTools = _interopRequireDefault(require("./selected-block-tools"));
14
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
15
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
16
- /**
17
- * WordPress dependencies
18
- */
19
-
20
- /**
21
- * Internal dependencies
22
- */
23
-
24
- function BlockToolsBackCompat({
25
- children
26
- }) {
27
- const openRef = (0, _element.useContext)(_insertionPoint.InsertionPointOpenRef);
28
- const isDisabled = (0, _element.useContext)(_components.Disabled.Context);
29
-
30
- // If context is set, `BlockTools` is a parent component.
31
- if (openRef || isDisabled) {
32
- return children;
33
- }
34
- (0, _deprecated.default)('wp.components.Popover.Slot name="block-toolbar"', {
35
- alternative: 'wp.blockEditor.BlockTools',
36
- since: '5.8',
37
- version: '6.3'
38
- });
39
- return (0, _react.createElement)(_insertionPoint.default, {
40
- __unstablePopoverSlot: "block-toolbar"
41
- }, (0, _react.createElement)(_selectedBlockTools.default, {
42
- __unstablePopoverSlot: "block-toolbar"
43
- }), children);
44
- }
45
- //# sourceMappingURL=back-compat.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_element","require","_components","_deprecated","_interopRequireDefault","_insertionPoint","_interopRequireWildcard","_selectedBlockTools","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","BlockToolsBackCompat","children","openRef","useContext","InsertionPointOpenRef","isDisabled","Disabled","Context","deprecated","alternative","since","version","_react","createElement","__unstablePopoverSlot"],"sources":["@wordpress/block-editor/src/components/block-tools/back-compat.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useContext } from '@wordpress/element';\nimport { Disabled } from '@wordpress/components';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport InsertionPoint, { InsertionPointOpenRef } from './insertion-point';\nimport BlockPopover from './selected-block-tools';\n\nexport default function BlockToolsBackCompat( { children } ) {\n\tconst openRef = useContext( InsertionPointOpenRef );\n\tconst isDisabled = useContext( Disabled.Context );\n\n\t// If context is set, `BlockTools` is a parent component.\n\tif ( openRef || isDisabled ) {\n\t\treturn children;\n\t}\n\n\tdeprecated( 'wp.components.Popover.Slot name=\"block-toolbar\"', {\n\t\talternative: 'wp.blockEditor.BlockTools',\n\t\tsince: '5.8',\n\t\tversion: '6.3',\n\t} );\n\n\treturn (\n\t\t<InsertionPoint __unstablePopoverSlot=\"block-toolbar\">\n\t\t\t<BlockPopover __unstablePopoverSlot=\"block-toolbar\" />\n\t\t\t{ children }\n\t\t</InsertionPoint>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAC,sBAAA,CAAAH,OAAA;AAKA,IAAAI,eAAA,GAAAC,uBAAA,CAAAL,OAAA;AACA,IAAAM,mBAAA,GAAAH,sBAAA,CAAAH,OAAA;AAAkD,SAAAO,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAH,wBAAAO,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAX,GAAA,QAAAW,GAAA,kBAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAd,GAAA,EAAAW,GAAA,SAAAI,IAAA,GAAAR,qBAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAV,GAAA,EAAAW,GAAA,cAAAI,IAAA,KAAAA,IAAA,CAAAV,GAAA,IAAAU,IAAA,CAAAC,GAAA,KAAAR,MAAA,CAAAC,cAAA,CAAAH,MAAA,EAAAK,GAAA,EAAAI,IAAA,YAAAT,MAAA,CAAAK,GAAA,IAAAX,GAAA,CAAAW,GAAA,SAAAL,MAAA,CAAAJ,OAAA,GAAAF,GAAA,MAAAG,KAAA,IAAAA,KAAA,CAAAa,GAAA,CAAAhB,GAAA,EAAAM,MAAA,YAAAA,MAAA;AAXlD;AACA;AACA;;AAKA;AACA;AACA;;AAIe,SAASW,oBAAoBA,CAAE;EAAEC;AAAS,CAAC,EAAG;EAC5D,MAAMC,OAAO,GAAG,IAAAC,mBAAU,EAAEC,qCAAsB,CAAC;EACnD,MAAMC,UAAU,GAAG,IAAAF,mBAAU,EAAEG,oBAAQ,CAACC,OAAQ,CAAC;;EAEjD;EACA,IAAKL,OAAO,IAAIG,UAAU,EAAG;IAC5B,OAAOJ,QAAQ;EAChB;EAEA,IAAAO,mBAAU,EAAE,iDAAiD,EAAE;IAC9DC,WAAW,EAAE,2BAA2B;IACxCC,KAAK,EAAE,KAAK;IACZC,OAAO,EAAE;EACV,CAAE,CAAC;EAEH,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACtC,eAAA,CAAAU,OAAc;IAAC6B,qBAAqB,EAAC;EAAe,GACpD,IAAAF,MAAA,CAAAC,aAAA,EAACpC,mBAAA,CAAAQ,OAAY;IAAC6B,qBAAqB,EAAC;EAAe,CAAE,CAAC,EACpDb,QACa,CAAC;AAEnB"}
@@ -1,91 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.default = BlockContextualToolbar;
8
- var _react = require("react");
9
- var _classnames = _interopRequireDefault(require("classnames"));
10
- var _i18n = require("@wordpress/i18n");
11
- var _blocks = require("@wordpress/blocks");
12
- var _data = require("@wordpress/data");
13
- var _navigableToolbar = _interopRequireDefault(require("../navigable-toolbar"));
14
- var _blockToolbar = _interopRequireDefault(require("../block-toolbar"));
15
- var _store = require("../../store");
16
- var _useHasBlockControls = require("../block-controls/use-has-block-controls");
17
- /**
18
- * External dependencies
19
- */
20
-
21
- /**
22
- * WordPress dependencies
23
- */
24
-
25
- /**
26
- * Internal dependencies
27
- */
28
-
29
- function BlockContextualToolbar({
30
- focusOnMount,
31
- isFixed,
32
- ...props
33
- }) {
34
- const {
35
- blockType,
36
- blockEditingMode,
37
- hasParents,
38
- showParentSelector,
39
- selectedBlockClientId
40
- } = (0, _data.useSelect)(select => {
41
- const {
42
- getBlockName,
43
- getBlockParents,
44
- getSelectedBlockClientIds,
45
- getBlockEditingMode
46
- } = select(_store.store);
47
- const {
48
- getBlockType
49
- } = select(_blocks.store);
50
- const selectedBlockClientIds = getSelectedBlockClientIds();
51
- const _selectedBlockClientId = selectedBlockClientIds[0];
52
- const parents = getBlockParents(_selectedBlockClientId);
53
- const firstParentClientId = parents[parents.length - 1];
54
- const parentBlockName = getBlockName(firstParentClientId);
55
- const parentBlockType = getBlockType(parentBlockName);
56
- return {
57
- selectedBlockClientId: _selectedBlockClientId,
58
- blockType: _selectedBlockClientId && getBlockType(getBlockName(_selectedBlockClientId)),
59
- blockEditingMode: getBlockEditingMode(_selectedBlockClientId),
60
- hasParents: parents.length,
61
- showParentSelector: parentBlockType && getBlockEditingMode(firstParentClientId) === 'default' && (0, _blocks.hasBlockSupport)(parentBlockType, '__experimentalParentSelector', true) && selectedBlockClientIds.length <= 1 && getBlockEditingMode(_selectedBlockClientId) === 'default'
62
- };
63
- }, []);
64
- const isToolbarEnabled = blockType && (0, _blocks.hasBlockSupport)(blockType, '__experimentalToolbar', true);
65
- const hasAnyBlockControls = (0, _useHasBlockControls.useHasAnyBlockControls)();
66
- if (!isToolbarEnabled || blockEditingMode !== 'default' && !hasAnyBlockControls) {
67
- return null;
68
- }
69
-
70
- // Shifts the toolbar to make room for the parent block selector.
71
- const classes = (0, _classnames.default)('block-editor-block-contextual-toolbar', {
72
- 'has-parent': hasParents && showParentSelector,
73
- 'is-fixed': isFixed
74
- });
75
- return (0, _react.createElement)(_navigableToolbar.default, {
76
- focusOnMount: focusOnMount,
77
- focusEditorOnEscape: true,
78
- className: classes
79
- /* translators: accessibility text for the block toolbar */,
80
- "aria-label": (0, _i18n.__)('Block tools'),
81
- variant: isFixed ? 'unstyled' : undefined
82
- // Resets the index whenever the active block changes so
83
- // this is not persisted. See https://github.com/WordPress/gutenberg/pull/25760#issuecomment-717906169
84
- ,
85
- key: selectedBlockClientId,
86
- ...props
87
- }, (0, _react.createElement)(_blockToolbar.default, {
88
- hideDragHandle: isFixed
89
- }));
90
- }
91
- //# sourceMappingURL=block-contextual-toolbar.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_classnames","_interopRequireDefault","require","_i18n","_blocks","_data","_navigableToolbar","_blockToolbar","_store","_useHasBlockControls","BlockContextualToolbar","focusOnMount","isFixed","props","blockType","blockEditingMode","hasParents","showParentSelector","selectedBlockClientId","useSelect","select","getBlockName","getBlockParents","getSelectedBlockClientIds","getBlockEditingMode","blockEditorStore","getBlockType","blocksStore","selectedBlockClientIds","_selectedBlockClientId","parents","firstParentClientId","length","parentBlockName","parentBlockType","hasBlockSupport","isToolbarEnabled","hasAnyBlockControls","useHasAnyBlockControls","classes","classnames","_react","createElement","default","focusEditorOnEscape","className","__","variant","undefined","key","hideDragHandle"],"sources":["@wordpress/block-editor/src/components/block-tools/block-contextual-toolbar.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { hasBlockSupport, store as blocksStore } from '@wordpress/blocks';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport NavigableToolbar from '../navigable-toolbar';\nimport BlockToolbar from '../block-toolbar';\nimport { store as blockEditorStore } from '../../store';\nimport { useHasAnyBlockControls } from '../block-controls/use-has-block-controls';\n\nexport default function BlockContextualToolbar( {\n\tfocusOnMount,\n\tisFixed,\n\t...props\n} ) {\n\tconst {\n\t\tblockType,\n\t\tblockEditingMode,\n\t\thasParents,\n\t\tshowParentSelector,\n\t\tselectedBlockClientId,\n\t} = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetBlockName,\n\t\t\tgetBlockParents,\n\t\t\tgetSelectedBlockClientIds,\n\t\t\tgetBlockEditingMode,\n\t\t} = select( blockEditorStore );\n\t\tconst { getBlockType } = select( blocksStore );\n\t\tconst selectedBlockClientIds = getSelectedBlockClientIds();\n\t\tconst _selectedBlockClientId = selectedBlockClientIds[ 0 ];\n\t\tconst parents = getBlockParents( _selectedBlockClientId );\n\t\tconst firstParentClientId = parents[ parents.length - 1 ];\n\t\tconst parentBlockName = getBlockName( firstParentClientId );\n\t\tconst parentBlockType = getBlockType( parentBlockName );\n\n\t\treturn {\n\t\t\tselectedBlockClientId: _selectedBlockClientId,\n\t\t\tblockType:\n\t\t\t\t_selectedBlockClientId &&\n\t\t\t\tgetBlockType( getBlockName( _selectedBlockClientId ) ),\n\t\t\tblockEditingMode: getBlockEditingMode( _selectedBlockClientId ),\n\t\t\thasParents: parents.length,\n\t\t\tshowParentSelector:\n\t\t\t\tparentBlockType &&\n\t\t\t\tgetBlockEditingMode( firstParentClientId ) === 'default' &&\n\t\t\t\thasBlockSupport(\n\t\t\t\t\tparentBlockType,\n\t\t\t\t\t'__experimentalParentSelector',\n\t\t\t\t\ttrue\n\t\t\t\t) &&\n\t\t\t\tselectedBlockClientIds.length <= 1 &&\n\t\t\t\tgetBlockEditingMode( _selectedBlockClientId ) === 'default',\n\t\t};\n\t}, [] );\n\n\tconst isToolbarEnabled =\n\t\tblockType &&\n\t\thasBlockSupport( blockType, '__experimentalToolbar', true );\n\tconst hasAnyBlockControls = useHasAnyBlockControls();\n\tif (\n\t\t! isToolbarEnabled ||\n\t\t( blockEditingMode !== 'default' && ! hasAnyBlockControls )\n\t) {\n\t\treturn null;\n\t}\n\n\t// Shifts the toolbar to make room for the parent block selector.\n\tconst classes = classnames( 'block-editor-block-contextual-toolbar', {\n\t\t'has-parent': hasParents && showParentSelector,\n\t\t'is-fixed': isFixed,\n\t} );\n\n\treturn (\n\t\t<NavigableToolbar\n\t\t\tfocusOnMount={ focusOnMount }\n\t\t\tfocusEditorOnEscape\n\t\t\tclassName={ classes }\n\t\t\t/* translators: accessibility text for the block toolbar */\n\t\t\taria-label={ __( 'Block tools' ) }\n\t\t\tvariant={ isFixed ? 'unstyled' : undefined }\n\t\t\t// Resets the index whenever the active block changes so\n\t\t\t// this is not persisted. See https://github.com/WordPress/gutenberg/pull/25760#issuecomment-717906169\n\t\t\tkey={ selectedBlockClientId }\n\t\t\t{ ...props }\n\t\t>\n\t\t\t<BlockToolbar hideDragHandle={ isFixed } />\n\t\t</NavigableToolbar>\n\t);\n}\n"],"mappings":"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"}
@@ -1,113 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.default = SelectedBlockTools;
8
- var _react = require("react");
9
- var _classnames = _interopRequireDefault(require("classnames"));
10
- var _element = require("@wordpress/element");
11
- var _data = require("@wordpress/data");
12
- var _keyboardShortcuts = require("@wordpress/keyboard-shortcuts");
13
- var _blockSelectionButton = _interopRequireDefault(require("./block-selection-button"));
14
- var _blockContextualToolbar = _interopRequireDefault(require("./block-contextual-toolbar"));
15
- var _store = require("../../store");
16
- var _blockPopover = _interopRequireDefault(require("../block-popover"));
17
- var _useBlockToolbarPopoverProps = _interopRequireDefault(require("./use-block-toolbar-popover-props"));
18
- var _useSelectedBlockToolProps = _interopRequireDefault(require("./use-selected-block-tool-props"));
19
- var _useShouldContextualToolbarShow = require("../../utils/use-should-contextual-toolbar-show");
20
- /**
21
- * External dependencies
22
- */
23
-
24
- /**
25
- * WordPress dependencies
26
- */
27
-
28
- /**
29
- * Internal dependencies
30
- */
31
-
32
- function SelectedBlockTools({
33
- clientId,
34
- showEmptyBlockSideInserter,
35
- __unstableContentRef
36
- }) {
37
- const {
38
- capturingClientId,
39
- isInsertionPointVisible,
40
- lastClientId,
41
- rootClientId
42
- } = (0, _useSelectedBlockToolProps.default)(clientId);
43
- const {
44
- shouldShowBreadcrumb
45
- } = (0, _data.useSelect)(select => {
46
- const {
47
- hasMultiSelection,
48
- __unstableGetEditorMode
49
- } = select(_store.store);
50
- const editorMode = __unstableGetEditorMode();
51
- return {
52
- shouldShowBreadcrumb: !hasMultiSelection() && (editorMode === 'navigation' || editorMode === 'zoom-out')
53
- };
54
- }, []);
55
- const isToolbarForced = (0, _element.useRef)(false);
56
- const {
57
- shouldShowContextualToolbar,
58
- canFocusHiddenToolbar
59
- } = (0, _useShouldContextualToolbarShow.useShouldContextualToolbarShow)();
60
- const {
61
- stopTyping
62
- } = (0, _data.useDispatch)(_store.store);
63
- (0, _keyboardShortcuts.useShortcut)('core/block-editor/focus-toolbar', () => {
64
- isToolbarForced.current = true;
65
- stopTyping(true);
66
- }, {
67
- isDisabled: !canFocusHiddenToolbar
68
- });
69
- (0, _element.useEffect)(() => {
70
- isToolbarForced.current = false;
71
- });
72
-
73
- // Stores the active toolbar item index so the block toolbar can return focus
74
- // to it when re-mounting.
75
- const initialToolbarItemIndexRef = (0, _element.useRef)();
76
- (0, _element.useEffect)(() => {
77
- // Resets the index whenever the active block changes so this is not
78
- // persisted. See https://github.com/WordPress/gutenberg/pull/25760#issuecomment-717906169
79
- initialToolbarItemIndexRef.current = undefined;
80
- }, [clientId]);
81
- const popoverProps = (0, _useBlockToolbarPopoverProps.default)({
82
- contentElement: __unstableContentRef?.current,
83
- clientId
84
- });
85
- if (showEmptyBlockSideInserter) {
86
- return null;
87
- }
88
- if (shouldShowBreadcrumb || shouldShowContextualToolbar) {
89
- return (0, _react.createElement)(_blockPopover.default, {
90
- clientId: capturingClientId || clientId,
91
- bottomClientId: lastClientId,
92
- className: (0, _classnames.default)('block-editor-block-list__block-popover', {
93
- 'is-insertion-point-visible': isInsertionPointVisible
94
- }),
95
- resize: false,
96
- ...popoverProps
97
- }, shouldShowContextualToolbar && (0, _react.createElement)(_blockContextualToolbar.default
98
- // If the toolbar is being shown because of being forced
99
- // it should focus the toolbar right after the mount.
100
- , {
101
- focusOnMount: isToolbarForced.current,
102
- __experimentalInitialIndex: initialToolbarItemIndexRef.current,
103
- __experimentalOnIndexChange: index => {
104
- initialToolbarItemIndexRef.current = index;
105
- }
106
- }), shouldShowBreadcrumb && (0, _react.createElement)(_blockSelectionButton.default, {
107
- clientId: clientId,
108
- rootClientId: rootClientId
109
- }));
110
- }
111
- return null;
112
- }
113
- //# sourceMappingURL=selected-block-tools.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_classnames","_interopRequireDefault","require","_element","_data","_keyboardShortcuts","_blockSelectionButton","_blockContextualToolbar","_store","_blockPopover","_useBlockToolbarPopoverProps","_useSelectedBlockToolProps","_useShouldContextualToolbarShow","SelectedBlockTools","clientId","showEmptyBlockSideInserter","__unstableContentRef","capturingClientId","isInsertionPointVisible","lastClientId","rootClientId","useSelectedBlockToolProps","shouldShowBreadcrumb","useSelect","select","hasMultiSelection","__unstableGetEditorMode","blockEditorStore","editorMode","isToolbarForced","useRef","shouldShowContextualToolbar","canFocusHiddenToolbar","useShouldContextualToolbarShow","stopTyping","useDispatch","useShortcut","current","isDisabled","useEffect","initialToolbarItemIndexRef","undefined","popoverProps","useBlockToolbarPopoverProps","contentElement","_react","createElement","default","bottomClientId","className","classnames","resize","focusOnMount","__experimentalInitialIndex","__experimentalOnIndexChange","index"],"sources":["@wordpress/block-editor/src/components/block-tools/selected-block-tools.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useRef, useEffect } from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useShortcut } from '@wordpress/keyboard-shortcuts';\n\n/**\n * Internal dependencies\n */\nimport BlockSelectionButton from './block-selection-button';\nimport BlockContextualToolbar from './block-contextual-toolbar';\nimport { store as blockEditorStore } from '../../store';\nimport BlockPopover from '../block-popover';\nimport useBlockToolbarPopoverProps from './use-block-toolbar-popover-props';\nimport useSelectedBlockToolProps from './use-selected-block-tool-props';\nimport { useShouldContextualToolbarShow } from '../../utils/use-should-contextual-toolbar-show';\n\nexport default function SelectedBlockTools( {\n\tclientId,\n\tshowEmptyBlockSideInserter,\n\t__unstableContentRef,\n} ) {\n\tconst {\n\t\tcapturingClientId,\n\t\tisInsertionPointVisible,\n\t\tlastClientId,\n\t\trootClientId,\n\t} = useSelectedBlockToolProps( clientId );\n\n\tconst { shouldShowBreadcrumb } = useSelect( ( select ) => {\n\t\tconst { hasMultiSelection, __unstableGetEditorMode } =\n\t\t\tselect( blockEditorStore );\n\n\t\tconst editorMode = __unstableGetEditorMode();\n\n\t\treturn {\n\t\t\tshouldShowBreadcrumb:\n\t\t\t\t! hasMultiSelection() &&\n\t\t\t\t( editorMode === 'navigation' || editorMode === 'zoom-out' ),\n\t\t};\n\t}, [] );\n\n\tconst isToolbarForced = useRef( false );\n\tconst { shouldShowContextualToolbar, canFocusHiddenToolbar } =\n\t\tuseShouldContextualToolbarShow();\n\n\tconst { stopTyping } = useDispatch( blockEditorStore );\n\n\tuseShortcut(\n\t\t'core/block-editor/focus-toolbar',\n\t\t() => {\n\t\t\tisToolbarForced.current = true;\n\t\t\tstopTyping( true );\n\t\t},\n\t\t{\n\t\t\tisDisabled: ! canFocusHiddenToolbar,\n\t\t}\n\t);\n\n\tuseEffect( () => {\n\t\tisToolbarForced.current = false;\n\t} );\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 popoverProps = useBlockToolbarPopoverProps( {\n\t\tcontentElement: __unstableContentRef?.current,\n\t\tclientId,\n\t} );\n\n\tif ( showEmptyBlockSideInserter ) {\n\t\treturn null;\n\t}\n\n\tif ( shouldShowBreadcrumb || shouldShowContextualToolbar ) {\n\t\treturn (\n\t\t\t<BlockPopover\n\t\t\t\tclientId={ capturingClientId || clientId }\n\t\t\t\tbottomClientId={ lastClientId }\n\t\t\t\tclassName={ classnames(\n\t\t\t\t\t'block-editor-block-list__block-popover',\n\t\t\t\t\t{\n\t\t\t\t\t\t'is-insertion-point-visible': isInsertionPointVisible,\n\t\t\t\t\t}\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{ shouldShowContextualToolbar && (\n\t\t\t\t\t<BlockContextualToolbar\n\t\t\t\t\t\t// If the toolbar is being shown because of being forced\n\t\t\t\t\t\t// it should focus the toolbar right after the mount.\n\t\t\t\t\t\tfocusOnMount={ isToolbarForced.current }\n\t\t\t\t\t\t__experimentalInitialIndex={\n\t\t\t\t\t\t\tinitialToolbarItemIndexRef.current\n\t\t\t\t\t\t}\n\t\t\t\t\t\t__experimentalOnIndexChange={ ( index ) => {\n\t\t\t\t\t\t\tinitialToolbarItemIndexRef.current = index;\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t{ shouldShowBreadcrumb && (\n\t\t\t\t\t<BlockSelectionButton\n\t\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\t\trootClientId={ rootClientId }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</BlockPopover>\n\t\t);\n\t}\n\n\treturn null;\n}\n"],"mappings":"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"}
@@ -1,22 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = useDebouncedInput;
7
- var _element = require("@wordpress/element");
8
- var _compose = require("@wordpress/compose");
9
- /**
10
- * WordPress dependencies
11
- */
12
-
13
- function useDebouncedInput(defaultValue = '') {
14
- const [input, setInput] = (0, _element.useState)(defaultValue);
15
- const [debouncedInput, setDebouncedState] = (0, _element.useState)(defaultValue);
16
- const setDebouncedInput = (0, _compose.useDebounce)(setDebouncedState, 250);
17
- (0, _element.useEffect)(() => {
18
- setDebouncedInput(input);
19
- }, [input]);
20
- return [input, setInput, debouncedInput];
21
- }
22
- //# sourceMappingURL=use-debounced-input.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_element","require","_compose","useDebouncedInput","defaultValue","input","setInput","useState","debouncedInput","setDebouncedState","setDebouncedInput","useDebounce","useEffect"],"sources":["@wordpress/block-editor/src/components/inserter/hooks/use-debounced-input.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useEffect, useState } from '@wordpress/element';\nimport { useDebounce } from '@wordpress/compose';\n\nexport default function useDebouncedInput( defaultValue = '' ) {\n\tconst [ input, setInput ] = useState( defaultValue );\n\tconst [ debouncedInput, setDebouncedState ] = useState( defaultValue );\n\n\tconst setDebouncedInput = useDebounce( setDebouncedState, 250 );\n\n\tuseEffect( () => {\n\t\tsetDebouncedInput( input );\n\t}, [ input ] );\n\n\treturn [ input, setInput, debouncedInput ];\n}\n"],"mappings":";;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AAJA;AACA;AACA;;AAIe,SAASE,iBAAiBA,CAAEC,YAAY,GAAG,EAAE,EAAG;EAC9D,MAAM,CAAEC,KAAK,EAAEC,QAAQ,CAAE,GAAG,IAAAC,iBAAQ,EAAEH,YAAa,CAAC;EACpD,MAAM,CAAEI,cAAc,EAAEC,iBAAiB,CAAE,GAAG,IAAAF,iBAAQ,EAAEH,YAAa,CAAC;EAEtE,MAAMM,iBAAiB,GAAG,IAAAC,oBAAW,EAAEF,iBAAiB,EAAE,GAAI,CAAC;EAE/D,IAAAG,kBAAS,EAAE,MAAM;IAChBF,iBAAiB,CAAEL,KAAM,CAAC;EAC3B,CAAC,EAAE,CAAEA,KAAK,CAAG,CAAC;EAEd,OAAO,CAAEA,KAAK,EAAEC,QAAQ,EAAEE,cAAc,CAAE;AAC3C"}
@@ -1,39 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = useDisplayBlockControls;
7
- var _data = require("@wordpress/data");
8
- var _context = require("../block-edit/context");
9
- var _store = require("../../store");
10
- /**
11
- * WordPress dependencies
12
- */
13
-
14
- /**
15
- * Internal dependencies
16
- */
17
-
18
- function useDisplayBlockControls() {
19
- const {
20
- isSelected,
21
- clientId,
22
- name
23
- } = (0, _context.useBlockEditContext)();
24
- return (0, _data.useSelect)(select => {
25
- if (isSelected) {
26
- return true;
27
- }
28
- const {
29
- getBlockName,
30
- isFirstMultiSelectedBlock,
31
- getMultiSelectedBlockClientIds
32
- } = select(_store.store);
33
- if (isFirstMultiSelectedBlock(clientId)) {
34
- return getMultiSelectedBlockClientIds().every(id => getBlockName(id) === name);
35
- }
36
- return false;
37
- }, [clientId, isSelected, name]);
38
- }
39
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_data","require","_context","_store","useDisplayBlockControls","isSelected","clientId","name","useBlockEditContext","useSelect","select","getBlockName","isFirstMultiSelectedBlock","getMultiSelectedBlockClientIds","blockEditorStore","every","id"],"sources":["@wordpress/block-editor/src/components/use-display-block-controls/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { useBlockEditContext } from '../block-edit/context';\nimport { store as blockEditorStore } from '../../store';\n\nexport default function useDisplayBlockControls() {\n\tconst { isSelected, clientId, name } = useBlockEditContext();\n\treturn useSelect(\n\t\t( select ) => {\n\t\t\tif ( isSelected ) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tconst {\n\t\t\t\tgetBlockName,\n\t\t\t\tisFirstMultiSelectedBlock,\n\t\t\t\tgetMultiSelectedBlockClientIds,\n\t\t\t} = select( blockEditorStore );\n\n\t\t\tif ( isFirstMultiSelectedBlock( clientId ) ) {\n\t\t\t\treturn getMultiSelectedBlockClientIds().every(\n\t\t\t\t\t( id ) => getBlockName( id ) === name\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn false;\n\t\t},\n\t\t[ clientId, isSelected, name ]\n\t);\n}\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AATA;AACA;AACA;;AAGA;AACA;AACA;;AAIe,SAASG,uBAAuBA,CAAA,EAAG;EACjD,MAAM;IAAEC,UAAU;IAAEC,QAAQ;IAAEC;EAAK,CAAC,GAAG,IAAAC,4BAAmB,EAAC,CAAC;EAC5D,OAAO,IAAAC,eAAS,EACbC,MAAM,IAAM;IACb,IAAKL,UAAU,EAAG;MACjB,OAAO,IAAI;IACZ;IAEA,MAAM;MACLM,YAAY;MACZC,yBAAyB;MACzBC;IACD,CAAC,GAAGH,MAAM,CAAEI,YAAiB,CAAC;IAE9B,IAAKF,yBAAyB,CAAEN,QAAS,CAAC,EAAG;MAC5C,OAAOO,8BAA8B,CAAC,CAAC,CAACE,KAAK,CAC1CC,EAAE,IAAML,YAAY,CAAEK,EAAG,CAAC,KAAKT,IAClC,CAAC;IACF;IAEA,OAAO,KAAK;EACb,CAAC,EACD,CAAED,QAAQ,EAAED,UAAU,EAAEE,IAAI,CAC7B,CAAC;AACF"}
@@ -1,39 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = useDisplayBlockControls;
7
- var _data = require("@wordpress/data");
8
- var _blocks = require("@wordpress/blocks");
9
- var _context = require("../block-edit/context");
10
- var _store = require("../../store");
11
- /**
12
- * WordPress dependencies
13
- */
14
-
15
- /**
16
- * Internal dependencies
17
- */
18
-
19
- function useDisplayBlockControls() {
20
- const {
21
- isSelected,
22
- clientId,
23
- name
24
- } = (0, _context.useBlockEditContext)();
25
- return (0, _data.useSelect)(select => {
26
- const {
27
- getBlockName,
28
- getBlockRootClientId
29
- } = select(_store.store);
30
- const parentId = getBlockRootClientId(clientId);
31
- const parentBlockName = getBlockName(parentId);
32
- const hideControls = (0, _blocks.hasBlockSupport)(parentBlockName, '__experimentalHideChildBlockControls', false);
33
- if (!hideControls && isSelected) {
34
- return true;
35
- }
36
- return false;
37
- }, [clientId, isSelected, name]);
38
- }
39
- //# sourceMappingURL=index.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_data","require","_blocks","_context","_store","useDisplayBlockControls","isSelected","clientId","name","useBlockEditContext","useSelect","select","getBlockName","getBlockRootClientId","blockEditorStore","parentId","parentBlockName","hideControls","hasBlockSupport"],"sources":["@wordpress/block-editor/src/components/use-display-block-controls/index.native.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { hasBlockSupport } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport { useBlockEditContext } from '../block-edit/context';\nimport { store as blockEditorStore } from '../../store';\n\nexport default function useDisplayBlockControls() {\n\tconst { isSelected, clientId, name } = useBlockEditContext();\n\treturn useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockName, getBlockRootClientId } =\n\t\t\t\tselect( blockEditorStore );\n\n\t\t\tconst parentId = getBlockRootClientId( clientId );\n\t\t\tconst parentBlockName = getBlockName( parentId );\n\n\t\t\tconst hideControls = hasBlockSupport(\n\t\t\t\tparentBlockName,\n\t\t\t\t'__experimentalHideChildBlockControls',\n\t\t\t\tfalse\n\t\t\t);\n\n\t\t\tif ( ! hideControls && isSelected ) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\treturn false;\n\t\t},\n\t\t[ clientId, isSelected, name ]\n\t);\n}\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AAKA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAVA;AACA;AACA;;AAIA;AACA;AACA;;AAIe,SAASI,uBAAuBA,CAAA,EAAG;EACjD,MAAM;IAAEC,UAAU;IAAEC,QAAQ;IAAEC;EAAK,CAAC,GAAG,IAAAC,4BAAmB,EAAC,CAAC;EAC5D,OAAO,IAAAC,eAAS,EACbC,MAAM,IAAM;IACb,MAAM;MAAEC,YAAY;MAAEC;IAAqB,CAAC,GAC3CF,MAAM,CAAEG,YAAiB,CAAC;IAE3B,MAAMC,QAAQ,GAAGF,oBAAoB,CAAEN,QAAS,CAAC;IACjD,MAAMS,eAAe,GAAGJ,YAAY,CAAEG,QAAS,CAAC;IAEhD,MAAME,YAAY,GAAG,IAAAC,uBAAe,EACnCF,eAAe,EACf,sCAAsC,EACtC,KACD,CAAC;IAED,IAAK,CAAEC,YAAY,IAAIX,UAAU,EAAG;MACnC,OAAO,IAAI;IACZ;IAEA,OAAO,KAAK;EACb,CAAC,EACD,CAAEC,QAAQ,EAAED,UAAU,EAAEE,IAAI,CAC7B,CAAC;AACF"}