@wordpress/block-editor 14.3.3 → 14.4.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 (418) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/README.md +46 -0
  3. package/build/autocompleters/link.js +2 -1
  4. package/build/autocompleters/link.js.map +1 -1
  5. package/build/components/block-actions/index.js +1 -13
  6. package/build/components/block-actions/index.js.map +1 -1
  7. package/build/components/block-inspector/index.js +56 -75
  8. package/build/components/block-inspector/index.js.map +1 -1
  9. package/build/components/block-list/block.js +5 -19
  10. package/build/components/block-list/block.js.map +1 -1
  11. package/build/components/block-list/index.js +5 -8
  12. package/build/components/block-list/index.js.map +1 -1
  13. package/build/components/block-list/use-block-props/index.js +3 -11
  14. package/build/components/block-list/use-block-props/index.js.map +1 -1
  15. package/build/components/block-list/use-block-props/use-zoom-out-mode-exit.js +9 -12
  16. package/build/components/block-list/use-block-props/use-zoom-out-mode-exit.js.map +1 -1
  17. package/build/components/block-list/use-in-between-inserter.js +5 -3
  18. package/build/components/block-list/use-in-between-inserter.js.map +1 -1
  19. package/build/components/block-list/zoom-out-separator.js +14 -6
  20. package/build/components/block-list/zoom-out-separator.js.map +1 -1
  21. package/build/components/block-navigation/dropdown.js +2 -4
  22. package/build/components/block-navigation/dropdown.js.map +1 -1
  23. package/build/components/block-parent-selector/index.js +13 -10
  24. package/build/components/block-parent-selector/index.js.map +1 -1
  25. package/build/components/block-pattern-setup/setup-toolbar.js +10 -20
  26. package/build/components/block-pattern-setup/setup-toolbar.js.map +1 -1
  27. package/build/components/block-patterns-paging/index.js +11 -13
  28. package/build/components/block-patterns-paging/index.js.map +1 -1
  29. package/build/components/block-quick-navigation/index.js +2 -4
  30. package/build/components/block-quick-navigation/index.js.map +1 -1
  31. package/build/components/block-settings-menu/block-settings-dropdown.js +79 -76
  32. package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  33. package/build/components/block-settings-menu-controls/index.js +1 -6
  34. package/build/components/block-settings-menu-controls/index.js.map +1 -1
  35. package/build/components/block-switcher/index.js +17 -14
  36. package/build/components/block-switcher/index.js.map +1 -1
  37. package/build/components/block-toolbar/index.js +16 -19
  38. package/build/components/block-toolbar/index.js.map +1 -1
  39. package/build/components/block-toolbar/use-has-block-toolbar.js +3 -5
  40. package/build/components/block-toolbar/use-has-block-toolbar.js.map +1 -1
  41. package/build/components/block-tools/index.js +8 -11
  42. package/build/components/block-tools/index.js.map +1 -1
  43. package/build/components/block-tools/insertion-point.js +1 -4
  44. package/build/components/block-tools/insertion-point.js.map +1 -1
  45. package/build/components/block-tools/use-show-block-tools.js +2 -5
  46. package/build/components/block-tools/use-show-block-tools.js.map +1 -1
  47. package/build/components/block-tools/zoom-out-mode-inserter-button.js +1 -12
  48. package/build/components/block-tools/zoom-out-mode-inserter-button.js.map +1 -1
  49. package/build/components/block-tools/zoom-out-mode-inserters.js +14 -17
  50. package/build/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
  51. package/build/components/block-tools/zoom-out-toolbar.js +2 -12
  52. package/build/components/block-tools/zoom-out-toolbar.js.map +1 -1
  53. package/build/components/block-variation-picker/index.js +2 -4
  54. package/build/components/block-variation-picker/index.js.map +1 -1
  55. package/build/components/block-variation-transforms/index.js +3 -4
  56. package/build/components/block-variation-transforms/index.js.map +1 -1
  57. package/build/components/button-block-appender/index.js +2 -4
  58. package/build/components/button-block-appender/index.js.map +1 -1
  59. package/build/components/colors-gradients/dropdown.js +2 -4
  60. package/build/components/colors-gradients/dropdown.js.map +1 -1
  61. package/build/components/global-styles/border-panel.js +1 -1
  62. package/build/components/global-styles/border-panel.js.map +1 -1
  63. package/build/components/global-styles/color-panel.js +2 -4
  64. package/build/components/global-styles/color-panel.js.map +1 -1
  65. package/build/components/global-styles/dimensions-panel.js +3 -3
  66. package/build/components/global-styles/dimensions-panel.js.map +1 -1
  67. package/build/components/global-styles/filters-panel.js +2 -4
  68. package/build/components/global-styles/filters-panel.js.map +1 -1
  69. package/build/components/global-styles/shadow-panel-components.js +24 -29
  70. package/build/components/global-styles/shadow-panel-components.js.map +1 -1
  71. package/build/components/inner-blocks/index.js +1 -9
  72. package/build/components/inner-blocks/index.js.map +1 -1
  73. package/build/components/inserter/block-types-tab.js +1 -1
  74. package/build/components/inserter/block-types-tab.js.map +1 -1
  75. package/build/components/inserter/hooks/use-block-types-state.js +24 -5
  76. package/build/components/inserter/hooks/use-block-types-state.js.map +1 -1
  77. package/build/components/inserter/hooks/use-insertion-point.js +22 -12
  78. package/build/components/inserter/hooks/use-insertion-point.js.map +1 -1
  79. package/build/components/inserter/hooks/use-patterns-state.js +23 -10
  80. package/build/components/inserter/hooks/use-patterns-state.js.map +1 -1
  81. package/build/components/inserter/media-tab/media-preview.js +35 -13
  82. package/build/components/inserter/media-tab/media-preview.js.map +1 -1
  83. package/build/components/inserter/menu.js +2 -2
  84. package/build/components/inserter/menu.js.map +1 -1
  85. package/build/components/inserter/mobile-tab-navigation.js +5 -5
  86. package/build/components/inserter/mobile-tab-navigation.js.map +1 -1
  87. package/build/components/inserter/quick-inserter.js +4 -4
  88. package/build/components/inserter/quick-inserter.js.map +1 -1
  89. package/build/components/inspector-controls-tabs/index.js +11 -8
  90. package/build/components/inspector-controls-tabs/index.js.map +1 -1
  91. package/build/components/inspector-popover-header/index.js +4 -8
  92. package/build/components/inspector-popover-header/index.js.map +1 -1
  93. package/build/components/link-control/index.js +5 -10
  94. package/build/components/link-control/index.js.map +1 -1
  95. package/build/components/link-control/settings-drawer.js +2 -4
  96. package/build/components/link-control/settings-drawer.js.map +1 -1
  97. package/build/components/list-view/block-contents.js +1 -25
  98. package/build/components/list-view/block-contents.js.map +1 -1
  99. package/build/components/list-view/block-select-button.js +1 -4
  100. package/build/components/list-view/block-select-button.js.map +1 -1
  101. package/build/components/media-placeholder/index.js +29 -43
  102. package/build/components/media-placeholder/index.js.map +1 -1
  103. package/build/components/rich-text/index.js +4 -8
  104. package/build/components/rich-text/index.js.map +1 -1
  105. package/build/components/skip-to-selected-block/index.js +2 -4
  106. package/build/components/skip-to-selected-block/index.js.map +1 -1
  107. package/build/components/tool-selector/index.js +13 -12
  108. package/build/components/tool-selector/index.js.map +1 -1
  109. package/build/components/url-input/button.js +14 -16
  110. package/build/components/url-input/button.js.map +1 -1
  111. package/build/components/url-input/index.js +2 -4
  112. package/build/components/url-input/index.js.map +1 -1
  113. package/build/components/use-block-commands/index.js +0 -61
  114. package/build/components/use-block-commands/index.js.map +1 -1
  115. package/build/components/writing-flow/use-tab-nav.js +2 -25
  116. package/build/components/writing-flow/use-tab-nav.js.map +1 -1
  117. package/build/hooks/block-bindings.js +6 -13
  118. package/build/hooks/block-bindings.js.map +1 -1
  119. package/build/hooks/duotone.js +4 -1
  120. package/build/hooks/duotone.js.map +1 -1
  121. package/build/hooks/layout-child.js +3 -1
  122. package/build/hooks/layout-child.js.map +1 -1
  123. package/build/hooks/position.js +3 -2
  124. package/build/hooks/position.js.map +1 -1
  125. package/build/hooks/use-bindings-attributes.js +5 -4
  126. package/build/hooks/use-bindings-attributes.js.map +1 -1
  127. package/build/layouts/flex.js +6 -38
  128. package/build/layouts/flex.js.map +1 -1
  129. package/build/private-apis.js +0 -2
  130. package/build/private-apis.js.map +1 -1
  131. package/build/store/actions.js +13 -14
  132. package/build/store/actions.js.map +1 -1
  133. package/build/store/private-actions.js +15 -0
  134. package/build/store/private-actions.js.map +1 -1
  135. package/build/store/private-selectors.js +104 -7
  136. package/build/store/private-selectors.js.map +1 -1
  137. package/build/store/reducer.js +22 -26
  138. package/build/store/reducer.js.map +1 -1
  139. package/build/store/selectors.js +127 -56
  140. package/build/store/selectors.js.map +1 -1
  141. package/build/store/utils.js +4 -3
  142. package/build/store/utils.js.map +1 -1
  143. package/build/utils/block-bindings.js +50 -0
  144. package/build/utils/block-bindings.js.map +1 -1
  145. package/build/utils/index.js +7 -0
  146. package/build/utils/index.js.map +1 -1
  147. package/build-module/autocompleters/link.js +2 -1
  148. package/build-module/autocompleters/link.js.map +1 -1
  149. package/build-module/components/block-actions/index.js +1 -13
  150. package/build-module/components/block-actions/index.js.map +1 -1
  151. package/build-module/components/block-inspector/index.js +57 -76
  152. package/build-module/components/block-inspector/index.js.map +1 -1
  153. package/build-module/components/block-list/block.js +5 -19
  154. package/build-module/components/block-list/block.js.map +1 -1
  155. package/build-module/components/block-list/index.js +5 -8
  156. package/build-module/components/block-list/index.js.map +1 -1
  157. package/build-module/components/block-list/use-block-props/index.js +3 -11
  158. package/build-module/components/block-list/use-block-props/index.js.map +1 -1
  159. package/build-module/components/block-list/use-block-props/use-zoom-out-mode-exit.js +9 -12
  160. package/build-module/components/block-list/use-block-props/use-zoom-out-mode-exit.js.map +1 -1
  161. package/build-module/components/block-list/use-in-between-inserter.js +5 -3
  162. package/build-module/components/block-list/use-in-between-inserter.js.map +1 -1
  163. package/build-module/components/block-list/zoom-out-separator.js +14 -6
  164. package/build-module/components/block-list/zoom-out-separator.js.map +1 -1
  165. package/build-module/components/block-navigation/dropdown.js +2 -4
  166. package/build-module/components/block-navigation/dropdown.js.map +1 -1
  167. package/build-module/components/block-parent-selector/index.js +13 -10
  168. package/build-module/components/block-parent-selector/index.js.map +1 -1
  169. package/build-module/components/block-pattern-setup/setup-toolbar.js +10 -20
  170. package/build-module/components/block-pattern-setup/setup-toolbar.js.map +1 -1
  171. package/build-module/components/block-patterns-paging/index.js +11 -13
  172. package/build-module/components/block-patterns-paging/index.js.map +1 -1
  173. package/build-module/components/block-quick-navigation/index.js +2 -4
  174. package/build-module/components/block-quick-navigation/index.js.map +1 -1
  175. package/build-module/components/block-settings-menu/block-settings-dropdown.js +79 -76
  176. package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  177. package/build-module/components/block-settings-menu-controls/index.js +2 -7
  178. package/build-module/components/block-settings-menu-controls/index.js.map +1 -1
  179. package/build-module/components/block-switcher/index.js +17 -14
  180. package/build-module/components/block-switcher/index.js.map +1 -1
  181. package/build-module/components/block-toolbar/index.js +17 -20
  182. package/build-module/components/block-toolbar/index.js.map +1 -1
  183. package/build-module/components/block-toolbar/use-has-block-toolbar.js +3 -5
  184. package/build-module/components/block-toolbar/use-has-block-toolbar.js.map +1 -1
  185. package/build-module/components/block-tools/index.js +8 -11
  186. package/build-module/components/block-tools/index.js.map +1 -1
  187. package/build-module/components/block-tools/insertion-point.js +1 -4
  188. package/build-module/components/block-tools/insertion-point.js.map +1 -1
  189. package/build-module/components/block-tools/use-show-block-tools.js +2 -5
  190. package/build-module/components/block-tools/use-show-block-tools.js.map +1 -1
  191. package/build-module/components/block-tools/zoom-out-mode-inserter-button.js +1 -12
  192. package/build-module/components/block-tools/zoom-out-mode-inserter-button.js.map +1 -1
  193. package/build-module/components/block-tools/zoom-out-mode-inserters.js +14 -17
  194. package/build-module/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
  195. package/build-module/components/block-tools/zoom-out-toolbar.js +2 -12
  196. package/build-module/components/block-tools/zoom-out-toolbar.js.map +1 -1
  197. package/build-module/components/block-variation-picker/index.js +2 -4
  198. package/build-module/components/block-variation-picker/index.js.map +1 -1
  199. package/build-module/components/block-variation-transforms/index.js +3 -4
  200. package/build-module/components/block-variation-transforms/index.js.map +1 -1
  201. package/build-module/components/button-block-appender/index.js +2 -4
  202. package/build-module/components/button-block-appender/index.js.map +1 -1
  203. package/build-module/components/colors-gradients/dropdown.js +2 -4
  204. package/build-module/components/colors-gradients/dropdown.js.map +1 -1
  205. package/build-module/components/global-styles/border-panel.js +1 -1
  206. package/build-module/components/global-styles/border-panel.js.map +1 -1
  207. package/build-module/components/global-styles/color-panel.js +2 -4
  208. package/build-module/components/global-styles/color-panel.js.map +1 -1
  209. package/build-module/components/global-styles/dimensions-panel.js +1 -1
  210. package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
  211. package/build-module/components/global-styles/filters-panel.js +2 -4
  212. package/build-module/components/global-styles/filters-panel.js.map +1 -1
  213. package/build-module/components/global-styles/shadow-panel-components.js +25 -30
  214. package/build-module/components/global-styles/shadow-panel-components.js.map +1 -1
  215. package/build-module/components/inner-blocks/index.js +1 -9
  216. package/build-module/components/inner-blocks/index.js.map +1 -1
  217. package/build-module/components/inserter/block-types-tab.js +1 -1
  218. package/build-module/components/inserter/block-types-tab.js.map +1 -1
  219. package/build-module/components/inserter/hooks/use-block-types-state.js +27 -8
  220. package/build-module/components/inserter/hooks/use-block-types-state.js.map +1 -1
  221. package/build-module/components/inserter/hooks/use-insertion-point.js +22 -12
  222. package/build-module/components/inserter/hooks/use-insertion-point.js.map +1 -1
  223. package/build-module/components/inserter/hooks/use-patterns-state.js +23 -10
  224. package/build-module/components/inserter/hooks/use-patterns-state.js.map +1 -1
  225. package/build-module/components/inserter/media-tab/media-preview.js +35 -13
  226. package/build-module/components/inserter/media-tab/media-preview.js.map +1 -1
  227. package/build-module/components/inserter/menu.js +2 -2
  228. package/build-module/components/inserter/menu.js.map +1 -1
  229. package/build-module/components/inserter/mobile-tab-navigation.js +6 -6
  230. package/build-module/components/inserter/mobile-tab-navigation.js.map +1 -1
  231. package/build-module/components/inserter/quick-inserter.js +4 -4
  232. package/build-module/components/inserter/quick-inserter.js.map +1 -1
  233. package/build-module/components/inspector-controls-tabs/index.js +12 -9
  234. package/build-module/components/inspector-controls-tabs/index.js.map +1 -1
  235. package/build-module/components/inspector-popover-header/index.js +4 -8
  236. package/build-module/components/inspector-popover-header/index.js.map +1 -1
  237. package/build-module/components/link-control/index.js +5 -10
  238. package/build-module/components/link-control/index.js.map +1 -1
  239. package/build-module/components/link-control/settings-drawer.js +2 -4
  240. package/build-module/components/link-control/settings-drawer.js.map +1 -1
  241. package/build-module/components/list-view/block-contents.js +1 -25
  242. package/build-module/components/list-view/block-contents.js.map +1 -1
  243. package/build-module/components/list-view/block-select-button.js +2 -5
  244. package/build-module/components/list-view/block-select-button.js.map +1 -1
  245. package/build-module/components/media-placeholder/index.js +30 -44
  246. package/build-module/components/media-placeholder/index.js.map +1 -1
  247. package/build-module/components/rich-text/index.js +4 -8
  248. package/build-module/components/rich-text/index.js.map +1 -1
  249. package/build-module/components/skip-to-selected-block/index.js +2 -4
  250. package/build-module/components/skip-to-selected-block/index.js.map +1 -1
  251. package/build-module/components/tool-selector/index.js +13 -12
  252. package/build-module/components/tool-selector/index.js.map +1 -1
  253. package/build-module/components/url-input/button.js +15 -17
  254. package/build-module/components/url-input/button.js.map +1 -1
  255. package/build-module/components/url-input/index.js +2 -4
  256. package/build-module/components/url-input/index.js.map +1 -1
  257. package/build-module/components/use-block-commands/index.js +1 -62
  258. package/build-module/components/use-block-commands/index.js.map +1 -1
  259. package/build-module/components/writing-flow/use-tab-nav.js +3 -26
  260. package/build-module/components/writing-flow/use-tab-nav.js.map +1 -1
  261. package/build-module/hooks/block-bindings.js +6 -13
  262. package/build-module/hooks/block-bindings.js.map +1 -1
  263. package/build-module/hooks/duotone.js +4 -1
  264. package/build-module/hooks/duotone.js.map +1 -1
  265. package/build-module/hooks/layout-child.js +4 -1
  266. package/build-module/hooks/layout-child.js.map +1 -1
  267. package/build-module/hooks/position.js +4 -1
  268. package/build-module/hooks/position.js.map +1 -1
  269. package/build-module/hooks/use-bindings-attributes.js +5 -4
  270. package/build-module/hooks/use-bindings-attributes.js.map +1 -1
  271. package/build-module/layouts/flex.js +7 -39
  272. package/build-module/layouts/flex.js.map +1 -1
  273. package/build-module/private-apis.js +0 -2
  274. package/build-module/private-apis.js.map +1 -1
  275. package/build-module/store/actions.js +12 -12
  276. package/build-module/store/actions.js.map +1 -1
  277. package/build-module/store/private-actions.js +14 -0
  278. package/build-module/store/private-actions.js.map +1 -1
  279. package/build-module/store/private-selectors.js +98 -7
  280. package/build-module/store/private-selectors.js.map +1 -1
  281. package/build-module/store/reducer.js +21 -25
  282. package/build-module/store/reducer.js.map +1 -1
  283. package/build-module/store/selectors.js +129 -58
  284. package/build-module/store/selectors.js.map +1 -1
  285. package/build-module/store/utils.js +3 -2
  286. package/build-module/store/utils.js.map +1 -1
  287. package/build-module/utils/block-bindings.js +50 -0
  288. package/build-module/utils/block-bindings.js.map +1 -1
  289. package/build-module/utils/index.js +1 -0
  290. package/build-module/utils/index.js.map +1 -1
  291. package/build-style/content-rtl.css +16 -70
  292. package/build-style/content.css +16 -70
  293. package/build-style/default-editor-styles-rtl.css +10 -1
  294. package/build-style/default-editor-styles.css +10 -1
  295. package/build-style/style-rtl.css +51 -149
  296. package/build-style/style.css +51 -149
  297. package/package.json +32 -32
  298. package/src/autocompleters/link.js +2 -1
  299. package/src/components/block-actions/index.js +1 -13
  300. package/src/components/block-draggable/style.scss +2 -2
  301. package/src/components/block-inspector/index.js +79 -95
  302. package/src/components/block-inspector/style.scss +2 -0
  303. package/src/components/block-list/block.js +7 -28
  304. package/src/components/block-list/content.scss +1 -61
  305. package/src/components/block-list/index.js +21 -29
  306. package/src/components/block-list/use-block-props/index.js +3 -10
  307. package/src/components/block-list/use-block-props/use-zoom-out-mode-exit.js +19 -11
  308. package/src/components/block-list/use-in-between-inserter.js +5 -2
  309. package/src/components/block-list/zoom-out-separator.js +24 -8
  310. package/src/components/block-navigation/dropdown.js +1 -2
  311. package/src/components/block-parent-selector/index.js +13 -10
  312. package/src/components/block-pattern-setup/setup-toolbar.js +5 -10
  313. package/src/components/block-patterns-paging/index.js +8 -7
  314. package/src/components/block-patterns-paging/style.scss +10 -27
  315. package/src/components/block-quick-navigation/index.js +1 -2
  316. package/src/components/block-settings-menu/block-settings-dropdown.js +120 -106
  317. package/src/components/block-settings-menu-controls/index.js +0 -15
  318. package/src/components/block-switcher/index.js +37 -30
  319. package/src/components/block-toolbar/index.js +22 -34
  320. package/src/components/block-toolbar/style.scss +10 -1
  321. package/src/components/block-toolbar/use-has-block-toolbar.js +19 -31
  322. package/src/components/block-tools/index.js +7 -16
  323. package/src/components/block-tools/insertion-point.js +1 -4
  324. package/src/components/block-tools/style.scss +3 -88
  325. package/src/components/block-tools/use-show-block-tools.js +2 -12
  326. package/src/components/block-tools/zoom-out-mode-inserter-button.js +2 -17
  327. package/src/components/block-tools/zoom-out-mode-inserters.js +11 -19
  328. package/src/components/block-tools/zoom-out-toolbar.js +2 -13
  329. package/src/components/block-variation-picker/index.js +1 -2
  330. package/src/components/block-variation-transforms/index.js +2 -2
  331. package/src/components/button-block-appender/content.scss +0 -5
  332. package/src/components/button-block-appender/index.js +1 -2
  333. package/src/components/colors-gradients/dropdown.js +1 -5
  334. package/src/components/font-family/README.md +5 -1
  335. package/src/components/global-styles/border-panel.js +1 -1
  336. package/src/components/global-styles/color-panel.js +1 -5
  337. package/src/components/global-styles/dimensions-panel.js +1 -1
  338. package/src/components/global-styles/filters-panel.js +1 -2
  339. package/src/components/global-styles/shadow-panel-components.js +28 -33
  340. package/src/components/global-styles/style.scss +5 -0
  341. package/src/components/inner-blocks/index.js +1 -16
  342. package/src/components/inserter/block-types-tab.js +1 -1
  343. package/src/components/inserter/hooks/use-block-types-state.js +34 -14
  344. package/src/components/inserter/hooks/use-insertion-point.js +35 -13
  345. package/src/components/inserter/hooks/use-patterns-state.js +46 -9
  346. package/src/components/inserter/media-tab/media-preview.js +38 -12
  347. package/src/components/inserter/menu.js +2 -2
  348. package/src/components/inserter/mobile-tab-navigation.js +10 -13
  349. package/src/components/inserter/quick-inserter.js +5 -4
  350. package/src/components/inserter/style.scss +0 -28
  351. package/src/components/inspector-controls-tabs/index.js +21 -20
  352. package/src/components/inspector-controls-tabs/style.scss +2 -6
  353. package/src/components/inspector-popover-header/index.js +2 -4
  354. package/src/components/inspector-popover-header/style.scss +0 -13
  355. package/src/components/link-control/index.js +2 -5
  356. package/src/components/link-control/settings-drawer.js +1 -2
  357. package/src/components/list-view/block-contents.js +1 -28
  358. package/src/components/list-view/block-select-button.js +2 -5
  359. package/src/components/list-view/style.scss +18 -14
  360. package/src/components/media-placeholder/content.scss +3 -19
  361. package/src/components/media-placeholder/index.js +23 -29
  362. package/src/components/rich-text/index.js +4 -13
  363. package/src/components/skip-to-selected-block/index.js +1 -2
  364. package/src/components/skip-to-selected-block/style.scss +0 -9
  365. package/src/components/tool-selector/index.js +14 -9
  366. package/src/components/tool-selector/style.scss +5 -0
  367. package/src/components/url-input/button.js +16 -12
  368. package/src/components/url-input/index.js +1 -2
  369. package/src/components/url-input/style.scss +0 -6
  370. package/src/components/use-block-commands/index.js +0 -58
  371. package/src/components/writing-flow/use-tab-nav.js +4 -36
  372. package/src/content.scss +0 -1
  373. package/src/hooks/block-bindings.js +9 -10
  374. package/src/hooks/duotone.js +4 -1
  375. package/src/hooks/layout-child.js +4 -1
  376. package/src/hooks/position.js +4 -1
  377. package/src/hooks/use-bindings-attributes.js +66 -63
  378. package/src/layouts/flex.js +10 -53
  379. package/src/private-apis.js +0 -2
  380. package/src/store/actions.js +14 -13
  381. package/src/store/private-actions.js +14 -0
  382. package/src/store/private-selectors.js +120 -16
  383. package/src/store/reducer.js +22 -28
  384. package/src/store/selectors.js +203 -114
  385. package/src/store/test/private-actions.js +15 -0
  386. package/src/store/test/private-selectors.js +34 -0
  387. package/src/store/test/reducer.js +40 -4
  388. package/src/store/test/selectors.js +183 -20
  389. package/src/store/utils.js +4 -2
  390. package/src/utils/block-bindings.js +49 -0
  391. package/src/utils/index.js +1 -0
  392. package/build/components/block-controls/use-has-block-controls.js +0 -43
  393. package/build/components/block-controls/use-has-block-controls.js.map +0 -1
  394. package/build/components/block-list/use-block-props/use-nav-mode-exit.js +0 -54
  395. package/build/components/block-list/use-block-props/use-nav-mode-exit.js.map +0 -1
  396. package/build/components/block-tools/block-selection-button.js +0 -259
  397. package/build/components/block-tools/block-selection-button.js.map +0 -1
  398. package/build/components/block-tools/block-toolbar-breadcrumb.js +0 -57
  399. package/build/components/block-tools/block-toolbar-breadcrumb.js.map +0 -1
  400. package/build/components/inserter/tabs.js +0 -78
  401. package/build/components/inserter/tabs.js.map +0 -1
  402. package/build-module/components/block-controls/use-has-block-controls.js +0 -34
  403. package/build-module/components/block-controls/use-has-block-controls.js.map +0 -1
  404. package/build-module/components/block-list/use-block-props/use-nav-mode-exit.js +0 -48
  405. package/build-module/components/block-list/use-block-props/use-nav-mode-exit.js.map +0 -1
  406. package/build-module/components/block-tools/block-selection-button.js +0 -254
  407. package/build-module/components/block-tools/block-selection-button.js.map +0 -1
  408. package/build-module/components/block-tools/block-toolbar-breadcrumb.js +0 -49
  409. package/build-module/components/block-tools/block-toolbar-breadcrumb.js.map +0 -1
  410. package/build-module/components/inserter/tabs.js +0 -72
  411. package/build-module/components/inserter/tabs.js.map +0 -1
  412. package/src/components/block-controls/use-has-block-controls.js +0 -35
  413. package/src/components/block-list/use-block-props/use-nav-mode-exit.js +0 -46
  414. package/src/components/block-tools/block-selection-button.js +0 -302
  415. package/src/components/block-tools/block-toolbar-breadcrumb.js +0 -51
  416. package/src/components/inner-blocks/content.scss +0 -13
  417. package/src/components/inserter/tabs.js +0 -78
  418. package/src/components/inserter/test/block-types-tab.native.js +0 -67
@@ -1 +1 @@
1
- {"version":3,"names":["_clsx","_interopRequireDefault","require","_element","_i18n","_components","_data","_searchResults","_useInsertionPoint","_usePatternsState","_useBlockTypesState","_store","_jsxRuntime","SEARCH_THRESHOLD","SHOWN_BLOCK_TYPES","SHOWN_BLOCK_PATTERNS","SHOWN_BLOCK_PATTERNS_WITH_PRIORITIZATION","QuickInserter","onSelect","rootClientId","clientId","isAppender","prioritizePatterns","selectBlockOnInsert","hasSearch","filterValue","setFilterValue","useState","destinationRootClientId","onInsertBlocks","useInsertionPoint","blockTypes","useBlockTypesState","patterns","usePatternsState","setInserterIsOpened","insertionIndex","useSelect","select","getSettings","getBlockIndex","getBlockCount","blockEditorStore","settings","index","blockCount","__experimentalSetIsInserterOpened","showPatterns","length","showSearch","useEffect","onBrowseAll","maxBlockPatterns","jsxs","className","clsx","children","jsx","SearchControl","__nextHasNoMarginBottom","value","onChange","label","__","placeholder","default","maxBlockTypes","isDraggable","isQuick","Button","__next40pxDefaultSize","onClick"],"sources":["@wordpress/block-editor/src/components/inserter/quick-inserter.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useState, useEffect } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { Button, SearchControl } from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport InserterSearchResults from './search-results';\nimport useInsertionPoint from './hooks/use-insertion-point';\nimport usePatternsState from './hooks/use-patterns-state';\nimport useBlockTypesState from './hooks/use-block-types-state';\nimport { store as blockEditorStore } from '../../store';\n\nconst SEARCH_THRESHOLD = 6;\nconst SHOWN_BLOCK_TYPES = 6;\nconst SHOWN_BLOCK_PATTERNS = 2;\nconst SHOWN_BLOCK_PATTERNS_WITH_PRIORITIZATION = 4;\n\nexport default function QuickInserter( {\n\tonSelect,\n\trootClientId,\n\tclientId,\n\tisAppender,\n\tprioritizePatterns,\n\tselectBlockOnInsert,\n\thasSearch = true,\n} ) {\n\tconst [ filterValue, setFilterValue ] = useState( '' );\n\tconst [ destinationRootClientId, onInsertBlocks ] = useInsertionPoint( {\n\t\tonSelect,\n\t\trootClientId,\n\t\tclientId,\n\t\tisAppender,\n\t\tselectBlockOnInsert,\n\t} );\n\tconst [ blockTypes ] = useBlockTypesState(\n\t\tdestinationRootClientId,\n\t\tonInsertBlocks,\n\t\ttrue\n\t);\n\n\tconst [ patterns ] = usePatternsState(\n\t\tonInsertBlocks,\n\t\tdestinationRootClientId\n\t);\n\n\tconst { setInserterIsOpened, insertionIndex } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getSettings, getBlockIndex, getBlockCount } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\tconst settings = getSettings();\n\t\t\tconst index = getBlockIndex( clientId );\n\t\t\tconst blockCount = getBlockCount();\n\n\t\t\treturn {\n\t\t\t\tsetInserterIsOpened: settings.__experimentalSetIsInserterOpened,\n\t\t\t\tinsertionIndex: index === -1 ? blockCount : index,\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\tconst showPatterns =\n\t\tpatterns.length && ( !! filterValue || prioritizePatterns );\n\tconst showSearch =\n\t\thasSearch &&\n\t\t( ( showPatterns && patterns.length > SEARCH_THRESHOLD ) ||\n\t\t\tblockTypes.length > SEARCH_THRESHOLD );\n\n\tuseEffect( () => {\n\t\tif ( setInserterIsOpened ) {\n\t\t\tsetInserterIsOpened( false );\n\t\t}\n\t}, [ setInserterIsOpened ] );\n\n\t// When clicking Browse All select the appropriate block so as\n\t// the insertion point can work as expected.\n\tconst onBrowseAll = () => {\n\t\tsetInserterIsOpened( {\n\t\t\trootClientId,\n\t\t\tinsertionIndex,\n\t\t\tfilterValue,\n\t\t\tonSelect,\n\t\t} );\n\t};\n\n\tlet maxBlockPatterns = 0;\n\tif ( showPatterns ) {\n\t\tmaxBlockPatterns = prioritizePatterns\n\t\t\t? SHOWN_BLOCK_PATTERNS_WITH_PRIORITIZATION\n\t\t\t: SHOWN_BLOCK_PATTERNS;\n\t}\n\n\treturn (\n\t\t<div\n\t\t\tclassName={ clsx( 'block-editor-inserter__quick-inserter', {\n\t\t\t\t'has-search': showSearch,\n\t\t\t\t'has-expand': setInserterIsOpened,\n\t\t\t} ) }\n\t\t>\n\t\t\t{ showSearch && (\n\t\t\t\t<SearchControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tclassName=\"block-editor-inserter__search\"\n\t\t\t\t\tvalue={ filterValue }\n\t\t\t\t\tonChange={ ( value ) => {\n\t\t\t\t\t\tsetFilterValue( value );\n\t\t\t\t\t} }\n\t\t\t\t\tlabel={ __( 'Search for blocks and patterns' ) }\n\t\t\t\t\tplaceholder={ __( 'Search' ) }\n\t\t\t\t/>\n\t\t\t) }\n\n\t\t\t<div className=\"block-editor-inserter__quick-inserter-results\">\n\t\t\t\t<InserterSearchResults\n\t\t\t\t\tfilterValue={ filterValue }\n\t\t\t\t\tonSelect={ onSelect }\n\t\t\t\t\trootClientId={ rootClientId }\n\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\tisAppender={ isAppender }\n\t\t\t\t\tmaxBlockPatterns={ maxBlockPatterns }\n\t\t\t\t\tmaxBlockTypes={ SHOWN_BLOCK_TYPES }\n\t\t\t\t\tisDraggable={ false }\n\t\t\t\t\tprioritizePatterns={ prioritizePatterns }\n\t\t\t\t\tselectBlockOnInsert={ selectBlockOnInsert }\n\t\t\t\t\tisQuick\n\t\t\t\t/>\n\t\t\t</div>\n\n\t\t\t{ setInserterIsOpened && (\n\t\t\t\t<Button\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\tclassName=\"block-editor-inserter__quick-inserter-expand\"\n\t\t\t\t\tonClick={ onBrowseAll }\n\t\t\t\t\taria-label={ __(\n\t\t\t\t\t\t'Browse all. This will open the main inserter panel in the editor toolbar.'\n\t\t\t\t\t) }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Browse all' ) }\n\t\t\t\t</Button>\n\t\t\t) }\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AAKA,IAAAK,cAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,kBAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,iBAAA,GAAAR,sBAAA,CAAAC,OAAA;AACA,IAAAQ,mBAAA,GAAAT,sBAAA,CAAAC,OAAA;AACA,IAAAS,MAAA,GAAAT,OAAA;AAAwD,IAAAU,WAAA,GAAAV,OAAA;AApBxD;AACA;AACA;;AAGA;AACA;AACA;;AAMA;AACA;AACA;;AAOA,MAAMW,gBAAgB,GAAG,CAAC;AAC1B,MAAMC,iBAAiB,GAAG,CAAC;AAC3B,MAAMC,oBAAoB,GAAG,CAAC;AAC9B,MAAMC,wCAAwC,GAAG,CAAC;AAEnC,SAASC,aAAaA,CAAE;EACtCC,QAAQ;EACRC,YAAY;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B,gBAAgB,EAAGA,gBAAkB;QACrCc,aAAa,EAAGpD,iBAAmB;QACnCqD,WAAW,EAAG,KAAO;QACrB7C,kBAAkB,EAAGA,kBAAoB;QACzCC,mBAAmB,EAAGA,mBAAqB;QAC3C6C,OAAO;MAAA,CACP;IAAC,CACE,CAAC,EAEJjC,mBAAmB,iBACpB,IAAAvB,WAAA,CAAA6C,GAAA,EAACpD,WAAA,CAAAgE,MAAM;MACNC,qBAAqB;MACrBhB,SAAS,EAAC,8CAA8C;MACxDiB,OAAO,EAAGpB,WAAa;MACvB,cAAa,IAAAY,QAAE,EACd,2EACD,CAAG;MAAAP,QAAA,EAED,IAAAO,QAAE,EAAE,YAAa;IAAC,CACb,CACR;EAAA,CACG,CAAC;AAER","ignoreList":[]}
1
+ {"version":3,"names":["_clsx","_interopRequireDefault","require","_element","_i18n","_components","_data","_searchResults","_useInsertionPoint","_usePatternsState","_useBlockTypesState","_store","_jsxRuntime","SEARCH_THRESHOLD","SHOWN_BLOCK_TYPES","SHOWN_BLOCK_PATTERNS","SHOWN_BLOCK_PATTERNS_WITH_PRIORITIZATION","QuickInserter","onSelect","rootClientId","clientId","isAppender","prioritizePatterns","selectBlockOnInsert","hasSearch","filterValue","setFilterValue","useState","destinationRootClientId","onInsertBlocks","useInsertionPoint","blockTypes","useBlockTypesState","patterns","usePatternsState","undefined","setInserterIsOpened","insertionIndex","useSelect","select","getSettings","getBlockIndex","getBlockCount","blockEditorStore","settings","index","blockCount","__experimentalSetIsInserterOpened","showPatterns","length","showSearch","useEffect","onBrowseAll","maxBlockPatterns","jsxs","className","clsx","children","jsx","SearchControl","__nextHasNoMarginBottom","value","onChange","label","__","placeholder","default","maxBlockTypes","isDraggable","isQuick","Button","__next40pxDefaultSize","onClick"],"sources":["@wordpress/block-editor/src/components/inserter/quick-inserter.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useState, useEffect } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { Button, SearchControl } from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport InserterSearchResults from './search-results';\nimport useInsertionPoint from './hooks/use-insertion-point';\nimport usePatternsState from './hooks/use-patterns-state';\nimport useBlockTypesState from './hooks/use-block-types-state';\nimport { store as blockEditorStore } from '../../store';\n\nconst SEARCH_THRESHOLD = 6;\nconst SHOWN_BLOCK_TYPES = 6;\nconst SHOWN_BLOCK_PATTERNS = 2;\nconst SHOWN_BLOCK_PATTERNS_WITH_PRIORITIZATION = 4;\n\nexport default function QuickInserter( {\n\tonSelect,\n\trootClientId,\n\tclientId,\n\tisAppender,\n\tprioritizePatterns,\n\tselectBlockOnInsert,\n\thasSearch = true,\n} ) {\n\tconst [ filterValue, setFilterValue ] = useState( '' );\n\tconst [ destinationRootClientId, onInsertBlocks ] = useInsertionPoint( {\n\t\tonSelect,\n\t\trootClientId,\n\t\tclientId,\n\t\tisAppender,\n\t\tselectBlockOnInsert,\n\t} );\n\tconst [ blockTypes ] = useBlockTypesState(\n\t\tdestinationRootClientId,\n\t\tonInsertBlocks,\n\t\ttrue\n\t);\n\tconst [ patterns ] = usePatternsState(\n\t\tonInsertBlocks,\n\t\tdestinationRootClientId,\n\t\tundefined,\n\t\ttrue\n\t);\n\n\tconst { setInserterIsOpened, insertionIndex } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getSettings, getBlockIndex, getBlockCount } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\tconst settings = getSettings();\n\t\t\tconst index = getBlockIndex( clientId );\n\t\t\tconst blockCount = getBlockCount();\n\n\t\t\treturn {\n\t\t\t\tsetInserterIsOpened: settings.__experimentalSetIsInserterOpened,\n\t\t\t\tinsertionIndex: index === -1 ? blockCount : index,\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\tconst showPatterns =\n\t\tpatterns.length && ( !! filterValue || prioritizePatterns );\n\tconst showSearch =\n\t\thasSearch &&\n\t\t( ( showPatterns && patterns.length > SEARCH_THRESHOLD ) ||\n\t\t\tblockTypes.length > SEARCH_THRESHOLD );\n\n\tuseEffect( () => {\n\t\tif ( setInserterIsOpened ) {\n\t\t\tsetInserterIsOpened( false );\n\t\t}\n\t}, [ setInserterIsOpened ] );\n\n\t// When clicking Browse All select the appropriate block so as\n\t// the insertion point can work as expected.\n\tconst onBrowseAll = () => {\n\t\tsetInserterIsOpened( {\n\t\t\tfilterValue,\n\t\t\tonSelect,\n\t\t\trootClientId,\n\t\t\tinsertionIndex,\n\t\t} );\n\t};\n\n\tlet maxBlockPatterns = 0;\n\tif ( showPatterns ) {\n\t\tmaxBlockPatterns = prioritizePatterns\n\t\t\t? SHOWN_BLOCK_PATTERNS_WITH_PRIORITIZATION\n\t\t\t: SHOWN_BLOCK_PATTERNS;\n\t}\n\n\treturn (\n\t\t<div\n\t\t\tclassName={ clsx( 'block-editor-inserter__quick-inserter', {\n\t\t\t\t'has-search': showSearch,\n\t\t\t\t'has-expand': setInserterIsOpened,\n\t\t\t} ) }\n\t\t>\n\t\t\t{ showSearch && (\n\t\t\t\t<SearchControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tclassName=\"block-editor-inserter__search\"\n\t\t\t\t\tvalue={ filterValue }\n\t\t\t\t\tonChange={ ( value ) => {\n\t\t\t\t\t\tsetFilterValue( value );\n\t\t\t\t\t} }\n\t\t\t\t\tlabel={ __( 'Search for blocks and patterns' ) }\n\t\t\t\t\tplaceholder={ __( 'Search' ) }\n\t\t\t\t/>\n\t\t\t) }\n\n\t\t\t<div className=\"block-editor-inserter__quick-inserter-results\">\n\t\t\t\t<InserterSearchResults\n\t\t\t\t\tfilterValue={ filterValue }\n\t\t\t\t\tonSelect={ onSelect }\n\t\t\t\t\trootClientId={ rootClientId }\n\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\tisAppender={ isAppender }\n\t\t\t\t\tmaxBlockPatterns={ maxBlockPatterns }\n\t\t\t\t\tmaxBlockTypes={ SHOWN_BLOCK_TYPES }\n\t\t\t\t\tisDraggable={ false }\n\t\t\t\t\tprioritizePatterns={ prioritizePatterns }\n\t\t\t\t\tselectBlockOnInsert={ selectBlockOnInsert }\n\t\t\t\t\tisQuick\n\t\t\t\t/>\n\t\t\t</div>\n\n\t\t\t{ setInserterIsOpened && (\n\t\t\t\t<Button\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\tclassName=\"block-editor-inserter__quick-inserter-expand\"\n\t\t\t\t\tonClick={ onBrowseAll }\n\t\t\t\t\taria-label={ __(\n\t\t\t\t\t\t'Browse all. This will open the main inserter panel in the editor toolbar.'\n\t\t\t\t\t) }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Browse all' ) }\n\t\t\t\t</Button>\n\t\t\t) }\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AAKA,IAAAK,cAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,kBAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,iBAAA,GAAAR,sBAAA,CAAAC,OAAA;AACA,IAAAQ,mBAAA,GAAAT,sBAAA,CAAAC,OAAA;AACA,IAAAS,MAAA,GAAAT,OAAA;AAAwD,IAAAU,WAAA,GAAAV,OAAA;AApBxD;AACA;AACA;;AAGA;AACA;AACA;;AAMA;AACA;AACA;;AAOA,MAAMW,gBAAgB,GAAG,CAAC;AAC1B,MAAMC,iBAAiB,GAAG,CAAC;AAC3B,MAAMC,oBAAoB,GAAG,CAAC;AAC9B,MAAMC,wCAAwC,GAAG,CAAC;AAEnC,SAASC,aAAaA,CAAE;EACtCC,QAAQ;EACRC,YAAY;EACZC,QAAQ;EACRC,UAAU;EACV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,gBAAgB,EAAGA,gBAAkB;QACrCc,aAAa,EAAGrD,iBAAmB;QACnCsD,WAAW,EAAG,KAAO;QACrB9C,kBAAkB,EAAGA,kBAAoB;QACzCC,mBAAmB,EAAGA,mBAAqB;QAC3C8C,OAAO;MAAA,CACP;IAAC,CACE,CAAC,EAEJjC,mBAAmB,iBACpB,IAAAxB,WAAA,CAAA8C,GAAA,EAACrD,WAAA,CAAAiE,MAAM;MACNC,qBAAqB;MACrBhB,SAAS,EAAC,8CAA8C;MACxDiB,OAAO,EAAGpB,WAAa;MACvB,cAAa,IAAAY,QAAE,EACd,2EACD,CAAG;MAAAP,QAAA,EAED,IAAAO,QAAE,EAAE,YAAa;IAAC,CACb,CACR;EAAA,CACG,CAAC;AAER","ignoreList":[]}
@@ -47,16 +47,19 @@ function InspectorControlsTabs({
47
47
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(Tabs, {
48
48
  defaultTabId: initialTabName,
49
49
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Tabs.TabList, {
50
- children: tabs.map(tab => /*#__PURE__*/(0, _jsxRuntime.jsx)(Tabs.Tab, {
50
+ children: tabs.map(tab => showIconLabels ? /*#__PURE__*/(0, _jsxRuntime.jsx)(Tabs.Tab, {
51
51
  tabId: tab.name,
52
- render: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button
53
- // TODO: Switch to `true` (40px size) if possible
54
- , {
55
- __next40pxDefaultSize: false,
56
- icon: !showIconLabels ? tab.icon : undefined,
57
- label: !showIconLabels ? tab.title : undefined,
52
+ className: tab.className,
53
+ children: tab.title
54
+ }, tab.name) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Tooltip, {
55
+ text: tab.title,
56
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Tabs.Tab, {
57
+ tabId: tab.name,
58
58
  className: tab.className,
59
- children: showIconLabels && tab.title
59
+ "aria-label": tab.title,
60
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Icon, {
61
+ icon: tab.icon
62
+ })
60
63
  })
61
64
  }, tab.name))
62
65
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(Tabs.TabPanel, {
@@ -1 +1 @@
1
- {"version":3,"names":["_components","require","_preferences","_data","_utils","_settingsTab","_interopRequireDefault","_stylesTab","_inspectorControls","_useIsListViewTabDisabled","_lockUnlock","_jsxRuntime","Tabs","unlock","componentsPrivateApis","InspectorControlsTabs","blockName","clientId","hasBlockStyles","tabs","showIconLabels","useSelect","select","preferencesStore","get","initialTabName","useIsListViewTabDisabled","TAB_LIST_VIEW","name","undefined","jsx","className","children","jsxs","defaultTabId","TabList","map","tab","Tab","tabId","render","Button","__next40pxDefaultSize","icon","label","title","TabPanel","TAB_SETTINGS","focusable","default","showAdvancedControls","TAB_STYLES","Slot","group"],"sources":["@wordpress/block-editor/src/components/inspector-controls-tabs/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tButton,\n\tprivateApis as componentsPrivateApis,\n} from '@wordpress/components';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { TAB_SETTINGS, TAB_STYLES, TAB_LIST_VIEW } from './utils';\nimport SettingsTab from './settings-tab';\nimport StylesTab from './styles-tab';\nimport InspectorControls from '../inspector-controls';\nimport useIsListViewTabDisabled from './use-is-list-view-tab-disabled';\nimport { unlock } from '../../lock-unlock';\n\nconst { Tabs } = unlock( componentsPrivateApis );\n\nexport default function InspectorControlsTabs( {\n\tblockName,\n\tclientId,\n\thasBlockStyles,\n\ttabs,\n} ) {\n\tconst showIconLabels = useSelect( ( select ) => {\n\t\treturn select( preferencesStore ).get( 'core', 'showIconLabels' );\n\t}, [] );\n\n\t// The tabs panel will mount before fills are rendered to the list view\n\t// slot. This means the list view tab isn't initially included in the\n\t// available tabs so the panel defaults selection to the settings tab\n\t// which at the time is the first tab. This check allows blocks known to\n\t// include the list view tab to set it as the tab selected by default.\n\tconst initialTabName = ! useIsListViewTabDisabled( blockName )\n\t\t? TAB_LIST_VIEW.name\n\t\t: undefined;\n\n\treturn (\n\t\t<div className=\"block-editor-block-inspector__tabs\">\n\t\t\t<Tabs defaultTabId={ initialTabName } key={ clientId }>\n\t\t\t\t<Tabs.TabList>\n\t\t\t\t\t{ tabs.map( ( tab ) => (\n\t\t\t\t\t\t<Tabs.Tab\n\t\t\t\t\t\t\tkey={ tab.name }\n\t\t\t\t\t\t\ttabId={ tab.name }\n\t\t\t\t\t\t\trender={\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t// TODO: Switch to `true` (40px size) if possible\n\t\t\t\t\t\t\t\t\t__next40pxDefaultSize={ false }\n\t\t\t\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\t\t\t\t! showIconLabels ? tab.icon : undefined\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\t\t\t\t! showIconLabels ? tab.title : undefined\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tclassName={ tab.className }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ showIconLabels && tab.title }\n\t\t\t\t\t\t\t\t</Button>\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</Tabs.TabList>\n\t\t\t\t<Tabs.TabPanel tabId={ TAB_SETTINGS.name } focusable={ false }>\n\t\t\t\t\t<SettingsTab showAdvancedControls={ !! blockName } />\n\t\t\t\t</Tabs.TabPanel>\n\t\t\t\t<Tabs.TabPanel tabId={ TAB_STYLES.name } focusable={ false }>\n\t\t\t\t\t<StylesTab\n\t\t\t\t\t\tblockName={ blockName }\n\t\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\t\thasBlockStyles={ hasBlockStyles }\n\t\t\t\t\t/>\n\t\t\t\t</Tabs.TabPanel>\n\t\t\t\t<Tabs.TabPanel tabId={ TAB_LIST_VIEW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,EAAGZ,oBAAa,CAACC,IAAM;QAACoB,SAAS,EAAG,KAAO;QAAAhB,QAAA,eAC9D,IAAArB,WAAA,CAAAmB,GAAA,EAACtB,kBAAA,CAAAyC,OAAiB,CAACG,IAAI;UAACC,KAAK,EAAC;QAAM,CAAE;MAAC,CACzB,CAAC;IAAA,GApC2BpC,QAqCtC;EAAC,CACH,CAAC;AAER","ignoreList":[]}
1
+ {"version":3,"names":["_components","require","_preferences","_data","_utils","_settingsTab","_interopRequireDefault","_stylesTab","_inspectorControls","_useIsListViewTabDisabled","_lockUnlock","_jsxRuntime","Tabs","unlock","componentsPrivateApis","InspectorControlsTabs","blockName","clientId","hasBlockStyles","tabs","showIconLabels","useSelect","select","preferencesStore","get","initialTabName","useIsListViewTabDisabled","TAB_LIST_VIEW","name","undefined","jsx","className","children","jsxs","defaultTabId","TabList","map","tab","Tab","tabId","title","Tooltip","text","Icon","icon","TabPanel","TAB_SETTINGS","focusable","default","showAdvancedControls","TAB_STYLES","Slot","group"],"sources":["@wordpress/block-editor/src/components/inspector-controls-tabs/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tIcon,\n\tTooltip,\n\tprivateApis as componentsPrivateApis,\n} from '@wordpress/components';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { TAB_SETTINGS, TAB_STYLES, TAB_LIST_VIEW } from './utils';\nimport SettingsTab from './settings-tab';\nimport StylesTab from './styles-tab';\nimport InspectorControls from '../inspector-controls';\nimport useIsListViewTabDisabled from './use-is-list-view-tab-disabled';\nimport { unlock } from '../../lock-unlock';\n\nconst { Tabs } = unlock( componentsPrivateApis );\n\nexport default function InspectorControlsTabs( {\n\tblockName,\n\tclientId,\n\thasBlockStyles,\n\ttabs,\n} ) {\n\tconst showIconLabels = useSelect( ( select ) => {\n\t\treturn select( preferencesStore ).get( 'core', 'showIconLabels' );\n\t}, [] );\n\n\t// The tabs panel will mount before fills are rendered to the list view\n\t// slot. This means the list view tab isn't initially included in the\n\t// available tabs so the panel defaults selection to the settings tab\n\t// which at the time is the first tab. This check allows blocks known to\n\t// include the list view tab to set it as the tab selected by default.\n\tconst initialTabName = ! useIsListViewTabDisabled( blockName )\n\t\t? TAB_LIST_VIEW.name\n\t\t: undefined;\n\n\treturn (\n\t\t<div className=\"block-editor-block-inspector__tabs\">\n\t\t\t<Tabs defaultTabId={ initialTabName } key={ clientId }>\n\t\t\t\t<Tabs.TabList>\n\t\t\t\t\t{ tabs.map( ( tab ) =>\n\t\t\t\t\t\tshowIconLabels ? (\n\t\t\t\t\t\t\t<Tabs.Tab\n\t\t\t\t\t\t\t\tkey={ tab.name }\n\t\t\t\t\t\t\t\ttabId={ tab.name }\n\t\t\t\t\t\t\t\tclassName={ tab.className }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ tab.title }\n\t\t\t\t\t\t\t</Tabs.Tab>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<Tooltip text={ tab.title } key={ tab.name }>\n\t\t\t\t\t\t\t\t<Tabs.Tab\n\t\t\t\t\t\t\t\t\ttabId={ tab.name }\n\t\t\t\t\t\t\t\t\tclassName={ tab.className }\n\t\t\t\t\t\t\t\t\taria-label={ tab.title }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Icon icon={ tab.icon } />\n\t\t\t\t\t\t\t\t</Tabs.Tab>\n\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t)\n\t\t\t\t\t) }\n\t\t\t\t</Tabs.TabList>\n\t\t\t\t<Tabs.TabPanel tabId={ TAB_SETTINGS.name } focusable={ false }>\n\t\t\t\t\t<SettingsTab showAdvancedControls={ !! blockName } />\n\t\t\t\t</Tabs.TabPanel>\n\t\t\t\t<Tabs.TabPanel tabId={ TAB_STYLES.name } focusable={ false }>\n\t\t\t\t\t<StylesTab\n\t\t\t\t\t\tblockName={ blockName }\n\t\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\t\thasBlockStyles={ hasBlockStyles }\n\t\t\t\t\t/>\n\t\t\t\t</Tabs.TabPanel>\n\t\t\t\t<Tabs.TabPanel tabId={ TAB_LIST_VIEW.name } focusable={ false }>\n\t\t\t\t\t<InspectorControls.Slot group=\"list\" />\n\t\t\t\t</Tabs.TabPanel>\n\t\t\t</Tabs>\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAKA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AAKA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAC,sBAAA,CAAAL,OAAA;AACA,IAAAM,UAAA,GAAAD,sBAAA,CAAAL,OAAA;AACA,IAAAO,kBAAA,GAAAF,sBAAA,CAAAL,OAAA;AACA,IAAAQ,yBAAA,GAAAH,sBAAA,CAAAL,OAAA;AACA,IAAAS,WAAA,GAAAT,OAAA;AAA2C,IAAAU,WAAA,GAAAV,OAAA;AAnB3C;AACA;AACA;;AASA;AACA;AACA;;AAQA,MAAM;EAAEW;AAAK,CAAC,GAAG,IAAAC,kBAAM,EAAEC,uBAAsB,CAAC;AAEjC,SAASC,qBAAqBA,CAAE;EAC9CC,SAAS;EACTC,QAAQ;EACRC,cAAc;EACdC;AACD,CAAC,EAAG;EACH,MAAMC,cAAc,GAAG,IAAAC,eAAS,EAAIC,MAAM,IAAM;IAC/C,OAAOA,MAAM,CAAEC,kBAAiB,CAAC,CAACC,GAAG,CAAE,MAAM,EAAE,gBAAiB,CAAC;EAClE,CAAC,EAAE,EAAG,CAAC;;EAEP;EACA;EACA;EACA;EACA;EACA,MAAMC,cAAc,GAAG,CAAE,IAAAC,iCAAwB,EAAEV,SAAU,CAAC,GAC3DW,oBAAa,CAACC,IAAI,GAClBC,SAAS;EAEZ,oBACC,IAAAlB,WAAA,CAAAmB,GAAA;IAAKC,SAAS,EAAC,oCAAoC;IAAAC,QAAA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N,KAAK,EAAGW,iBAAU,CAACtB,IAAM;QAACmB,SAAS,EAAG,KAAO;QAAAf,QAAA,eAC3D,IAAArB,WAAA,CAAAmB,GAAA,EAACvB,UAAA,CAAAyC,OAAS;UACThC,SAAS,EAAGA,SAAW;UACvBC,QAAQ,EAAGA,QAAU;UACrBC,cAAc,EAAGA;QAAgB,CACjC;MAAC,CACY,CAAC,eAChB,IAAAP,WAAA,CAAAmB,GAAA,EAAClB,IAAI,CAACiC,QAAQ;QAACN,KAAK,EAAGZ,oBAAa,CAACC,IAAM;QAACmB,SAAS,EAAG,KAAO;QAAAf,QAAA,eAC9D,IAAArB,WAAA,CAAAmB,GAAA,EAACtB,kBAAA,CAAAwC,OAAiB,CAACG,IAAI;UAACC,KAAK,EAAC;QAAM,CAAE;MAAC,CACzB,CAAC;IAAA,GApC2BnC,QAqCtC;EAAC,CACH,CAAC;AAER","ignoreList":[]}
@@ -32,20 +32,16 @@ function InspectorPopoverHeader({
32
32
  label,
33
33
  icon,
34
34
  onClick
35
- }) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button
36
- // TODO: Switch to `true` (40px size) if possible
37
- , {
38
- __next40pxDefaultSize: false,
35
+ }) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
36
+ size: "small",
39
37
  className: "block-editor-inspector-popover-header__action",
40
38
  label: label,
41
39
  icon: icon,
42
40
  variant: !icon && 'tertiary',
43
41
  onClick: onClick,
44
42
  children: !icon && label
45
- }, label)), onClose && /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button
46
- // TODO: Switch to `true` (40px size) if possible
47
- , {
48
- __next40pxDefaultSize: false,
43
+ }, label)), onClose && /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
44
+ size: "small",
49
45
  className: "block-editor-inspector-popover-header__action",
50
46
  label: (0, _i18n.__)('Close'),
51
47
  icon: _icons.closeSmall,
@@ -1 +1 @@
1
- {"version":3,"names":["_components","require","_icons","_i18n","_jsxRuntime","InspectorPopoverHeader","title","help","actions","onClose","jsxs","__experimentalVStack","className","spacing","children","__experimentalHStack","alignment","jsx","__experimentalHeading","level","size","__experimentalSpacer","map","label","icon","onClick","Button","__next40pxDefaultSize","variant","__","closeSmall","__experimentalText"],"sources":["@wordpress/block-editor/src/components/inspector-popover-header/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalVStack as VStack,\n\t__experimentalHStack as HStack,\n\t__experimentalHeading as Heading,\n\t__experimentalSpacer as Spacer,\n\tButton,\n\t__experimentalText as Text,\n} from '@wordpress/components';\nimport { closeSmall } from '@wordpress/icons';\nimport { __ } from '@wordpress/i18n';\n\nexport default function InspectorPopoverHeader( {\n\ttitle,\n\thelp,\n\tactions = [],\n\tonClose,\n} ) {\n\treturn (\n\t\t<VStack className=\"block-editor-inspector-popover-header\" spacing={ 4 }>\n\t\t\t<HStack alignment=\"center\">\n\t\t\t\t<Heading\n\t\t\t\t\tclassName=\"block-editor-inspector-popover-header__heading\"\n\t\t\t\t\tlevel={ 2 }\n\t\t\t\t\tsize={ 13 }\n\t\t\t\t>\n\t\t\t\t\t{ title }\n\t\t\t\t</Heading>\n\t\t\t\t<Spacer />\n\t\t\t\t{ actions.map( ( { label, icon, onClick } ) => (\n\t\t\t\t\t<Button\n\t\t\t\t\t\t// TODO: Switch to `true` (40px size) if possible\n\t\t\t\t\t\t__next40pxDefaultSize={ false }\n\t\t\t\t\t\tkey={ label }\n\t\t\t\t\t\tclassName=\"block-editor-inspector-popover-header__action\"\n\t\t\t\t\t\tlabel={ label }\n\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\tvariant={ ! icon && 'tertiary' }\n\t\t\t\t\t\tonClick={ onClick }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ ! icon && label }\n\t\t\t\t\t</Button>\n\t\t\t\t) ) }\n\t\t\t\t{ onClose && (\n\t\t\t\t\t<Button\n\t\t\t\t\t\t// TODO: Switch to `true` (40px size) if possible\n\t\t\t\t\t\t__next40pxDefaultSize={ false }\n\t\t\t\t\t\tclassName=\"block-editor-inspector-popover-header__action\"\n\t\t\t\t\t\tlabel={ __( 'Close' ) }\n\t\t\t\t\t\ticon={ closeSmall }\n\t\t\t\t\t\tonClick={ onClose }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</HStack>\n\t\t\t{ help && <Text>{ help }</Text> }\n\t\t</VStack>\n\t);\n}\n"],"mappings":";;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAQA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AAAqC,IAAAG,WAAA,GAAAH,OAAA;AAZrC;AACA;AACA;;AAYe,SAASI,sBAAsBA,CAAE;EAC/CC,KAAK;EACLC,IAAI;EACJC,OAAO,GAAG,EAAE;EACZC;AACD,CAAC,EAAG;EACH,oBACC,IAAAL,WAAA,CAAAM,IAAA,EAACV,WAAA,CAAAW,oBAAM;IAACC,SAAS,EAAC,uCAAuC;IAACC,OAAO,EAAG,CAAG;IAAAC,QAAA,gBACtE,IAAAV,WAAA,CAAAM,IAAA,EAACV,WAAA,CAAAe,oBAAM;MAACC,SAAS,EAAC,QAAQ;MAAAF,QAAA,gBACzB,IAAAV,WAAA,CAAAa,GAAA,EAACjB,WAAA,CAAAkB,qBAAO;QACPN,SAAS,EAAC,gDAAgD;QAC1DO,KAAK,EAAG,CAAG;QACXC,IAAI,EAAG,EAAI;QAAAN,QAAA,EAETR;MAAK,CACC,CAAC,eACV,IAAAF,WAAA,CAAAa,GAAA,EAACjB,WAAA,CAAAqB,oBAAM,IAAE,CAAC,EACRb,OAAO,CAACc,GAAG,CAAE,CAAE;QAAEC,KAAK;QAAEC,IAAI;QAAEC;MAAQ,CAAC,kBACxC,IAAArB,WAAA,CAAAa,GAAA,EAACjB,WAAA,CAAA0B;MACA;MAAA;QACAC,qBAAqB,EAAG,KAAO;QAE/Bf,SAAS,EAAC,+CAA+C;QACzDW,KAAK,EAAGA,KAAO;QACfC,IAAI,EAAGA,IAAM;QACbI,OAAO,EAAG,CAAEJ,IAAI,IAAI,UAAY;QAChCC,OAAO,EAAGA,OAAS;QAAAX,QAAA,EAEjB,CAAEU,IAAI,IAAID;MAAK,GAPXA,KAQC,CACP,CAAC,EACDd,OAAO,iBACR,IAAAL,WAAA,CAAAa,GAAA,EAACjB,WAAA,CAAA0B;MACA;MAAA;QACAC,qBAAqB,EAAG,KAAO;QAC/Bf,SAAS,EAAC,+CAA+C;QACzDW,KAAK,EAAG,IAAAM,QAAE,EAAE,OAAQ,CAAG;QACvBL,IAAI,EAAGM,iBAAY;QACnBL,OAAO,EAAGhB;MAAS,CACnB,CACD;IAAA,CACM,CAAC,EACPF,IAAI,iBAAI,IAAAH,WAAA,CAAAa,GAAA,EAACjB,WAAA,CAAA+B,kBAAI;MAAAjB,QAAA,EAAGP;IAAI,CAAQ,CAAC;EAAA,CACxB,CAAC;AAEX","ignoreList":[]}
1
+ {"version":3,"names":["_components","require","_icons","_i18n","_jsxRuntime","InspectorPopoverHeader","title","help","actions","onClose","jsxs","__experimentalVStack","className","spacing","children","__experimentalHStack","alignment","jsx","__experimentalHeading","level","size","__experimentalSpacer","map","label","icon","onClick","Button","variant","__","closeSmall","__experimentalText"],"sources":["@wordpress/block-editor/src/components/inspector-popover-header/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalVStack as VStack,\n\t__experimentalHStack as HStack,\n\t__experimentalHeading as Heading,\n\t__experimentalSpacer as Spacer,\n\tButton,\n\t__experimentalText as Text,\n} from '@wordpress/components';\nimport { closeSmall } from '@wordpress/icons';\nimport { __ } from '@wordpress/i18n';\n\nexport default function InspectorPopoverHeader( {\n\ttitle,\n\thelp,\n\tactions = [],\n\tonClose,\n} ) {\n\treturn (\n\t\t<VStack className=\"block-editor-inspector-popover-header\" spacing={ 4 }>\n\t\t\t<HStack alignment=\"center\">\n\t\t\t\t<Heading\n\t\t\t\t\tclassName=\"block-editor-inspector-popover-header__heading\"\n\t\t\t\t\tlevel={ 2 }\n\t\t\t\t\tsize={ 13 }\n\t\t\t\t>\n\t\t\t\t\t{ title }\n\t\t\t\t</Heading>\n\t\t\t\t<Spacer />\n\t\t\t\t{ actions.map( ( { label, icon, onClick } ) => (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\tkey={ label }\n\t\t\t\t\t\tclassName=\"block-editor-inspector-popover-header__action\"\n\t\t\t\t\t\tlabel={ label }\n\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\tvariant={ ! icon && 'tertiary' }\n\t\t\t\t\t\tonClick={ onClick }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ ! icon && label }\n\t\t\t\t\t</Button>\n\t\t\t\t) ) }\n\t\t\t\t{ onClose && (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\tclassName=\"block-editor-inspector-popover-header__action\"\n\t\t\t\t\t\tlabel={ __( 'Close' ) }\n\t\t\t\t\t\ticon={ closeSmall }\n\t\t\t\t\t\tonClick={ onClose }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</HStack>\n\t\t\t{ help && <Text>{ help }</Text> }\n\t\t</VStack>\n\t);\n}\n"],"mappings":";;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAQA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AAAqC,IAAAG,WAAA,GAAAH,OAAA;AAZrC;AACA;AACA;;AAYe,SAASI,sBAAsBA,CAAE;EAC/CC,KAAK;EACLC,IAAI;EACJC,OAAO,GAAG,EAAE;EACZC;AACD,CAAC,EAAG;EACH,oBACC,IAAAL,WAAA,CAAAM,IAAA,EAACV,WAAA,CAAAW,oBAAM;IAACC,SAAS,EAAC,uCAAuC;IAACC,OAAO,EAAG,CAAG;IAAAC,QAAA,gBACtE,IAAAV,WAAA,CAAAM,IAAA,EAACV,WAAA,CAAAe,oBAAM;MAACC,SAAS,EAAC,QAAQ;MAAAF,QAAA,gBACzB,IAAAV,WAAA,CAAAa,GAAA,EAACjB,WAAA,CAAAkB,qBAAO;QACPN,SAAS,EAAC,gDAAgD;QAC1DO,KAAK,EAAG,CAAG;QACXC,IAAI,EAAG,EAAI;QAAAN,QAAA,EAETR;MAAK,CACC,CAAC,eACV,IAAAF,WAAA,CAAAa,GAAA,EAACjB,WAAA,CAAAqB,oBAAM,IAAE,CAAC,EACRb,OAAO,CAACc,GAAG,CAAE,CAAE;QAAEC,KAAK;QAAEC,IAAI;QAAEC;MAAQ,CAAC,kBACxC,IAAArB,WAAA,CAAAa,GAAA,EAACjB,WAAA,CAAA0B,MAAM;QACNN,IAAI,EAAC,OAAO;QAEZR,SAAS,EAAC,+CAA+C;QACzDW,KAAK,EAAGA,KAAO;QACfC,IAAI,EAAGA,IAAM;QACbG,OAAO,EAAG,CAAEH,IAAI,IAAI,UAAY;QAChCC,OAAO,EAAGA,OAAS;QAAAX,QAAA,EAEjB,CAAEU,IAAI,IAAID;MAAK,GAPXA,KAQC,CACP,CAAC,EACDd,OAAO,iBACR,IAAAL,WAAA,CAAAa,GAAA,EAACjB,WAAA,CAAA0B,MAAM;QACNN,IAAI,EAAC,OAAO;QACZR,SAAS,EAAC,+CAA+C;QACzDW,KAAK,EAAG,IAAAK,QAAE,EAAE,OAAQ,CAAG;QACvBJ,IAAI,EAAGK,iBAAY;QACnBJ,OAAO,EAAGhB;MAAS,CACnB,CACD;IAAA,CACM,CAAC,EACPF,IAAI,iBAAI,IAAAH,WAAA,CAAAa,GAAA,EAACjB,WAAA,CAAA8B,kBAAI;MAAAhB,QAAA,EAAGP;IAAI,CAAQ,CAAC;EAAA,CACxB,CAAC;AAEX","ignoreList":[]}
@@ -356,8 +356,7 @@ function LinkControl({
356
356
  "aria-disabled": isDisabled,
357
357
  size: "small"
358
358
  })
359
- }),
360
- props: true
359
+ })
361
360
  })]
362
361
  }), errorMessage && /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Notice, {
363
362
  className: "block-editor-link-control__search-error",
@@ -389,17 +388,13 @@ function LinkControl({
389
388
  }), showActions && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.__experimentalHStack, {
390
389
  justify: "right",
391
390
  className: "block-editor-link-control__search-actions",
392
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button
393
- // TODO: Switch to `true` (40px size) if possible
394
- , {
395
- __next40pxDefaultSize: false,
391
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
392
+ __next40pxDefaultSize: true,
396
393
  variant: "tertiary",
397
394
  onClick: handleCancel,
398
395
  children: (0, _i18n.__)('Cancel')
399
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button
400
- // TODO: Switch to `true` (40px size) if possible
401
- , {
402
- __next40pxDefaultSize: false,
396
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
397
+ __next40pxDefaultSize: true,
403
398
  variant: "primary",
404
399
  onClick: isDisabled ? noop : handleSubmit,
405
400
  className: "block-editor-link-control__search-submit",
@@ -1 +1 @@
1
- {"version":3,"names":["_clsx","_interopRequireDefault","require","_components","_i18n","_element","_dom","_keycodes","_isShallowEqual","_data","_preferences","_icons","_settingsDrawer","_searchInput","_linkPreview","_settings","_useCreatePage","_useInternalValue","_viewerSlot","_constants","_jsxRuntime","noop","PREFERENCE_SCOPE","PREFERENCE_KEY","LinkControl","searchInputPlaceholder","value","settings","DEFAULT_LINK_SETTINGS","onChange","onRemove","onCancel","noDirectEntry","showSuggestions","showInitialSuggestions","forceIsEditingLink","createSuggestion","withCreateSuggestion","inputValue","propInputValue","suggestionsQuery","noURLSuggestion","createSuggestionButtonText","hasRichPreviews","hasTextControl","renderControlBottom","undefined","settingsOpen","setSettingsOpen","useState","advancedSettingsPreference","useSelect","select","_prefsStore$get","prefsStore","preferencesStore","get","set","setPreference","useDispatch","setSettingsOpenWithPreference","prefVal","isSettingsOpen","isMountingRef","useRef","wrapperNode","textInputRef","isEndingEditWithFocusRef","settingsKeys","map","id","internalControlValue","setInternalControlValue","setInternalURLInputValue","setInternalTextInputValue","createSetInternalSettingValueHandler","useInternalValue","valueHasChanges","isShallowEqualObjects","isEditingLink","setIsEditingLink","url","createPage","isCreatingPage","errorMessage","useCreatePage","useEffect","current","nextFocusTarget","focus","focusable","find","hasLinkValue","trim","length","stopEditing","contains","ownerDocument","activeElement","handleSelectSuggestion","updatedValue","nonSettingsChanges","Object","keys","reduce","acc","key","includes","title","handleSubmit","currentUrlInputValue","handleSubmitWithEnter","event","keyCode","ENTER","currentInputIsEmpty","preventDefault","resetInternalValues","handleCancel","stopPropagation","shownUnlinkControl","showActions","showTextControl","isEditing","isDisabled","showSettings","jsxs","tabIndex","ref","className","children","jsx","Spinner","__","Fragment","clsx","TextControl","__nextHasNoMarginBottom","label","onKeyDown","__next40pxDefaultSize","default","currentLink","placeholder","onCreateSuggestion","onSelect","allowDirectEntry","withURLSuggestion","hideLabelFromVision","suffix","__experimentalInputControlSuffixWrapper","variant","Button","onClick","icon","keyboardReturn","size","props","Notice","status","isDismissible","onEditClick","hasUnlinkControl","__experimentalHStack","justify","ViewerFill","_default","exports"],"sources":["@wordpress/block-editor/src/components/link-control/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tButton,\n\tSpinner,\n\tNotice,\n\tTextControl,\n\t__experimentalHStack as HStack,\n\t__experimentalInputControlSuffixWrapper as InputControlSuffixWrapper,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useRef, useState, useEffect } from '@wordpress/element';\nimport { focus } from '@wordpress/dom';\nimport { ENTER } from '@wordpress/keycodes';\nimport { isShallowEqualObjects } from '@wordpress/is-shallow-equal';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { keyboardReturn } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport LinkControlSettingsDrawer from './settings-drawer';\nimport LinkControlSearchInput from './search-input';\nimport LinkPreview from './link-preview';\nimport LinkSettings from './settings';\nimport useCreatePage from './use-create-page';\nimport useInternalValue from './use-internal-value';\nimport { ViewerFill } from './viewer-slot';\nimport { DEFAULT_LINK_SETTINGS } from './constants';\n\n/**\n * Default properties associated with a link control value.\n *\n * @typedef WPLinkControlDefaultValue\n *\n * @property {string} url Link URL.\n * @property {string=} title Link title.\n * @property {boolean=} opensInNewTab Whether link should open in a new browser\n * tab. This value is only assigned if not\n * providing a custom `settings` prop.\n */\n\n/* eslint-disable jsdoc/valid-types */\n/**\n * Custom settings values associated with a link.\n *\n * @typedef {{[setting:string]:any}} WPLinkControlSettingsValue\n */\n/* eslint-enable */\n\n/**\n * Custom settings values associated with a link.\n *\n * @typedef WPLinkControlSetting\n *\n * @property {string} id Identifier to use as property for setting value.\n * @property {string} title Human-readable label to show in user interface.\n */\n\n/**\n * Properties associated with a link control value, composed as a union of the\n * default properties and any custom settings values.\n *\n * @typedef {WPLinkControlDefaultValue&WPLinkControlSettingsValue} WPLinkControlValue\n */\n\n/** @typedef {(nextValue:WPLinkControlValue)=>void} WPLinkControlOnChangeProp */\n\n/**\n * Properties associated with a search suggestion used within the LinkControl.\n *\n * @typedef WPLinkControlSuggestion\n *\n * @property {string} id Identifier to use to uniquely identify the suggestion.\n * @property {string} type Identifies the type of the suggestion (eg: `post`,\n * `page`, `url`...etc)\n * @property {string} title Human-readable label to show in user interface.\n * @property {string} url A URL for the suggestion.\n */\n\n/** @typedef {(title:string)=>WPLinkControlSuggestion} WPLinkControlCreateSuggestionProp */\n\n/**\n * @typedef WPLinkControlProps\n *\n * @property {(WPLinkControlSetting[])=} settings An array of settings objects. Each object will used to\n * render a `ToggleControl` for that setting.\n * @property {boolean=} forceIsEditingLink If passed as either `true` or `false`, controls the\n * internal editing state of the component to respective\n * show or not show the URL input field.\n * @property {WPLinkControlValue=} value Current link value.\n * @property {WPLinkControlOnChangeProp=} onChange Value change handler, called with the updated value if\n * the user selects a new link or updates settings.\n * @property {boolean=} noDirectEntry Whether to allow turning a URL-like search query directly into a link.\n * @property {boolean=} showSuggestions Whether to present suggestions when typing the URL.\n * @property {boolean=} showInitialSuggestions Whether to present initial suggestions immediately.\n * @property {boolean=} withCreateSuggestion Whether to allow creation of link value from suggestion.\n * @property {Object=} suggestionsQuery Query parameters to pass along to wp.blockEditor.__experimentalFetchLinkSuggestions.\n * @property {boolean=} noURLSuggestion Whether to add a fallback suggestion which treats the search query as a URL.\n * @property {boolean=} hasTextControl Whether to add a text field to the UI to update the value.title.\n * @property {string|Function|undefined} createSuggestionButtonText The text to use in the button that calls createSuggestion.\n * @property {Function} renderControlBottom Optional controls to be rendered at the bottom of the component.\n */\n\nconst noop = () => {};\n\nconst PREFERENCE_SCOPE = 'core/block-editor';\nconst PREFERENCE_KEY = 'linkControlSettingsDrawer';\n\n/**\n * Renders a link control. A link control is a controlled input which maintains\n * a value associated with a link (HTML anchor element) and relevant settings\n * for how that link is expected to behave.\n *\n * @param {WPLinkControlProps} props Component props.\n */\nfunction LinkControl( {\n\tsearchInputPlaceholder,\n\tvalue,\n\tsettings = DEFAULT_LINK_SETTINGS,\n\tonChange = noop,\n\tonRemove,\n\tonCancel,\n\tnoDirectEntry = false,\n\tshowSuggestions = true,\n\tshowInitialSuggestions,\n\tforceIsEditingLink,\n\tcreateSuggestion,\n\twithCreateSuggestion,\n\tinputValue: propInputValue = '',\n\tsuggestionsQuery = {},\n\tnoURLSuggestion = false,\n\tcreateSuggestionButtonText,\n\thasRichPreviews = false,\n\thasTextControl = false,\n\trenderControlBottom = null,\n} ) {\n\tif ( withCreateSuggestion === undefined && createSuggestion ) {\n\t\twithCreateSuggestion = true;\n\t}\n\n\tconst [ settingsOpen, setSettingsOpen ] = useState( false );\n\n\tconst { advancedSettingsPreference } = useSelect( ( select ) => {\n\t\tconst prefsStore = select( preferencesStore );\n\n\t\treturn {\n\t\t\tadvancedSettingsPreference:\n\t\t\t\tprefsStore.get( PREFERENCE_SCOPE, PREFERENCE_KEY ) ?? false,\n\t\t};\n\t}, [] );\n\n\tconst { set: setPreference } = useDispatch( preferencesStore );\n\n\t/**\n\t * Sets the open/closed state of the Advanced Settings Drawer,\n\t * optionlly persisting the state to the user's preferences.\n\t *\n\t * Note that Block Editor components can be consumed by non-WordPress\n\t * environments which may not have preferences setup.\n\t * Therefore a local state is also used as a fallback.\n\t *\n\t * @param {boolean} prefVal the open/closed state of the Advanced Settings Drawer.\n\t */\n\tconst setSettingsOpenWithPreference = ( prefVal ) => {\n\t\tif ( setPreference ) {\n\t\t\tsetPreference( PREFERENCE_SCOPE, PREFERENCE_KEY, prefVal );\n\t\t}\n\t\tsetSettingsOpen( prefVal );\n\t};\n\n\t// Block Editor components can be consumed by non-WordPress environments\n\t// which may not have these preferences setup.\n\t// Therefore a local state is used as a fallback.\n\tconst isSettingsOpen = advancedSettingsPreference || settingsOpen;\n\n\tconst isMountingRef = useRef( true );\n\tconst wrapperNode = useRef();\n\tconst textInputRef = useRef();\n\tconst isEndingEditWithFocusRef = useRef( false );\n\n\tconst settingsKeys = settings.map( ( { id } ) => id );\n\n\tconst [\n\t\tinternalControlValue,\n\t\tsetInternalControlValue,\n\t\tsetInternalURLInputValue,\n\t\tsetInternalTextInputValue,\n\t\tcreateSetInternalSettingValueHandler,\n\t] = useInternalValue( value );\n\n\tconst valueHasChanges =\n\t\tvalue && ! isShallowEqualObjects( internalControlValue, value );\n\n\tconst [ isEditingLink, setIsEditingLink ] = useState(\n\t\tforceIsEditingLink !== undefined\n\t\t\t? forceIsEditingLink\n\t\t\t: ! value || ! value.url\n\t);\n\n\tconst { createPage, isCreatingPage, errorMessage } =\n\t\tuseCreatePage( createSuggestion );\n\n\tuseEffect( () => {\n\t\tif ( forceIsEditingLink === undefined ) {\n\t\t\treturn;\n\t\t}\n\n\t\tsetIsEditingLink( forceIsEditingLink );\n\t}, [ forceIsEditingLink ] );\n\n\tuseEffect( () => {\n\t\t// We don't auto focus into the Link UI on mount\n\t\t// because otherwise using the keyboard to select text\n\t\t// *within* the link format is not possible.\n\t\tif ( isMountingRef.current ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Scenario - when:\n\t\t// - switching between editable and non editable LinkControl\n\t\t// - clicking on a link\n\t\t// ...then move focus to the *first* element to avoid focus loss\n\t\t// and to ensure focus is *within* the Link UI.\n\t\tconst nextFocusTarget =\n\t\t\tfocus.focusable.find( wrapperNode.current )[ 0 ] ||\n\t\t\twrapperNode.current;\n\n\t\tnextFocusTarget.focus();\n\n\t\tisEndingEditWithFocusRef.current = false;\n\t}, [ isEditingLink, isCreatingPage ] );\n\n\t// The component mounting reference is maintained separately\n\t// to correctly reset values in `StrictMode`.\n\tuseEffect( () => {\n\t\tisMountingRef.current = false;\n\n\t\treturn () => {\n\t\t\tisMountingRef.current = true;\n\t\t};\n\t}, [] );\n\n\tconst hasLinkValue = value?.url?.trim()?.length > 0;\n\n\t/**\n\t * Cancels editing state and marks that focus may need to be restored after\n\t * the next render, if focus was within the wrapper when editing finished.\n\t */\n\tconst stopEditing = () => {\n\t\tisEndingEditWithFocusRef.current = !! wrapperNode.current?.contains(\n\t\t\twrapperNode.current.ownerDocument.activeElement\n\t\t);\n\n\t\tsetIsEditingLink( false );\n\t};\n\n\tconst handleSelectSuggestion = ( updatedValue ) => {\n\t\t// Suggestions may contains \"settings\" values (e.g. `opensInNewTab`)\n\t\t// which should not overide any existing settings values set by the\n\t\t// user. This filters out any settings values from the suggestion.\n\t\tconst nonSettingsChanges = Object.keys( updatedValue ).reduce(\n\t\t\t( acc, key ) => {\n\t\t\t\tif ( ! settingsKeys.includes( key ) ) {\n\t\t\t\t\tacc[ key ] = updatedValue[ key ];\n\t\t\t\t}\n\t\t\t\treturn acc;\n\t\t\t},\n\t\t\t{}\n\t\t);\n\n\t\tonChange( {\n\t\t\t...internalControlValue,\n\t\t\t...nonSettingsChanges,\n\t\t\t// As title is not a setting, it must be manually applied\n\t\t\t// in such a way as to preserve the users changes over\n\t\t\t// any \"title\" value provided by the \"suggestion\".\n\t\t\ttitle: internalControlValue?.title || updatedValue?.title,\n\t\t} );\n\n\t\tstopEditing();\n\t};\n\n\tconst handleSubmit = () => {\n\t\tif ( valueHasChanges ) {\n\t\t\t// Submit the original value with new stored values applied\n\t\t\t// on top. URL is a special case as it may also be a prop.\n\t\t\tonChange( {\n\t\t\t\t...value,\n\t\t\t\t...internalControlValue,\n\t\t\t\turl: currentUrlInputValue,\n\t\t\t} );\n\t\t}\n\t\tstopEditing();\n\t};\n\n\tconst handleSubmitWithEnter = ( event ) => {\n\t\tconst { keyCode } = event;\n\n\t\tif (\n\t\t\tkeyCode === ENTER &&\n\t\t\t! currentInputIsEmpty // Disallow submitting empty values.\n\t\t) {\n\t\t\tevent.preventDefault();\n\t\t\thandleSubmit();\n\t\t}\n\t};\n\n\tconst resetInternalValues = () => {\n\t\tsetInternalControlValue( value );\n\t};\n\n\tconst handleCancel = ( event ) => {\n\t\tevent.preventDefault();\n\t\tevent.stopPropagation();\n\n\t\t// Ensure that any unsubmitted input changes are reset.\n\t\tresetInternalValues();\n\n\t\tif ( hasLinkValue ) {\n\t\t\t// If there is a link then exist editing mode and show preview.\n\t\t\tstopEditing();\n\t\t} else {\n\t\t\t// If there is no link value, then remove the link entirely.\n\t\t\tonRemove?.();\n\t\t}\n\n\t\tonCancel?.();\n\t};\n\n\tconst currentUrlInputValue =\n\t\tpropInputValue || internalControlValue?.url || '';\n\n\tconst currentInputIsEmpty = ! currentUrlInputValue?.trim()?.length;\n\n\tconst shownUnlinkControl =\n\t\tonRemove && value && ! isEditingLink && ! isCreatingPage;\n\n\tconst showActions = isEditingLink && hasLinkValue;\n\n\t// Only show text control once a URL value has been committed\n\t// and it isn't just empty whitespace.\n\t// See https://github.com/WordPress/gutenberg/pull/33849/#issuecomment-932194927.\n\tconst showTextControl = hasLinkValue && hasTextControl;\n\n\tconst isEditing = ( isEditingLink || ! value ) && ! isCreatingPage;\n\tconst isDisabled = ! valueHasChanges || currentInputIsEmpty;\n\tconst showSettings = !! settings?.length && isEditingLink && hasLinkValue;\n\n\treturn (\n\t\t<div\n\t\t\ttabIndex={ -1 }\n\t\t\tref={ wrapperNode }\n\t\t\tclassName=\"block-editor-link-control\"\n\t\t>\n\t\t\t{ isCreatingPage && (\n\t\t\t\t<div className=\"block-editor-link-control__loading\">\n\t\t\t\t\t<Spinner /> { __( 'Creating' ) }…\n\t\t\t\t</div>\n\t\t\t) }\n\n\t\t\t{ isEditing && (\n\t\t\t\t<>\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={ clsx( {\n\t\t\t\t\t\t\t'block-editor-link-control__search-input-wrapper': true,\n\t\t\t\t\t\t\t'has-text-control': showTextControl,\n\t\t\t\t\t\t\t'has-actions': showActions,\n\t\t\t\t\t\t} ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ showTextControl && (\n\t\t\t\t\t\t\t<TextControl\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\tref={ textInputRef }\n\t\t\t\t\t\t\t\tclassName=\"block-editor-link-control__field block-editor-link-control__text-content\"\n\t\t\t\t\t\t\t\tlabel={ __( 'Text' ) }\n\t\t\t\t\t\t\t\tvalue={ internalControlValue?.title }\n\t\t\t\t\t\t\t\tonChange={ setInternalTextInputValue }\n\t\t\t\t\t\t\t\tonKeyDown={ handleSubmitWithEnter }\n\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t<LinkControlSearchInput\n\t\t\t\t\t\t\tcurrentLink={ value }\n\t\t\t\t\t\t\tclassName=\"block-editor-link-control__field block-editor-link-control__search-input\"\n\t\t\t\t\t\t\tplaceholder={ searchInputPlaceholder }\n\t\t\t\t\t\t\tvalue={ currentUrlInputValue }\n\t\t\t\t\t\t\twithCreateSuggestion={ withCreateSuggestion }\n\t\t\t\t\t\t\tonCreateSuggestion={ createPage }\n\t\t\t\t\t\t\tonChange={ setInternalURLInputValue }\n\t\t\t\t\t\t\tonSelect={ handleSelectSuggestion }\n\t\t\t\t\t\t\tshowInitialSuggestions={ showInitialSuggestions }\n\t\t\t\t\t\t\tallowDirectEntry={ ! noDirectEntry }\n\t\t\t\t\t\t\tshowSuggestions={ showSuggestions }\n\t\t\t\t\t\t\tsuggestionsQuery={ suggestionsQuery }\n\t\t\t\t\t\t\twithURLSuggestion={ ! noURLSuggestion }\n\t\t\t\t\t\t\tcreateSuggestionButtonText={\n\t\t\t\t\t\t\t\tcreateSuggestionButtonText\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\thideLabelFromVision={ ! showTextControl }\n\t\t\t\t\t\t\tsuffix={\n\t\t\t\t\t\t\t\tshowActions ? undefined : (\n\t\t\t\t\t\t\t\t\t<InputControlSuffixWrapper variant=\"control\">\n\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\tonClick={\n\t\t\t\t\t\t\t\t\t\t\t\tisDisabled ? noop : handleSubmit\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tlabel={ __( 'Submit' ) }\n\t\t\t\t\t\t\t\t\t\t\ticon={ keyboardReturn }\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"block-editor-link-control__search-submit\"\n\t\t\t\t\t\t\t\t\t\t\taria-disabled={ isDisabled }\n\t\t\t\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</InputControlSuffixWrapper>\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tprops\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t\t{ errorMessage && (\n\t\t\t\t\t\t<Notice\n\t\t\t\t\t\t\tclassName=\"block-editor-link-control__search-error\"\n\t\t\t\t\t\t\tstatus=\"error\"\n\t\t\t\t\t\t\tisDismissible={ false }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ errorMessage }\n\t\t\t\t\t\t</Notice>\n\t\t\t\t\t) }\n\t\t\t\t</>\n\t\t\t) }\n\n\t\t\t{ value && ! isEditingLink && ! isCreatingPage && (\n\t\t\t\t<LinkPreview\n\t\t\t\t\tkey={ value?.url } // force remount when URL changes to avoid race conditions for rich previews\n\t\t\t\t\tvalue={ value }\n\t\t\t\t\tonEditClick={ () => setIsEditingLink( true ) }\n\t\t\t\t\thasRichPreviews={ hasRichPreviews }\n\t\t\t\t\thasUnlinkControl={ shownUnlinkControl }\n\t\t\t\t\tonRemove={ () => {\n\t\t\t\t\t\tonRemove();\n\t\t\t\t\t\tsetIsEditingLink( true );\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t) }\n\n\t\t\t{ showSettings && (\n\t\t\t\t<div className=\"block-editor-link-control__tools\">\n\t\t\t\t\t{ ! currentInputIsEmpty && (\n\t\t\t\t\t\t<LinkControlSettingsDrawer\n\t\t\t\t\t\t\tsettingsOpen={ isSettingsOpen }\n\t\t\t\t\t\t\tsetSettingsOpen={ setSettingsOpenWithPreference }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<LinkSettings\n\t\t\t\t\t\t\t\tvalue={ internalControlValue }\n\t\t\t\t\t\t\t\tsettings={ settings }\n\t\t\t\t\t\t\t\tonChange={ createSetInternalSettingValueHandler(\n\t\t\t\t\t\t\t\t\tsettingsKeys\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</LinkControlSettingsDrawer>\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t) }\n\n\t\t\t{ showActions && (\n\t\t\t\t<HStack\n\t\t\t\t\tjustify=\"right\"\n\t\t\t\t\tclassName=\"block-editor-link-control__search-actions\"\n\t\t\t\t>\n\t\t\t\t\t<Button\n\t\t\t\t\t\t// TODO: Switch to `true` (40px size) if possible\n\t\t\t\t\t\t__next40pxDefaultSize={ false }\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\tonClick={ handleCancel }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t\t<Button\n\t\t\t\t\t\t// TODO: Switch to `true` (40px size) if possible\n\t\t\t\t\t\t__next40pxDefaultSize={ false }\n\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\tonClick={ isDisabled ? noop : handleSubmit }\n\t\t\t\t\t\tclassName=\"block-editor-link-control__search-submit\"\n\t\t\t\t\t\taria-disabled={ isDisabled }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Save' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t</HStack>\n\t\t\t) }\n\n\t\t\t{ ! isCreatingPage && renderControlBottom && renderControlBottom() }\n\t\t</div>\n\t);\n}\n\nLinkControl.ViewerFill = ViewerFill;\nLinkControl.DEFAULT_LINK_SETTINGS = DEFAULT_LINK_SETTINGS;\n\nexport default LinkControl;\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,WAAA,GAAAD,OAAA;AAQA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,IAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AACA,IAAAM,eAAA,GAAAN,OAAA;AACA,IAAAO,KAAA,GAAAP,OAAA;AACA,IAAAQ,YAAA,GAAAR,OAAA;AACA,IAAAS,MAAA,GAAAT,OAAA;AAKA,IAAAU,eAAA,GAAAX,sBAAA,CAAAC,OAAA;AACA,IAAAW,YAAA,GAAAZ,sBAAA,CAAAC,OAAA;AACA,IAAAY,YAAA,GAAAb,sBAAA,CAAAC,OAAA;AACA,IAAAa,SAAA,GAAAd,sBAAA,CAAAC,OAAA;AACA,IAAAc,cAAA,GAAAf,sBAAA,CAAAC,OAAA;AACA,IAAAe,iBAAA,GAAAhB,sBAAA,CAA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,qBAAqB,GAAGA,gCAAqB;AAAC,IAAA0I,QAAA,GAAAC,OAAA,CAAA1B,OAAA,GAE3CrH,WAAW","ignoreList":[]}
1
+ {"version":3,"names":["_clsx","_interopRequireDefault","require","_components","_i18n","_element","_dom","_keycodes","_isShallowEqual","_data","_preferences","_icons","_settingsDrawer","_searchInput","_linkPreview","_settings","_useCreatePage","_useInternalValue","_viewerSlot","_constants","_jsxRuntime","noop","PREFERENCE_SCOPE","PREFERENCE_KEY","LinkControl","searchInputPlaceholder","value","settings","DEFAULT_LINK_SETTINGS","onChange","onRemove","onCancel","noDirectEntry","showSuggestions","showInitialSuggestions","forceIsEditingLink","createSuggestion","withCreateSuggestion","inputValue","propInputValue","suggestionsQuery","noURLSuggestion","createSuggestionButtonText","hasRichPreviews","hasTextControl","renderControlBottom","undefined","settingsOpen","setSettingsOpen","useState","advancedSettingsPreference","useSelect","select","_prefsStore$get","prefsStore","preferencesStore","get","set","setPreference","useDispatch","setSettingsOpenWithPreference","prefVal","isSettingsOpen","isMountingRef","useRef","wrapperNode","textInputRef","isEndingEditWithFocusRef","settingsKeys","map","id","internalControlValue","setInternalControlValue","setInternalURLInputValue","setInternalTextInputValue","createSetInternalSettingValueHandler","useInternalValue","valueHasChanges","isShallowEqualObjects","isEditingLink","setIsEditingLink","url","createPage","isCreatingPage","errorMessage","useCreatePage","useEffect","current","nextFocusTarget","focus","focusable","find","hasLinkValue","trim","length","stopEditing","contains","ownerDocument","activeElement","handleSelectSuggestion","updatedValue","nonSettingsChanges","Object","keys","reduce","acc","key","includes","title","handleSubmit","currentUrlInputValue","handleSubmitWithEnter","event","keyCode","ENTER","currentInputIsEmpty","preventDefault","resetInternalValues","handleCancel","stopPropagation","shownUnlinkControl","showActions","showTextControl","isEditing","isDisabled","showSettings","jsxs","tabIndex","ref","className","children","jsx","Spinner","__","Fragment","clsx","TextControl","__nextHasNoMarginBottom","label","onKeyDown","__next40pxDefaultSize","default","currentLink","placeholder","onCreateSuggestion","onSelect","allowDirectEntry","withURLSuggestion","hideLabelFromVision","suffix","__experimentalInputControlSuffixWrapper","variant","Button","onClick","icon","keyboardReturn","size","Notice","status","isDismissible","onEditClick","hasUnlinkControl","__experimentalHStack","justify","ViewerFill","_default","exports"],"sources":["@wordpress/block-editor/src/components/link-control/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tButton,\n\tSpinner,\n\tNotice,\n\tTextControl,\n\t__experimentalHStack as HStack,\n\t__experimentalInputControlSuffixWrapper as InputControlSuffixWrapper,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useRef, useState, useEffect } from '@wordpress/element';\nimport { focus } from '@wordpress/dom';\nimport { ENTER } from '@wordpress/keycodes';\nimport { isShallowEqualObjects } from '@wordpress/is-shallow-equal';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { keyboardReturn } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport LinkControlSettingsDrawer from './settings-drawer';\nimport LinkControlSearchInput from './search-input';\nimport LinkPreview from './link-preview';\nimport LinkSettings from './settings';\nimport useCreatePage from './use-create-page';\nimport useInternalValue from './use-internal-value';\nimport { ViewerFill } from './viewer-slot';\nimport { DEFAULT_LINK_SETTINGS } from './constants';\n\n/**\n * Default properties associated with a link control value.\n *\n * @typedef WPLinkControlDefaultValue\n *\n * @property {string} url Link URL.\n * @property {string=} title Link title.\n * @property {boolean=} opensInNewTab Whether link should open in a new browser\n * tab. This value is only assigned if not\n * providing a custom `settings` prop.\n */\n\n/* eslint-disable jsdoc/valid-types */\n/**\n * Custom settings values associated with a link.\n *\n * @typedef {{[setting:string]:any}} WPLinkControlSettingsValue\n */\n/* eslint-enable */\n\n/**\n * Custom settings values associated with a link.\n *\n * @typedef WPLinkControlSetting\n *\n * @property {string} id Identifier to use as property for setting value.\n * @property {string} title Human-readable label to show in user interface.\n */\n\n/**\n * Properties associated with a link control value, composed as a union of the\n * default properties and any custom settings values.\n *\n * @typedef {WPLinkControlDefaultValue&WPLinkControlSettingsValue} WPLinkControlValue\n */\n\n/** @typedef {(nextValue:WPLinkControlValue)=>void} WPLinkControlOnChangeProp */\n\n/**\n * Properties associated with a search suggestion used within the LinkControl.\n *\n * @typedef WPLinkControlSuggestion\n *\n * @property {string} id Identifier to use to uniquely identify the suggestion.\n * @property {string} type Identifies the type of the suggestion (eg: `post`,\n * `page`, `url`...etc)\n * @property {string} title Human-readable label to show in user interface.\n * @property {string} url A URL for the suggestion.\n */\n\n/** @typedef {(title:string)=>WPLinkControlSuggestion} WPLinkControlCreateSuggestionProp */\n\n/**\n * @typedef WPLinkControlProps\n *\n * @property {(WPLinkControlSetting[])=} settings An array of settings objects. Each object will used to\n * render a `ToggleControl` for that setting.\n * @property {boolean=} forceIsEditingLink If passed as either `true` or `false`, controls the\n * internal editing state of the component to respective\n * show or not show the URL input field.\n * @property {WPLinkControlValue=} value Current link value.\n * @property {WPLinkControlOnChangeProp=} onChange Value change handler, called with the updated value if\n * the user selects a new link or updates settings.\n * @property {boolean=} noDirectEntry Whether to allow turning a URL-like search query directly into a link.\n * @property {boolean=} showSuggestions Whether to present suggestions when typing the URL.\n * @property {boolean=} showInitialSuggestions Whether to present initial suggestions immediately.\n * @property {boolean=} withCreateSuggestion Whether to allow creation of link value from suggestion.\n * @property {Object=} suggestionsQuery Query parameters to pass along to wp.blockEditor.__experimentalFetchLinkSuggestions.\n * @property {boolean=} noURLSuggestion Whether to add a fallback suggestion which treats the search query as a URL.\n * @property {boolean=} hasTextControl Whether to add a text field to the UI to update the value.title.\n * @property {string|Function|undefined} createSuggestionButtonText The text to use in the button that calls createSuggestion.\n * @property {Function} renderControlBottom Optional controls to be rendered at the bottom of the component.\n */\n\nconst noop = () => {};\n\nconst PREFERENCE_SCOPE = 'core/block-editor';\nconst PREFERENCE_KEY = 'linkControlSettingsDrawer';\n\n/**\n * Renders a link control. A link control is a controlled input which maintains\n * a value associated with a link (HTML anchor element) and relevant settings\n * for how that link is expected to behave.\n *\n * @param {WPLinkControlProps} props Component props.\n */\nfunction LinkControl( {\n\tsearchInputPlaceholder,\n\tvalue,\n\tsettings = DEFAULT_LINK_SETTINGS,\n\tonChange = noop,\n\tonRemove,\n\tonCancel,\n\tnoDirectEntry = false,\n\tshowSuggestions = true,\n\tshowInitialSuggestions,\n\tforceIsEditingLink,\n\tcreateSuggestion,\n\twithCreateSuggestion,\n\tinputValue: propInputValue = '',\n\tsuggestionsQuery = {},\n\tnoURLSuggestion = false,\n\tcreateSuggestionButtonText,\n\thasRichPreviews = false,\n\thasTextControl = false,\n\trenderControlBottom = null,\n} ) {\n\tif ( withCreateSuggestion === undefined && createSuggestion ) {\n\t\twithCreateSuggestion = true;\n\t}\n\n\tconst [ settingsOpen, setSettingsOpen ] = useState( false );\n\n\tconst { advancedSettingsPreference } = useSelect( ( select ) => {\n\t\tconst prefsStore = select( preferencesStore );\n\n\t\treturn {\n\t\t\tadvancedSettingsPreference:\n\t\t\t\tprefsStore.get( PREFERENCE_SCOPE, PREFERENCE_KEY ) ?? false,\n\t\t};\n\t}, [] );\n\n\tconst { set: setPreference } = useDispatch( preferencesStore );\n\n\t/**\n\t * Sets the open/closed state of the Advanced Settings Drawer,\n\t * optionlly persisting the state to the user's preferences.\n\t *\n\t * Note that Block Editor components can be consumed by non-WordPress\n\t * environments which may not have preferences setup.\n\t * Therefore a local state is also used as a fallback.\n\t *\n\t * @param {boolean} prefVal the open/closed state of the Advanced Settings Drawer.\n\t */\n\tconst setSettingsOpenWithPreference = ( prefVal ) => {\n\t\tif ( setPreference ) {\n\t\t\tsetPreference( PREFERENCE_SCOPE, PREFERENCE_KEY, prefVal );\n\t\t}\n\t\tsetSettingsOpen( prefVal );\n\t};\n\n\t// Block Editor components can be consumed by non-WordPress environments\n\t// which may not have these preferences setup.\n\t// Therefore a local state is used as a fallback.\n\tconst isSettingsOpen = advancedSettingsPreference || settingsOpen;\n\n\tconst isMountingRef = useRef( true );\n\tconst wrapperNode = useRef();\n\tconst textInputRef = useRef();\n\tconst isEndingEditWithFocusRef = useRef( false );\n\n\tconst settingsKeys = settings.map( ( { id } ) => id );\n\n\tconst [\n\t\tinternalControlValue,\n\t\tsetInternalControlValue,\n\t\tsetInternalURLInputValue,\n\t\tsetInternalTextInputValue,\n\t\tcreateSetInternalSettingValueHandler,\n\t] = useInternalValue( value );\n\n\tconst valueHasChanges =\n\t\tvalue && ! isShallowEqualObjects( internalControlValue, value );\n\n\tconst [ isEditingLink, setIsEditingLink ] = useState(\n\t\tforceIsEditingLink !== undefined\n\t\t\t? forceIsEditingLink\n\t\t\t: ! value || ! value.url\n\t);\n\n\tconst { createPage, isCreatingPage, errorMessage } =\n\t\tuseCreatePage( createSuggestion );\n\n\tuseEffect( () => {\n\t\tif ( forceIsEditingLink === undefined ) {\n\t\t\treturn;\n\t\t}\n\n\t\tsetIsEditingLink( forceIsEditingLink );\n\t}, [ forceIsEditingLink ] );\n\n\tuseEffect( () => {\n\t\t// We don't auto focus into the Link UI on mount\n\t\t// because otherwise using the keyboard to select text\n\t\t// *within* the link format is not possible.\n\t\tif ( isMountingRef.current ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Scenario - when:\n\t\t// - switching between editable and non editable LinkControl\n\t\t// - clicking on a link\n\t\t// ...then move focus to the *first* element to avoid focus loss\n\t\t// and to ensure focus is *within* the Link UI.\n\t\tconst nextFocusTarget =\n\t\t\tfocus.focusable.find( wrapperNode.current )[ 0 ] ||\n\t\t\twrapperNode.current;\n\n\t\tnextFocusTarget.focus();\n\n\t\tisEndingEditWithFocusRef.current = false;\n\t}, [ isEditingLink, isCreatingPage ] );\n\n\t// The component mounting reference is maintained separately\n\t// to correctly reset values in `StrictMode`.\n\tuseEffect( () => {\n\t\tisMountingRef.current = false;\n\n\t\treturn () => {\n\t\t\tisMountingRef.current = true;\n\t\t};\n\t}, [] );\n\n\tconst hasLinkValue = value?.url?.trim()?.length > 0;\n\n\t/**\n\t * Cancels editing state and marks that focus may need to be restored after\n\t * the next render, if focus was within the wrapper when editing finished.\n\t */\n\tconst stopEditing = () => {\n\t\tisEndingEditWithFocusRef.current = !! wrapperNode.current?.contains(\n\t\t\twrapperNode.current.ownerDocument.activeElement\n\t\t);\n\n\t\tsetIsEditingLink( false );\n\t};\n\n\tconst handleSelectSuggestion = ( updatedValue ) => {\n\t\t// Suggestions may contains \"settings\" values (e.g. `opensInNewTab`)\n\t\t// which should not overide any existing settings values set by the\n\t\t// user. This filters out any settings values from the suggestion.\n\t\tconst nonSettingsChanges = Object.keys( updatedValue ).reduce(\n\t\t\t( acc, key ) => {\n\t\t\t\tif ( ! settingsKeys.includes( key ) ) {\n\t\t\t\t\tacc[ key ] = updatedValue[ key ];\n\t\t\t\t}\n\t\t\t\treturn acc;\n\t\t\t},\n\t\t\t{}\n\t\t);\n\n\t\tonChange( {\n\t\t\t...internalControlValue,\n\t\t\t...nonSettingsChanges,\n\t\t\t// As title is not a setting, it must be manually applied\n\t\t\t// in such a way as to preserve the users changes over\n\t\t\t// any \"title\" value provided by the \"suggestion\".\n\t\t\ttitle: internalControlValue?.title || updatedValue?.title,\n\t\t} );\n\n\t\tstopEditing();\n\t};\n\n\tconst handleSubmit = () => {\n\t\tif ( valueHasChanges ) {\n\t\t\t// Submit the original value with new stored values applied\n\t\t\t// on top. URL is a special case as it may also be a prop.\n\t\t\tonChange( {\n\t\t\t\t...value,\n\t\t\t\t...internalControlValue,\n\t\t\t\turl: currentUrlInputValue,\n\t\t\t} );\n\t\t}\n\t\tstopEditing();\n\t};\n\n\tconst handleSubmitWithEnter = ( event ) => {\n\t\tconst { keyCode } = event;\n\n\t\tif (\n\t\t\tkeyCode === ENTER &&\n\t\t\t! currentInputIsEmpty // Disallow submitting empty values.\n\t\t) {\n\t\t\tevent.preventDefault();\n\t\t\thandleSubmit();\n\t\t}\n\t};\n\n\tconst resetInternalValues = () => {\n\t\tsetInternalControlValue( value );\n\t};\n\n\tconst handleCancel = ( event ) => {\n\t\tevent.preventDefault();\n\t\tevent.stopPropagation();\n\n\t\t// Ensure that any unsubmitted input changes are reset.\n\t\tresetInternalValues();\n\n\t\tif ( hasLinkValue ) {\n\t\t\t// If there is a link then exist editing mode and show preview.\n\t\t\tstopEditing();\n\t\t} else {\n\t\t\t// If there is no link value, then remove the link entirely.\n\t\t\tonRemove?.();\n\t\t}\n\n\t\tonCancel?.();\n\t};\n\n\tconst currentUrlInputValue =\n\t\tpropInputValue || internalControlValue?.url || '';\n\n\tconst currentInputIsEmpty = ! currentUrlInputValue?.trim()?.length;\n\n\tconst shownUnlinkControl =\n\t\tonRemove && value && ! isEditingLink && ! isCreatingPage;\n\n\tconst showActions = isEditingLink && hasLinkValue;\n\n\t// Only show text control once a URL value has been committed\n\t// and it isn't just empty whitespace.\n\t// See https://github.com/WordPress/gutenberg/pull/33849/#issuecomment-932194927.\n\tconst showTextControl = hasLinkValue && hasTextControl;\n\n\tconst isEditing = ( isEditingLink || ! value ) && ! isCreatingPage;\n\tconst isDisabled = ! valueHasChanges || currentInputIsEmpty;\n\tconst showSettings = !! settings?.length && isEditingLink && hasLinkValue;\n\n\treturn (\n\t\t<div\n\t\t\ttabIndex={ -1 }\n\t\t\tref={ wrapperNode }\n\t\t\tclassName=\"block-editor-link-control\"\n\t\t>\n\t\t\t{ isCreatingPage && (\n\t\t\t\t<div className=\"block-editor-link-control__loading\">\n\t\t\t\t\t<Spinner /> { __( 'Creating' ) }…\n\t\t\t\t</div>\n\t\t\t) }\n\n\t\t\t{ isEditing && (\n\t\t\t\t<>\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={ clsx( {\n\t\t\t\t\t\t\t'block-editor-link-control__search-input-wrapper': true,\n\t\t\t\t\t\t\t'has-text-control': showTextControl,\n\t\t\t\t\t\t\t'has-actions': showActions,\n\t\t\t\t\t\t} ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ showTextControl && (\n\t\t\t\t\t\t\t<TextControl\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\tref={ textInputRef }\n\t\t\t\t\t\t\t\tclassName=\"block-editor-link-control__field block-editor-link-control__text-content\"\n\t\t\t\t\t\t\t\tlabel={ __( 'Text' ) }\n\t\t\t\t\t\t\t\tvalue={ internalControlValue?.title }\n\t\t\t\t\t\t\t\tonChange={ setInternalTextInputValue }\n\t\t\t\t\t\t\t\tonKeyDown={ handleSubmitWithEnter }\n\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t<LinkControlSearchInput\n\t\t\t\t\t\t\tcurrentLink={ value }\n\t\t\t\t\t\t\tclassName=\"block-editor-link-control__field block-editor-link-control__search-input\"\n\t\t\t\t\t\t\tplaceholder={ searchInputPlaceholder }\n\t\t\t\t\t\t\tvalue={ currentUrlInputValue }\n\t\t\t\t\t\t\twithCreateSuggestion={ withCreateSuggestion }\n\t\t\t\t\t\t\tonCreateSuggestion={ createPage }\n\t\t\t\t\t\t\tonChange={ setInternalURLInputValue }\n\t\t\t\t\t\t\tonSelect={ handleSelectSuggestion }\n\t\t\t\t\t\t\tshowInitialSuggestions={ showInitialSuggestions }\n\t\t\t\t\t\t\tallowDirectEntry={ ! noDirectEntry }\n\t\t\t\t\t\t\tshowSuggestions={ showSuggestions }\n\t\t\t\t\t\t\tsuggestionsQuery={ suggestionsQuery }\n\t\t\t\t\t\t\twithURLSuggestion={ ! noURLSuggestion }\n\t\t\t\t\t\t\tcreateSuggestionButtonText={\n\t\t\t\t\t\t\t\tcreateSuggestionButtonText\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\thideLabelFromVision={ ! showTextControl }\n\t\t\t\t\t\t\tsuffix={\n\t\t\t\t\t\t\t\tshowActions ? undefined : (\n\t\t\t\t\t\t\t\t\t<InputControlSuffixWrapper variant=\"control\">\n\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\tonClick={\n\t\t\t\t\t\t\t\t\t\t\t\tisDisabled ? noop : handleSubmit\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tlabel={ __( 'Submit' ) }\n\t\t\t\t\t\t\t\t\t\t\ticon={ keyboardReturn }\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"block-editor-link-control__search-submit\"\n\t\t\t\t\t\t\t\t\t\t\taria-disabled={ isDisabled }\n\t\t\t\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</InputControlSuffixWrapper>\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t\t{ errorMessage && (\n\t\t\t\t\t\t<Notice\n\t\t\t\t\t\t\tclassName=\"block-editor-link-control__search-error\"\n\t\t\t\t\t\t\tstatus=\"error\"\n\t\t\t\t\t\t\tisDismissible={ false }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ errorMessage }\n\t\t\t\t\t\t</Notice>\n\t\t\t\t\t) }\n\t\t\t\t</>\n\t\t\t) }\n\n\t\t\t{ value && ! isEditingLink && ! isCreatingPage && (\n\t\t\t\t<LinkPreview\n\t\t\t\t\tkey={ value?.url } // force remount when URL changes to avoid race conditions for rich previews\n\t\t\t\t\tvalue={ value }\n\t\t\t\t\tonEditClick={ () => setIsEditingLink( true ) }\n\t\t\t\t\thasRichPreviews={ hasRichPreviews }\n\t\t\t\t\thasUnlinkControl={ shownUnlinkControl }\n\t\t\t\t\tonRemove={ () => {\n\t\t\t\t\t\tonRemove();\n\t\t\t\t\t\tsetIsEditingLink( true );\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t) }\n\n\t\t\t{ showSettings && (\n\t\t\t\t<div className=\"block-editor-link-control__tools\">\n\t\t\t\t\t{ ! currentInputIsEmpty && (\n\t\t\t\t\t\t<LinkControlSettingsDrawer\n\t\t\t\t\t\t\tsettingsOpen={ isSettingsOpen }\n\t\t\t\t\t\t\tsetSettingsOpen={ setSettingsOpenWithPreference }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<LinkSettings\n\t\t\t\t\t\t\t\tvalue={ internalControlValue }\n\t\t\t\t\t\t\t\tsettings={ settings }\n\t\t\t\t\t\t\t\tonChange={ createSetInternalSettingValueHandler(\n\t\t\t\t\t\t\t\t\tsettingsKeys\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</LinkControlSettingsDrawer>\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t) }\n\n\t\t\t{ showActions && (\n\t\t\t\t<HStack\n\t\t\t\t\tjustify=\"right\"\n\t\t\t\t\tclassName=\"block-editor-link-control__search-actions\"\n\t\t\t\t>\n\t\t\t\t\t<Button\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\tonClick={ handleCancel }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t\t<Button\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\tonClick={ isDisabled ? noop : handleSubmit }\n\t\t\t\t\t\tclassName=\"block-editor-link-control__search-submit\"\n\t\t\t\t\t\taria-disabled={ isDisabled }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Save' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t</HStack>\n\t\t\t) }\n\n\t\t\t{ ! isCreatingPage && renderControlBottom && renderControlBottom() }\n\t\t</div>\n\t);\n}\n\nLinkControl.ViewerFill = ViewerFill;\nLinkControl.DEFAULT_LINK_SETTINGS = DEFAULT_LINK_SETTINGS;\n\nexport default LinkControl;\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,WAAA,G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IAAAG,QAAE,EAAE,QAAS;MAAC,CACT,CAAC,eACT,IAAAjH,WAAA,CAAA+G,GAAA,EAAChI,WAAA,CAAAqJ,MAAM;QACNZ,qBAAqB;QACrBW,OAAO,EAAC,SAAS;QACjBE,OAAO,EAAG7B,UAAU,GAAGvG,IAAI,GAAGwF,YAAc;QAC5CoB,SAAS,EAAC,0CAA0C;QACpD,iBAAgBL,UAAY;QAAAM,QAAA,EAE1B,IAAAG,QAAE,EAAE,MAAO;MAAC,CACP,CAAC;IAAA,CACF,CACR,EAEC,CAAElD,cAAc,IAAItC,mBAAmB,IAAIA,mBAAmB,CAAC,CAAC;EAAA,CAC9D,CAAC;AAER;AAEArB,WAAW,CAAC4I,UAAU,GAAGA,sBAAU;AACnC5I,WAAW,CAACI,qBAAqB,GAAGA,gCAAqB;AAAC,IAAAyI,QAAA,GAAAC,OAAA,CAAAzB,OAAA,GAE3CrH,WAAW","ignoreList":[]}
@@ -25,10 +25,8 @@ function LinkSettingsDrawer({
25
25
  const id = (0, _compose.useInstanceId)(LinkSettingsDrawer);
26
26
  const settingsDrawerId = `link-control-settings-drawer-${id}`;
27
27
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
28
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button
29
- // TODO: Switch to `true` (40px size) if possible
30
- , {
31
- __next40pxDefaultSize: false,
28
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
29
+ __next40pxDefaultSize: true,
32
30
  className: "block-editor-link-control__drawer-toggle",
33
31
  "aria-expanded": settingsOpen,
34
32
  onClick: () => setSettingsOpen(!settingsOpen),
@@ -1 +1 @@
1
- {"version":3,"names":["_components","require","_icons","_compose","_i18n","_element","_jsxRuntime","LinkSettingsDrawer","children","settingsOpen","setSettingsOpen","prefersReducedMotion","useReducedMotion","MaybeAnimatePresence","Fragment","AnimatePresence","MaybeMotionDiv","motion","div","id","useInstanceId","settingsDrawerId","jsxs","jsx","Button","__next40pxDefaultSize","className","onClick","icon","isRTL","chevronLeftSmall","chevronRightSmall","_x","hidden","initial","animate","exit","variants","open","opacity","height","collapsed","transition","duration","_default","exports","default"],"sources":["@wordpress/block-editor/src/components/link-control/settings-drawer.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tButton,\n\t__unstableMotion as motion,\n\t__unstableAnimatePresence as AnimatePresence,\n} from '@wordpress/components';\nimport { chevronLeftSmall, chevronRightSmall } from '@wordpress/icons';\nimport { useReducedMotion, useInstanceId } from '@wordpress/compose';\nimport { _x, isRTL } from '@wordpress/i18n';\nimport { Fragment } from '@wordpress/element';\n\nfunction LinkSettingsDrawer( { children, settingsOpen, setSettingsOpen } ) {\n\tconst prefersReducedMotion = useReducedMotion();\n\tconst MaybeAnimatePresence = prefersReducedMotion\n\t\t? Fragment\n\t\t: AnimatePresence;\n\tconst MaybeMotionDiv = prefersReducedMotion ? 'div' : motion.div;\n\n\tconst id = useInstanceId( LinkSettingsDrawer );\n\n\tconst settingsDrawerId = `link-control-settings-drawer-${ id }`;\n\n\treturn (\n\t\t<>\n\t\t\t<Button\n\t\t\t\t// TODO: Switch to `true` (40px size) if possible\n\t\t\t\t__next40pxDefaultSize={ false }\n\t\t\t\tclassName=\"block-editor-link-control__drawer-toggle\"\n\t\t\t\taria-expanded={ settingsOpen }\n\t\t\t\tonClick={ () => setSettingsOpen( ! settingsOpen ) }\n\t\t\t\ticon={ isRTL() ? chevronLeftSmall : chevronRightSmall }\n\t\t\t\taria-controls={ settingsDrawerId }\n\t\t\t>\n\t\t\t\t{ _x( 'Advanced', 'Additional link settings' ) }\n\t\t\t</Button>\n\t\t\t<MaybeAnimatePresence>\n\t\t\t\t{ settingsOpen && (\n\t\t\t\t\t<MaybeMotionDiv\n\t\t\t\t\t\tclassName=\"block-editor-link-control__drawer\"\n\t\t\t\t\t\thidden={ ! settingsOpen }\n\t\t\t\t\t\tid={ settingsDrawerId }\n\t\t\t\t\t\tinitial=\"collapsed\"\n\t\t\t\t\t\tanimate=\"open\"\n\t\t\t\t\t\texit=\"collapsed\"\n\t\t\t\t\t\tvariants={ {\n\t\t\t\t\t\t\topen: { opacity: 1, height: 'auto' },\n\t\t\t\t\t\t\tcollapsed: { opacity: 0, height: 0 },\n\t\t\t\t\t\t} }\n\t\t\t\t\t\ttransition={ {\n\t\t\t\t\t\t\tduration: 0.1,\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t<div className=\"block-editor-link-control__drawer-inner\">\n\t\t\t\t\t\t\t{ children }\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</MaybeMotionDiv>\n\t\t\t\t) }\n\t\t\t</MaybeAnimatePresence>\n\t\t</>\n\t);\n}\n\nexport default LinkSettingsDrawer;\n"],"mappings":";;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAKA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AAA8C,IAAAK,WAAA,GAAAL,OAAA;AAX9C;AACA;AACA;;AAWA,SAASM,kBAAkBA,CAAE;EAAEC,QAAQ;EAAEC,YAAY;EAAEC;AAAgB,CAAC,EAAG;EAC1E,MAAMC,oBAAoB,GAAG,IAAAC,yBAAgB,EAAC,CAAC;EAC/C,MAAMC,oBAAoB,GAAGF,oBAAoB,GAC9CG,iBAAQ,GACRC,qCAAe;EAClB,MAAMC,cAAc,GAAGL,oBAAoB,GAAG,KAAK,GAAGM,4BAAM,CAACC,GAAG;EAEhE,MAAMC,EAAE,GAAG,IAAAC,sBAAa,EAAEb,kBAAmB,CAAC;EAE9C,MAAMc,gBAAgB,GAAI,gCAAgCF,EAAI,EAAC;EAE/D,oBACC,IAAAb,WAAA,CAAAgB,IAAA,EAAAhB,WAAA,CAAAQ,QAAA;IAAAN,QAAA,gBACC,IAAAF,WAAA,CAAAiB,GAAA,EAACvB,WAAA,CAAAwB;IACA;IAAA;MACAC,qBAAqB,EAAG,KAAO;MAC/BC,SAAS,EAAC,0CAA0C;MACpD,iBAAgBjB,YAAc;MAC9BkB,OAAO,EAAGA,CAAA,KAAMjB,eAAe,CAAE,CAAED,YAAa,CAAG;MACnDmB,IAAI,EAAG,IAAAC,WAAK,EAAC,CAAC,GAAGC,uBAAgB,GAAGC,wBAAmB;MACvD,iBAAgBV,gBAAkB;MAAAb,QAAA,EAEhC,IAAAwB,QAAE,EAAE,UAAU,EAAE,0BAA2B;IAAC,CACvC,CAAC,eACT,IAAA1B,WAAA,CAAAiB,GAAA,EAACV,oBAAoB;MAAAL,QAAA,EAClBC,YAAY,iBACb,IAAAH,WAAA,CAAAiB,GAAA,EAACP,cAAc;QACdU,SAAS,EAAC,mCAAmC;QAC7CO,MAAM,EAAG,CAAExB,YAAc;QACzBU,EAAE,EAAGE,gBAAkB;QACvBa,OAAO,EAAC,WAAW;QACnBC,OAAO,EAAC,MAAM;QACdC,IAAI,EAAC,WAAW;QAChBC,QAAQ,EAAG;UACVC,IAAI,EAAE;YAAEC,OAAO,EAAE,CAAC;YAAEC,MAAM,EAAE;UAAO,CAAC;UACpCC,SAAS,EAAE;YAAEF,OAAO,EAAE,CAAC;YAAEC,MAAM,EAAE;UAAE;QACpC,CAAG;QACHE,UAAU,EAAG;UACZC,QAAQ,EAAE;QACX,CAAG;QAAAnC,QAAA,eAEH,IAAAF,WAAA,CAAAiB,GAAA;UAAKG,SAAS,EAAC,yCAAyC;UAAAlB,QAAA,EACrDA;QAAQ,CACN;MAAC,CACS;IAChB,CACoB,CAAC;EAAA,CACtB,CAAC;AAEL;AAAC,IAAAoC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEcvC,kBAAkB","ignoreList":[]}
1
+ {"version":3,"names":["_components","require","_icons","_compose","_i18n","_element","_jsxRuntime","LinkSettingsDrawer","children","settingsOpen","setSettingsOpen","prefersReducedMotion","useReducedMotion","MaybeAnimatePresence","Fragment","AnimatePresence","MaybeMotionDiv","motion","div","id","useInstanceId","settingsDrawerId","jsxs","jsx","Button","__next40pxDefaultSize","className","onClick","icon","isRTL","chevronLeftSmall","chevronRightSmall","_x","hidden","initial","animate","exit","variants","open","opacity","height","collapsed","transition","duration","_default","exports","default"],"sources":["@wordpress/block-editor/src/components/link-control/settings-drawer.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tButton,\n\t__unstableMotion as motion,\n\t__unstableAnimatePresence as AnimatePresence,\n} from '@wordpress/components';\nimport { chevronLeftSmall, chevronRightSmall } from '@wordpress/icons';\nimport { useReducedMotion, useInstanceId } from '@wordpress/compose';\nimport { _x, isRTL } from '@wordpress/i18n';\nimport { Fragment } from '@wordpress/element';\n\nfunction LinkSettingsDrawer( { children, settingsOpen, setSettingsOpen } ) {\n\tconst prefersReducedMotion = useReducedMotion();\n\tconst MaybeAnimatePresence = prefersReducedMotion\n\t\t? Fragment\n\t\t: AnimatePresence;\n\tconst MaybeMotionDiv = prefersReducedMotion ? 'div' : motion.div;\n\n\tconst id = useInstanceId( LinkSettingsDrawer );\n\n\tconst settingsDrawerId = `link-control-settings-drawer-${ id }`;\n\n\treturn (\n\t\t<>\n\t\t\t<Button\n\t\t\t\t__next40pxDefaultSize\n\t\t\t\tclassName=\"block-editor-link-control__drawer-toggle\"\n\t\t\t\taria-expanded={ settingsOpen }\n\t\t\t\tonClick={ () => setSettingsOpen( ! settingsOpen ) }\n\t\t\t\ticon={ isRTL() ? chevronLeftSmall : chevronRightSmall }\n\t\t\t\taria-controls={ settingsDrawerId }\n\t\t\t>\n\t\t\t\t{ _x( 'Advanced', 'Additional link settings' ) }\n\t\t\t</Button>\n\t\t\t<MaybeAnimatePresence>\n\t\t\t\t{ settingsOpen && (\n\t\t\t\t\t<MaybeMotionDiv\n\t\t\t\t\t\tclassName=\"block-editor-link-control__drawer\"\n\t\t\t\t\t\thidden={ ! settingsOpen }\n\t\t\t\t\t\tid={ settingsDrawerId }\n\t\t\t\t\t\tinitial=\"collapsed\"\n\t\t\t\t\t\tanimate=\"open\"\n\t\t\t\t\t\texit=\"collapsed\"\n\t\t\t\t\t\tvariants={ {\n\t\t\t\t\t\t\topen: { opacity: 1, height: 'auto' },\n\t\t\t\t\t\t\tcollapsed: { opacity: 0, height: 0 },\n\t\t\t\t\t\t} }\n\t\t\t\t\t\ttransition={ {\n\t\t\t\t\t\t\tduration: 0.1,\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t<div className=\"block-editor-link-control__drawer-inner\">\n\t\t\t\t\t\t\t{ children }\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</MaybeMotionDiv>\n\t\t\t\t) }\n\t\t\t</MaybeAnimatePresence>\n\t\t</>\n\t);\n}\n\nexport default LinkSettingsDrawer;\n"],"mappings":";;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAKA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AAA8C,IAAAK,WAAA,GAAAL,OAAA;AAX9C;AACA;AACA;;AAWA,SAASM,kBAAkBA,CAAE;EAAEC,QAAQ;EAAEC,YAAY;EAAEC;AAAgB,CAAC,EAAG;EAC1E,MAAMC,oBAAoB,GAAG,IAAAC,yBAAgB,EAAC,CAAC;EAC/C,MAAMC,oBAAoB,GAAGF,oBAAoB,GAC9CG,iBAAQ,GACRC,qCAAe;EAClB,MAAMC,cAAc,GAAGL,oBAAoB,GAAG,KAAK,GAAGM,4BAAM,CAACC,GAAG;EAEhE,MAAMC,EAAE,GAAG,IAAAC,sBAAa,EAAEb,kBAAmB,CAAC;EAE9C,MAAMc,gBAAgB,GAAI,gCAAgCF,EAAI,EAAC;EAE/D,oBACC,IAAAb,WAAA,CAAAgB,IAAA,EAAAhB,WAAA,CAAAQ,QAAA;IAAAN,QAAA,gBACC,IAAAF,WAAA,CAAAiB,GAAA,EAACvB,WAAA,CAAAwB,MAAM;MACNC,qBAAqB;MACrBC,SAAS,EAAC,0CAA0C;MACpD,iBAAgBjB,YAAc;MAC9BkB,OAAO,EAAGA,CAAA,KAAMjB,eAAe,CAAE,CAAED,YAAa,CAAG;MACnDmB,IAAI,EAAG,IAAAC,WAAK,EAAC,CAAC,GAAGC,uBAAgB,GAAGC,wBAAmB;MACvD,iBAAgBV,gBAAkB;MAAAb,QAAA,EAEhC,IAAAwB,QAAE,EAAE,UAAU,EAAE,0BAA2B;IAAC,CACvC,CAAC,eACT,IAAA1B,WAAA,CAAAiB,GAAA,EAACV,oBAAoB;MAAAL,QAAA,EAClBC,YAAY,iBACb,IAAAH,WAAA,CAAAiB,GAAA,EAACP,cAAc;QACdU,SAAS,EAAC,mCAAmC;QAC7CO,MAAM,EAAG,CAAExB,YAAc;QACzBU,EAAE,EAAGE,gBAAkB;QACvBa,OAAO,EAAC,WAAW;QACnBC,OAAO,EAAC,MAAM;QACdC,IAAI,EAAC,WAAW;QAChBC,QAAQ,EAAG;UACVC,IAAI,EAAE;YAAEC,OAAO,EAAE,CAAC;YAAEC,MAAM,EAAE;UAAO,CAAC;UACpCC,SAAS,EAAE;YAAEF,OAAO,EAAE,CAAC;YAAEC,MAAM,EAAE;UAAE;QACpC,CAAG;QACHE,UAAU,EAAG;UACZC,QAAQ,EAAE;QACX,CAAG;QAAAnC,QAAA,eAEH,IAAAF,WAAA,CAAAiB,GAAA;UAAKG,SAAS,EAAC,yCAAyC;UAAAlB,QAAA,EACrDA;QAAQ,CACN;MAAC,CACS;IAChB,CACoB,CAAC;EAAA,CACtB,CAAC;AAEL;AAAC,IAAAoC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEcvC,kBAAkB","ignoreList":[]}
@@ -5,18 +5,11 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.default = void 0;
8
- var _clsx = _interopRequireDefault(require("clsx"));
9
- var _data = require("@wordpress/data");
10
8
  var _element = require("@wordpress/element");
11
9
  var _blockSelectButton = _interopRequireDefault(require("./block-select-button"));
12
10
  var _blockDraggable = _interopRequireDefault(require("../block-draggable"));
13
- var _store = require("../../store");
14
11
  var _context = require("./context");
15
12
  var _jsxRuntime = require("react/jsx-runtime");
16
- /**
17
- * External dependencies
18
- */
19
-
20
13
  /**
21
14
  * WordPress dependencies
22
15
  */
@@ -40,28 +33,11 @@ const ListViewBlockContents = (0, _element.forwardRef)(({
40
33
  const {
41
34
  clientId
42
35
  } = block;
43
- const {
44
- blockMovingClientId,
45
- selectedBlockInBlockEditor
46
- } = (0, _data.useSelect)(select => {
47
- const {
48
- hasBlockMovingClientId,
49
- getSelectedBlockClientId
50
- } = select(_store.store);
51
- return {
52
- blockMovingClientId: hasBlockMovingClientId(),
53
- selectedBlockInBlockEditor: getSelectedBlockClientId()
54
- };
55
- }, []);
56
36
  const {
57
37
  AdditionalBlockContent,
58
38
  insertedBlock,
59
39
  setInsertedBlock
60
40
  } = (0, _context.useListViewContext)();
61
- const isBlockMoveTarget = blockMovingClientId && selectedBlockInBlockEditor === clientId;
62
- const className = (0, _clsx.default)('block-editor-list-view-block-contents', {
63
- 'is-dropping-before': isBlockMoveTarget
64
- });
65
41
 
66
42
  // Only include all selected blocks if the currently clicked on block
67
43
  // is one of the selected blocks. This ensures that if a user attempts
@@ -83,7 +59,7 @@ const ListViewBlockContents = (0, _element.forwardRef)(({
83
59
  onDragEnd
84
60
  }) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_blockSelectButton.default, {
85
61
  ref: ref,
86
- className: className,
62
+ className: "block-editor-list-view-block-contents",
87
63
  block: block,
88
64
  onClick: onClick,
89
65
  onToggleExpanded: onToggleExpanded,
@@ -1 +1 @@
1
- {"version":3,"names":["_clsx","_interopRequireDefault","require","_data","_element","_blockSelectButton","_blockDraggable","_store","_context","_jsxRuntime","ListViewBlockContents","forwardRef","onClick","onToggleExpanded","block","isSelected","position","siblingBlockCount","level","isExpanded","selectedClientIds","props","ref","clientId","blockMovingClientId","selectedBlockInBlockEditor","useSelect","select","hasBlockMovingClientId","getSelectedBlockClientId","blockEditorStore","AdditionalBlockContent","insertedBlock","setInsertedBlock","useListViewContext","isBlockMoveTarget","className","clsx","draggableClientIds","includes","jsxs","Fragment","children","jsx","default","appendToOwnerDocument","clientIds","cloneClassname","draggable","onDragStart","onDragEnd","_default","exports"],"sources":["@wordpress/block-editor/src/components/list-view/block-contents.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport ListViewBlockSelectButton from './block-select-button';\nimport BlockDraggable from '../block-draggable';\nimport { store as blockEditorStore } from '../../store';\nimport { useListViewContext } from './context';\n\nconst ListViewBlockContents = forwardRef(\n\t(\n\t\t{\n\t\t\tonClick,\n\t\t\tonToggleExpanded,\n\t\t\tblock,\n\t\t\tisSelected,\n\t\t\tposition,\n\t\t\tsiblingBlockCount,\n\t\t\tlevel,\n\t\t\tisExpanded,\n\t\t\tselectedClientIds,\n\t\t\t...props\n\t\t},\n\t\tref\n\t) => {\n\t\tconst { clientId } = block;\n\n\t\tconst { blockMovingClientId, selectedBlockInBlockEditor } = useSelect(\n\t\t\t( select ) => {\n\t\t\t\tconst { hasBlockMovingClientId, getSelectedBlockClientId } =\n\t\t\t\t\tselect( blockEditorStore );\n\t\t\t\treturn {\n\t\t\t\t\tblockMovingClientId: hasBlockMovingClientId(),\n\t\t\t\t\tselectedBlockInBlockEditor: getSelectedBlockClientId(),\n\t\t\t\t};\n\t\t\t},\n\t\t\t[]\n\t\t);\n\n\t\tconst { AdditionalBlockContent, insertedBlock, setInsertedBlock } =\n\t\t\tuseListViewContext();\n\n\t\tconst isBlockMoveTarget =\n\t\t\tblockMovingClientId && selectedBlockInBlockEditor === clientId;\n\n\t\tconst className = clsx( 'block-editor-list-view-block-contents', {\n\t\t\t'is-dropping-before': isBlockMoveTarget,\n\t\t} );\n\n\t\t// Only include all selected blocks if the currently clicked on block\n\t\t// is one of the selected blocks. This ensures that if a user attempts\n\t\t// to drag a block that isn't part of the selection, they're still able\n\t\t// to drag it and rearrange its position.\n\t\tconst draggableClientIds = selectedClientIds.includes( clientId )\n\t\t\t? selectedClientIds\n\t\t\t: [ clientId ];\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{ AdditionalBlockContent && (\n\t\t\t\t\t<AdditionalBlockContent\n\t\t\t\t\t\tblock={ block }\n\t\t\t\t\t\tinsertedBlock={ insertedBlock }\n\t\t\t\t\t\tsetInsertedBlock={ setInsertedBlock }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t<BlockDraggable\n\t\t\t\t\tappendToOwnerDocument\n\t\t\t\t\tclientIds={ draggableClientIds }\n\t\t\t\t\tcloneClassname=\"block-editor-list-view-draggable-chip\"\n\t\t\t\t>\n\t\t\t\t\t{ ( { draggable, onDragStart, onDragEnd } ) => (\n\t\t\t\t\t\t<ListViewBlockSelectButton\n\t\t\t\t\t\t\tref={ ref }\n\t\t\t\t\t\t\tclassName={ className }\n\t\t\t\t\t\t\tblock={ block }\n\t\t\t\t\t\t\tonClick={ onClick }\n\t\t\t\t\t\t\tonToggleExpanded={ onToggleExpanded }\n\t\t\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\t\t\tposition={ position }\n\t\t\t\t\t\t\tsiblingBlockCount={ siblingBlockCount }\n\t\t\t\t\t\t\tlevel={ level }\n\t\t\t\t\t\t\tdraggable={ draggable }\n\t\t\t\t\t\t\tonDragStart={ onDragStart }\n\t\t\t\t\t\t\tonDragEnd={ onDragEnd }\n\t\t\t\t\t\t\tisExpanded={ isExpanded }\n\t\t\t\t\t\t\t{ ...props }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</BlockDraggable>\n\t\t\t</>\n\t\t);\n\t}\n);\n\nexport default ListViewBlockContents;\n"],"mappings":";;;;;;;AAGA,IAAAA,KA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,CAAEhB,QAAS,CAAC,GAC9DH,iBAAiB,GACjB,CAAEG,QAAQ,CAAE;EAEf,oBACC,IAAAd,WAAA,CAAA+B,IAAA,EAAA/B,WAAA,CAAAgC,QAAA;IAAAC,QAAA,GACGX,sBAAsB,iBACvB,IAAAtB,WAAA,CAAAkC,GAAA,EAACZ,sBAAsB;MACtBjB,KAAK,EAAGA,KAAO;MACfkB,aAAa,EAAGA,aAAe;MAC/BC,gBAAgB,EAAGA;IAAkB,CACrC,CACD,eACD,IAAAxB,WAAA,CAAAkC,GAAA,EAACrC,eAAA,CAAAsC,OAAc;MACdC,qBAAqB;MACrBC,SAAS,EAAGR,kBAAoB;MAChCS,cAAc,EAAC,uCAAuC;MAAAL,QAAA,EAEpDA,CAAE;QAAEM,SAAS;QAAEC,WAAW;QAAEC;MAAU,CAAC,kBACxC,IAAAzC,WAAA,CAAAkC,GAAA,EAACtC,kBAAA,CAAAuC,OAAyB;QACzBtB,GAAG,EAAGA,GAAK;QACXc,SAAS,EAAGA,SAAW;QACvBtB,KAAK,EAAGA,KAAO;QACfF,OAAO,EAAGA,OAAS;QACnBC,gBAAgB,EAAGA,gBAAkB;QACrCE,UAAU,EAAGA,UAAY;QACzBC,QAAQ,EAAGA,QAAU;QACrBC,iBAAiB,EAAGA,iBAAmB;QACvCC,KAAK,EAAGA,KAAO;QACf8B,SAAS,EAAGA,SAAW;QACvBC,WAAW,EAAGA,WAAa;QAC3BC,SAAS,EAAGA,SAAW;QACvB/B,UAAU,EAAGA,UAAY;QAAA,GACpBE;MAAK,CACV;IACD,CACc,CAAC;EAAA,CAChB,CAAC;AAEL,CACD,CAAC;AAAC,IAAA8B,QAAA,GAAAC,OAAA,CAAAR,OAAA,GAEalC,qBAAqB","ignoreList":[]}
1
+ {"version":3,"names":["_element","require","_blockSelectButton","_interopRequireDefault","_blockDraggable","_context","_jsxRuntime","ListViewBlockContents","forwardRef","onClick","onToggleExpanded","block","isSelected","position","siblingBlockCount","level","isExpanded","selectedClientIds","props","ref","clientId","AdditionalBlockContent","insertedBlock","setInsertedBlock","useListViewContext","draggableClientIds","includes","jsxs","Fragment","children","jsx","default","appendToOwnerDocument","clientIds","cloneClassname","draggable","onDragStart","onDragEnd","className","_default","exports"],"sources":["@wordpress/block-editor/src/components/list-view/block-contents.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport ListViewBlockSelectButton from './block-select-button';\nimport BlockDraggable from '../block-draggable';\nimport { useListViewContext } from './context';\n\nconst ListViewBlockContents = forwardRef(\n\t(\n\t\t{\n\t\t\tonClick,\n\t\t\tonToggleExpanded,\n\t\t\tblock,\n\t\t\tisSelected,\n\t\t\tposition,\n\t\t\tsiblingBlockCount,\n\t\t\tlevel,\n\t\t\tisExpanded,\n\t\t\tselectedClientIds,\n\t\t\t...props\n\t\t},\n\t\tref\n\t) => {\n\t\tconst { clientId } = block;\n\t\tconst { AdditionalBlockContent, insertedBlock, setInsertedBlock } =\n\t\t\tuseListViewContext();\n\n\t\t// Only include all selected blocks if the currently clicked on block\n\t\t// is one of the selected blocks. This ensures that if a user attempts\n\t\t// to drag a block that isn't part of the selection, they're still able\n\t\t// to drag it and rearrange its position.\n\t\tconst draggableClientIds = selectedClientIds.includes( clientId )\n\t\t\t? selectedClientIds\n\t\t\t: [ clientId ];\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{ AdditionalBlockContent && (\n\t\t\t\t\t<AdditionalBlockContent\n\t\t\t\t\t\tblock={ block }\n\t\t\t\t\t\tinsertedBlock={ insertedBlock }\n\t\t\t\t\t\tsetInsertedBlock={ setInsertedBlock }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t<BlockDraggable\n\t\t\t\t\tappendToOwnerDocument\n\t\t\t\t\tclientIds={ draggableClientIds }\n\t\t\t\t\tcloneClassname=\"block-editor-list-view-draggable-chip\"\n\t\t\t\t>\n\t\t\t\t\t{ ( { draggable, onDragStart, onDragEnd } ) => (\n\t\t\t\t\t\t<ListViewBlockSelectButton\n\t\t\t\t\t\t\tref={ ref }\n\t\t\t\t\t\t\tclassName=\"block-editor-list-view-block-contents\"\n\t\t\t\t\t\t\tblock={ block }\n\t\t\t\t\t\t\tonClick={ onClick }\n\t\t\t\t\t\t\tonToggleExpanded={ onToggleExpanded }\n\t\t\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\t\t\tposition={ position }\n\t\t\t\t\t\t\tsiblingBlockCount={ siblingBlockCount }\n\t\t\t\t\t\t\tlevel={ level }\n\t\t\t\t\t\t\tdraggable={ draggable }\n\t\t\t\t\t\t\tonDragStart={ onDragStart }\n\t\t\t\t\t\t\tonDragEnd={ onDragEnd }\n\t\t\t\t\t\t\tisExpanded={ isExpanded }\n\t\t\t\t\t\t\t{ ...props }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</BlockDraggable>\n\t\t\t</>\n\t\t);\n\t}\n);\n\nexport default ListViewBlockContents;\n"],"mappings":";;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AAKA,IAAAC,kBAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,eAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AAA+C,IAAAK,WAAA,GAAAL,OAAA;AAV/C;AACA;AACA;;AAGA;AACA;AACA;;AAKA,MAAMM,qBAAqB,GAAG,IAAAC,mBAAU,EACvC,CACC;EACCC,OAAO;EACPC,gBAAgB;EAChBC,KAAK;EACLC,UAAU;EACVC,QAAQ;EACRC,iBAAiB;EACjBC,KAAK;EACLC,UAAU;EACVC,iBAAiB;EACjB,GAAGC;AACJ,CAAC,EACDC,GAAG,KACC;EACJ,MAAM;IAAEC;EAAS,CAAC,GAAGT,KAAK;EAC1B,MAAM;IAAEU,sBAAsB;IAAEC,aAAa;IAAEC;EAAiB,CAAC,GAChE,IAAAC,2BAAkB,EAAC,CAAC;;EAErB;EACA;EAC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jsxRuntime.jsxs)(_components.Button
89
- // TODO: Switch to `true` (40px size) if possible
90
- , {
91
- __next40pxDefaultSize: false,
88
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)("a", {
92
89
  className: (0, _clsx.default)('block-editor-list-view-block-select-button', className),
93
90
  onClick: onClick,
94
91
  onContextMenu: onContextMenu,
@@ -1 +1 @@
1
- {"version":3,"names":["_clsx","_interopRequireDefault","require","_components","_element","_icons","_keycodes","_data","_blockIcon","_useBlockDisplayInformation","_useBlockDisplayTitle","_expander","_blockLock","_useListViewImages","_store","_jsxRuntime","ListViewBlockSelectButton","className","block","clientId","onClick","onContextMenu","onMouseDown","onToggleExpanded","tabIndex","onFocus","onDragStart","onDragEnd","draggable","isExpanded","ariaDescribedBy","ref","blockInformation","useBlockDisplayInformation","blockTitle","useBlockDisplayTitle","context","isLocked","useBlockLock","isContentOnly","useSelect","select","blockEditorStore","getBlockEditingMode","shouldShowLockIcon","isSticky","positionType","images","useListViewImages","onDragStartHandler","event","dataTransfer","clearData","onKeyDown","keyCode","ENTER","SPACE","jsxs","Button","__next40pxDefaultSize","clsx","href","children","jsx","default","icon","showColors","__experimentalHStack","alignment","justify","spacing","__experimentalTruncate","ellipsizeMode","anchor","Icon","pinSmall","length","map","image","index","style","backgroundImage","url","zIndex","lock","_default","exports","forwardRef"],"sources":["@wordpress/block-editor/src/components/list-view/block-select-button.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tButton,\n\t__experimentalHStack as HStack,\n\t__experimentalTruncate as Truncate,\n} from '@wordpress/components';\nimport { forwardRef } from '@wordpress/element';\nimport { Icon, lockSmall as lock, pinSmall } from '@wordpress/icons';\nimport { SPACE, ENTER } from '@wordpress/keycodes';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport BlockIcon from '../block-icon';\nimport useBlockDisplayInformation from '../use-block-display-information';\nimport useBlockDisplayTitle from '../block-title/use-block-display-title';\nimport ListViewExpander from './expander';\nimport { useBlockLock } from '../block-lock';\nimport useListViewImages from './use-list-view-images';\nimport { store as blockEditorStore } from '../../store';\n\nfunction ListViewBlockSelectButton(\n\t{\n\t\tclassName,\n\t\tblock: { clientId },\n\t\tonClick,\n\t\tonContextMenu,\n\t\tonMouseDown,\n\t\tonToggleExpanded,\n\t\ttabIndex,\n\t\tonFocus,\n\t\tonDragStart,\n\t\tonDragEnd,\n\t\tdraggable,\n\t\tisExpanded,\n\t\tariaDescribedBy,\n\t},\n\tref\n) {\n\tconst blockInformation = useBlockDisplayInformation( clientId );\n\tconst blockTitle = useBlockDisplayTitle( {\n\t\tclientId,\n\t\tcontext: 'list-view',\n\t} );\n\tconst { isLocked } = useBlockLock( clientId );\n\tconst { isContentOnly } = useSelect(\n\t\t( select ) => ( {\n\t\t\tisContentOnly:\n\t\t\t\tselect( blockEditorStore ).getBlockEditingMode( clientId ) ===\n\t\t\t\t'contentOnly',\n\t\t} ),\n\t\t[ clientId ]\n\t);\n\tconst shouldShowLockIcon = isLocked && ! isContentOnly;\n\tconst isSticky = blockInformation?.positionType === 'sticky';\n\tconst images = useListViewImages( { clientId, isExpanded } );\n\n\t// The `href` attribute triggers the browser's native HTML drag operations.\n\t// When the link is dragged, the element's outerHTML is set in DataTransfer object as text/html.\n\t// We need to clear any HTML drag data to prevent `pasteHandler` from firing\n\t// inside the `useOnBlockDrop` hook.\n\tconst onDragStartHandler = ( event ) => {\n\t\tevent.dataTransfer.clearData();\n\t\tonDragStart?.( event );\n\t};\n\n\t/**\n\t * @param {KeyboardEvent} event\n\t */\n\tfunction onKeyDown( event ) {\n\t\tif ( event.keyCode === ENTER || event.keyCode === SPACE ) {\n\t\t\tonClick( event );\n\t\t}\n\t}\n\n\treturn (\n\t\t<Button\n\t\t\t// TODO: Switch to `true` (40px size) if possible\n\t\t\t__next40pxDefaultSize={ false }\n\t\t\tclassName={ clsx(\n\t\t\t\t'block-editor-list-view-block-select-button',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t\tonClick={ onClick }\n\t\t\tonContextMenu={ onContextMenu }\n\t\t\tonKeyDown={ onKeyDown }\n\t\t\tonMouseDown={ onMouseDown }\n\t\t\tref={ ref }\n\t\t\ttabIndex={ tabIndex }\n\t\t\tonFocus={ onFocus }\n\t\t\tonDragStart={ onDragStartHandler }\n\t\t\tonDragEnd={ onDragEnd }\n\t\t\tdraggable={ draggable }\n\t\t\thref={ `#block-${ clientId }` }\n\t\t\taria-describedby={ ariaDescribedBy }\n\t\t\taria-expanded={ isExpanded }\n\t\t>\n\t\t\t<ListViewExpander onClick={ onToggleExpanded } />\n\t\t\t<BlockIcon\n\t\t\t\ticon={ blockInformation?.icon }\n\t\t\t\tshowColors\n\t\t\t\tcontext=\"list-view\"\n\t\t\t/>\n\t\t\t<HStack\n\t\t\t\talignment=\"center\"\n\t\t\t\tclassName=\"block-editor-list-view-block-select-button__label-wrapper\"\n\t\t\t\tjustify=\"flex-start\"\n\t\t\t\tspacing={ 1 }\n\t\t\t>\n\t\t\t\t<span className=\"block-editor-list-view-block-select-button__title\">\n\t\t\t\t\t<Truncate ellipsizeMode=\"auto\">{ blockTitle }</Truncate>\n\t\t\t\t</span>\n\t\t\t\t{ blockInformation?.anchor && (\n\t\t\t\t\t<span className=\"block-editor-list-view-block-select-button__anchor-wrapper\">\n\t\t\t\t\t\t<Truncate\n\t\t\t\t\t\t\tclassName=\"block-editor-list-view-block-select-button__anchor\"\n\t\t\t\t\t\t\tellipsizeMode=\"auto\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ blockInformation.anchor }\n\t\t\t\t\t\t</Truncate>\n\t\t\t\t\t</span>\n\t\t\t\t) }\n\t\t\t\t{ isSticky && (\n\t\t\t\t\t<span className=\"block-editor-list-view-block-select-button__sticky\">\n\t\t\t\t\t\t<Icon icon={ pinSmall } />\n\t\t\t\t\t</span>\n\t\t\t\t) }\n\t\t\t\t{ images.length ? (\n\t\t\t\t\t<span\n\t\t\t\t\t\tclassName=\"block-editor-list-view-block-select-button__images\"\n\t\t\t\t\t\taria-hidden\n\t\t\t\t\t>\n\t\t\t\t\t\t{ images.map( ( image, index ) => (\n\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\tclassName=\"block-editor-list-view-block-select-button__image\"\n\t\t\t\t\t\t\t\tkey={ image.clientId }\n\t\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\t\tbackgroundImage: `url(${ image.url })`,\n\t\t\t\t\t\t\t\t\tzIndex: images.length - index, // Ensure the first image is on top, and subsequent images are behind.\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) ) }\n\t\t\t\t\t</span>\n\t\t\t\t) : null }\n\t\t\t\t{ shouldShowLockIcon && (\n\t\t\t\t\t<span className=\"block-editor-list-view-block-select-button__lock\">\n\t\t\t\t\t\t<Icon icon={ lock } />\n\t\t\t\t\t</span>\n\t\t\t\t) }\n\t\t\t</HStack>\n\t\t</Button>\n\t);\n}\n\nexport default forwardRef( ListViewBlockSelectButton );\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,WAAA,GAAAD,OAAA;AAKA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AAKA,IAAAM,UAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,2BAAA,GAAAR,sBAAA,CAAAC,OAAA;AACA,IAAAQ,qBAAA,GAAAT,sBAAA,CAAAC,OAAA;AACA,IAAAS,SAAA,GAAAV,sBAAA,CAAAC,OAAA;AACA,IAAAU,UAAA,GAAAV,OAAA;AACA,IAAAW,kBAAA,GAAAZ,sBAAA,CAAAC,OAAA;AACA,IAAAY,MAAA,GAAAZ,OAAA;AAAwD,IAAAa,WAAA,GAAAb,OAAA;AA3BxD;AACA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GAAAC,OAAA,CAAAtB,OAAA,GAEc,IAAAuB,mBAAU,EAAEvE,yBAA0B,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_clsx","_interopRequireDefault","require","_components","_element","_icons","_keycodes","_data","_blockIcon","_useBlockDisplayInformation","_useBlockDisplayTitle","_expander","_blockLock","_useListViewImages","_store","_jsxRuntime","ListViewBlockSelectButton","className","block","clientId","onClick","onContextMenu","onMouseDown","onToggleExpanded","tabIndex","onFocus","onDragStart","onDragEnd","draggable","isExpanded","ariaDescribedBy","ref","blockInformation","useBlockDisplayInformation","blockTitle","useBlockDisplayTitle","context","isLocked","useBlockLock","isContentOnly","useSelect","select","blockEditorStore","getBlockEditingMode","shouldShowLockIcon","isSticky","positionType","images","useListViewImages","onDragStartHandler","event","dataTransfer","clearData","onKeyDown","keyCode","ENTER","SPACE","jsxs","clsx","href","children","jsx","default","icon","showColors","__experimentalHStack","alignment","justify","spacing","__experimentalTruncate","ellipsizeMode","anchor","Icon","pinSmall","length","map","image","index","style","backgroundImage","url","zIndex","lock","_default","exports","forwardRef"],"sources":["@wordpress/block-editor/src/components/list-view/block-select-button.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalHStack as HStack,\n\t__experimentalTruncate as Truncate,\n} from '@wordpress/components';\nimport { forwardRef } from '@wordpress/element';\nimport { Icon, lockSmall as lock, pinSmall } from '@wordpress/icons';\nimport { SPACE, ENTER } from '@wordpress/keycodes';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport BlockIcon from '../block-icon';\nimport useBlockDisplayInformation from '../use-block-display-information';\nimport useBlockDisplayTitle from '../block-title/use-block-display-title';\nimport ListViewExpander from './expander';\nimport { useBlockLock } from '../block-lock';\nimport useListViewImages from './use-list-view-images';\nimport { store as blockEditorStore } from '../../store';\n\nfunction ListViewBlockSelectButton(\n\t{\n\t\tclassName,\n\t\tblock: { clientId },\n\t\tonClick,\n\t\tonContextMenu,\n\t\tonMouseDown,\n\t\tonToggleExpanded,\n\t\ttabIndex,\n\t\tonFocus,\n\t\tonDragStart,\n\t\tonDragEnd,\n\t\tdraggable,\n\t\tisExpanded,\n\t\tariaDescribedBy,\n\t},\n\tref\n) {\n\tconst blockInformation = useBlockDisplayInformation( clientId );\n\tconst blockTitle = useBlockDisplayTitle( {\n\t\tclientId,\n\t\tcontext: 'list-view',\n\t} );\n\tconst { isLocked } = useBlockLock( clientId );\n\tconst { isContentOnly } = useSelect(\n\t\t( select ) => ( {\n\t\t\tisContentOnly:\n\t\t\t\tselect( blockEditorStore ).getBlockEditingMode( clientId ) ===\n\t\t\t\t'contentOnly',\n\t\t} ),\n\t\t[ clientId ]\n\t);\n\tconst shouldShowLockIcon = isLocked && ! isContentOnly;\n\tconst isSticky = blockInformation?.positionType === 'sticky';\n\tconst images = useListViewImages( { clientId, isExpanded } );\n\n\t// The `href` attribute triggers the browser's native HTML drag operations.\n\t// When the link is dragged, the element's outerHTML is set in DataTransfer object as text/html.\n\t// We need to clear any HTML drag data to prevent `pasteHandler` from firing\n\t// inside the `useOnBlockDrop` hook.\n\tconst onDragStartHandler = ( event ) => {\n\t\tevent.dataTransfer.clearData();\n\t\tonDragStart?.( event );\n\t};\n\n\t/**\n\t * @param {KeyboardEvent} event\n\t */\n\tfunction onKeyDown( event ) {\n\t\tif ( event.keyCode === ENTER || event.keyCode === SPACE ) {\n\t\t\tonClick( event );\n\t\t}\n\t}\n\n\treturn (\n\t\t<a\n\t\t\tclassName={ clsx(\n\t\t\t\t'block-editor-list-view-block-select-button',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t\tonClick={ onClick }\n\t\t\tonContextMenu={ onContextMenu }\n\t\t\tonKeyDown={ onKeyDown }\n\t\t\tonMouseDown={ onMouseDown }\n\t\t\tref={ ref }\n\t\t\ttabIndex={ tabIndex }\n\t\t\tonFocus={ onFocus }\n\t\t\tonDragStart={ onDragStartHandler }\n\t\t\tonDragEnd={ onDragEnd }\n\t\t\tdraggable={ draggable }\n\t\t\thref={ `#block-${ clientId }` }\n\t\t\taria-describedby={ ariaDescribedBy }\n\t\t\taria-expanded={ isExpanded }\n\t\t>\n\t\t\t<ListViewExpander onClick={ onToggleExpanded } />\n\t\t\t<BlockIcon\n\t\t\t\ticon={ blockInformation?.icon }\n\t\t\t\tshowColors\n\t\t\t\tcontext=\"list-view\"\n\t\t\t/>\n\t\t\t<HStack\n\t\t\t\talignment=\"center\"\n\t\t\t\tclassName=\"block-editor-list-view-block-select-button__label-wrapper\"\n\t\t\t\tjustify=\"flex-start\"\n\t\t\t\tspacing={ 1 }\n\t\t\t>\n\t\t\t\t<span className=\"block-editor-list-view-block-select-button__title\">\n\t\t\t\t\t<Truncate ellipsizeMode=\"auto\">{ blockTitle }</Truncate>\n\t\t\t\t</span>\n\t\t\t\t{ blockInformation?.anchor && (\n\t\t\t\t\t<span className=\"block-editor-list-view-block-select-button__anchor-wrapper\">\n\t\t\t\t\t\t<Truncate\n\t\t\t\t\t\t\tclassName=\"block-editor-list-view-block-select-button__anchor\"\n\t\t\t\t\t\t\tellipsizeMode=\"auto\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ blockInformation.anchor }\n\t\t\t\t\t\t</Truncate>\n\t\t\t\t\t</span>\n\t\t\t\t) }\n\t\t\t\t{ isSticky && (\n\t\t\t\t\t<span className=\"block-editor-list-view-block-select-button__sticky\">\n\t\t\t\t\t\t<Icon icon={ pinSmall } />\n\t\t\t\t\t</span>\n\t\t\t\t) }\n\t\t\t\t{ images.length ? (\n\t\t\t\t\t<span\n\t\t\t\t\t\tclassName=\"block-editor-list-view-block-select-button__images\"\n\t\t\t\t\t\taria-hidden\n\t\t\t\t\t>\n\t\t\t\t\t\t{ images.map( ( image, index ) => (\n\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\tclassName=\"block-editor-list-view-block-select-button__image\"\n\t\t\t\t\t\t\t\tkey={ image.clientId }\n\t\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\t\tbackgroundImage: `url(${ image.url })`,\n\t\t\t\t\t\t\t\t\tzIndex: images.length - index, // Ensure the first image is on top, and subsequent images are behind.\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) ) }\n\t\t\t\t\t</span>\n\t\t\t\t) : null }\n\t\t\t\t{ shouldShowLockIcon && (\n\t\t\t\t\t<span className=\"block-editor-list-view-block-select-button__lock\">\n\t\t\t\t\t\t<Icon icon={ lock } />\n\t\t\t\t\t</span>\n\t\t\t\t) }\n\t\t\t</HStack>\n\t\t</a>\n\t);\n}\n\nexport default forwardRef( ListViewBlockSelectButton );\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,WAAA,GAAAD,OAAA;AAIA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AAKA,IAAAM,UAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,2BAAA,GAAAR,sBAAA,CAAAC,OAAA;AACA,IAAAQ,qBAAA,GAAAT,sBAAA,CAAAC,OAAA;AACA,IAAAS,SAAA,GAAAV,sBAAA,CAAAC,OAAA;AACA,IAAAU,UAAA,GAAAV,OAAA;AACA,IAAAW,kBAAA,GAAAZ,sBAAA,CAAAC,OAAA;AACA,IAAAY,MAAA,GAAAZ,OAAA;AAAwD,IAAAa,WAAA,GAAAb,OAAA;AA1BxD;AACA;AACA;;AAGA;AACA;AACA;;AAUA;AACA;AACA;;AASA,SAASc,yBAAyBA,CACjC;EACCC,SAAS;EACTC,KAAK,EAAE;IAAEC;EAAS,CAAC;EACnBC,OAAO;EACPC,aAAa;EACbC,WAAW;EACXC,gBAAgB;EAChBC,QAAQ;EACRC,OAAO;EACPC,WAAW;EACXC,SAAS;EACTC,SAAS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