@wordpress/block-editor 14.5.0 → 14.6.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 (431) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/README.md +0 -8
  3. package/build/autocompleters/block.js +13 -5
  4. package/build/autocompleters/block.js.map +1 -1
  5. package/build/components/block-canvas/index.js +10 -0
  6. package/build/components/block-canvas/index.js.map +1 -1
  7. package/build/components/block-card/index.js +2 -2
  8. package/build/components/block-card/index.js.map +1 -1
  9. package/build/components/block-full-height-alignment-control/index.js +1 -1
  10. package/build/components/block-full-height-alignment-control/index.js.map +1 -1
  11. package/build/components/block-list/block.js +1 -1
  12. package/build/components/block-list/block.js.map +1 -1
  13. package/build/components/block-list/block.native.js +1 -7
  14. package/build/components/block-list/block.native.js.map +1 -1
  15. package/build/components/block-list/index.js +5 -5
  16. package/build/components/block-list/index.js.map +1 -1
  17. package/build/components/block-list/use-block-props/index.js +1 -2
  18. package/build/components/block-list/use-block-props/index.js.map +1 -1
  19. package/build/components/block-list/use-block-props/use-focus-first-element.js +4 -3
  20. package/build/components/block-list/use-block-props/use-focus-first-element.js.map +1 -1
  21. package/build/components/block-list/use-block-props/use-selected-block-event-handlers.js +3 -6
  22. package/build/components/block-list/use-block-props/use-selected-block-event-handlers.js.map +1 -1
  23. package/build/components/block-list/use-in-between-inserter.js +1 -1
  24. package/build/components/block-list/use-in-between-inserter.js.map +1 -1
  25. package/build/components/block-patterns-paging/index.js +1 -1
  26. package/build/components/block-patterns-paging/index.js.map +1 -1
  27. package/build/components/block-popover/index.js +2 -45
  28. package/build/components/block-popover/index.js.map +1 -1
  29. package/build/components/block-preview/index.js +2 -2
  30. package/build/components/block-preview/index.js.map +1 -1
  31. package/build/components/block-settings-menu/block-settings-dropdown.js +5 -0
  32. package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  33. package/build/components/block-settings-menu/index.js +4 -3
  34. package/build/components/block-settings-menu/index.js.map +1 -1
  35. package/build/components/block-toolbar/change-design.js +122 -0
  36. package/build/components/block-toolbar/change-design.js.map +1 -0
  37. package/build/components/block-toolbar/index.js +19 -7
  38. package/build/components/block-toolbar/index.js.map +1 -1
  39. package/build/components/block-tools/index.js +4 -10
  40. package/build/components/block-tools/index.js.map +1 -1
  41. package/build/components/block-tools/insertion-point.js +4 -3
  42. package/build/components/block-tools/insertion-point.js.map +1 -1
  43. package/build/components/block-tools/use-show-block-tools.js +3 -9
  44. package/build/components/block-tools/use-show-block-tools.js.map +1 -1
  45. package/build/components/block-tools/zoom-out-mode-inserters.js +20 -29
  46. package/build/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
  47. package/build/components/block-variation-transforms/index.js +2 -2
  48. package/build/components/block-variation-transforms/index.js.map +1 -1
  49. package/build/components/block-vertical-alignment-control/ui.js +6 -10
  50. package/build/components/block-vertical-alignment-control/ui.js.map +1 -1
  51. package/build/components/border-radius-control/linked-button.js +7 -10
  52. package/build/components/border-radius-control/linked-button.js.map +1 -1
  53. package/build/components/collab/block-comment-icon-slot.js +18 -0
  54. package/build/components/collab/block-comment-icon-slot.js.map +1 -0
  55. package/build/components/collab/block-comment-icon-toolbar-slot.js +18 -0
  56. package/build/components/collab/block-comment-icon-toolbar-slot.js.map +1 -0
  57. package/build/components/colors-gradients/use-multiple-origin-colors-and-gradients.js +7 -1
  58. package/build/components/colors-gradients/use-multiple-origin-colors-and-gradients.js.map +1 -1
  59. package/build/components/convert-to-group-buttons/toolbar.js +4 -4
  60. package/build/components/convert-to-group-buttons/toolbar.js.map +1 -1
  61. package/build/components/global-styles/color-panel.js +1 -4
  62. package/build/components/global-styles/color-panel.js.map +1 -1
  63. package/build/components/global-styles/use-global-styles-context.native.js +6 -0
  64. package/build/components/global-styles/use-global-styles-context.native.js.map +1 -1
  65. package/build/components/iframe/index.js +17 -22
  66. package/build/components/iframe/index.js.map +1 -1
  67. package/build/components/image-size-control/index.js +61 -20
  68. package/build/components/image-size-control/index.js.map +1 -1
  69. package/build/components/inner-blocks/index.js +9 -5
  70. package/build/components/inner-blocks/index.js.map +1 -1
  71. package/build/components/inserter/block-patterns-tab/pattern-category-previews.js +2 -2
  72. package/build/components/inserter/block-patterns-tab/pattern-category-previews.js.map +1 -1
  73. package/build/components/inserter/block-patterns-tab/patterns-filter.js +1 -1
  74. package/build/components/inserter/block-patterns-tab/patterns-filter.js.map +1 -1
  75. package/build/components/inserter/category-tabs/index.js +15 -2
  76. package/build/components/inserter/category-tabs/index.js.map +1 -1
  77. package/build/components/inserter/menu.js +4 -2
  78. package/build/components/inserter/menu.js.map +1 -1
  79. package/build/components/inserter-button/index.native.js +1 -1
  80. package/build/components/inserter-button/index.native.js.map +1 -1
  81. package/build/components/inspector-controls-tabs/index.js +0 -2
  82. package/build/components/inspector-controls-tabs/index.js.map +1 -1
  83. package/build/components/inspector-controls-tabs/utils.js +3 -6
  84. package/build/components/inspector-controls-tabs/utils.js.map +1 -1
  85. package/build/components/link-control/link-preview.js +12 -9
  86. package/build/components/link-control/link-preview.js.map +1 -1
  87. package/build/components/list-view/appender.js +4 -3
  88. package/build/components/list-view/appender.js.map +1 -1
  89. package/build/components/list-view/branch.js +6 -5
  90. package/build/components/list-view/branch.js.map +1 -1
  91. package/build/components/list-view/index.js +1 -2
  92. package/build/components/list-view/index.js.map +1 -1
  93. package/build/components/provider/index.js +1 -1
  94. package/build/components/provider/index.js.map +1 -1
  95. package/build/components/rich-text/event-listeners/index.js +3 -1
  96. package/build/components/rich-text/event-listeners/index.js.map +1 -1
  97. package/build/components/rich-text/index.native.js +2 -6
  98. package/build/components/rich-text/index.native.js.map +1 -1
  99. package/build/components/spacing-sizes-control/index.js +2 -2
  100. package/build/components/spacing-sizes-control/index.js.map +1 -1
  101. package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js +3 -3
  102. package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
  103. package/build/components/spacing-sizes-control/linked-button.js +1 -5
  104. package/build/components/spacing-sizes-control/linked-button.js.map +1 -1
  105. package/build/components/tool-selector/index.js +1 -4
  106. package/build/components/tool-selector/index.js.map +1 -1
  107. package/build/components/url-input/index.js +1 -1
  108. package/build/components/url-input/index.js.map +1 -1
  109. package/build/components/use-block-commands/index.js +1 -1
  110. package/build/components/use-block-commands/index.js.map +1 -1
  111. package/build/components/use-block-drop-zone/index.js +5 -5
  112. package/build/components/use-block-drop-zone/index.js.map +1 -1
  113. package/build/components/use-block-drop-zone/index.native.js +0 -1
  114. package/build/components/use-block-drop-zone/index.native.js.map +1 -1
  115. package/build/components/use-moving-animation/index.js +1 -3
  116. package/build/components/use-moving-animation/index.js.map +1 -1
  117. package/build/components/use-settings/index.js +1 -3
  118. package/build/components/use-settings/index.js.map +1 -1
  119. package/build/components/writing-flow/index.js +5 -3
  120. package/build/components/writing-flow/index.js.map +1 -1
  121. package/build/components/writing-flow/use-tab-nav.js +2 -3
  122. package/build/components/writing-flow/use-tab-nav.js.map +1 -1
  123. package/build/hooks/block-bindings.js +19 -8
  124. package/build/hooks/block-bindings.js.map +1 -1
  125. package/build/hooks/contrast-checker.js +0 -1
  126. package/build/hooks/contrast-checker.js.map +1 -1
  127. package/build/hooks/duotone.js +2 -2
  128. package/build/hooks/duotone.js.map +1 -1
  129. package/build/hooks/style.js +4 -1
  130. package/build/hooks/style.js.map +1 -1
  131. package/build/hooks/use-zoom-out.js +13 -22
  132. package/build/hooks/use-zoom-out.js.map +1 -1
  133. package/build/index.js +0 -7
  134. package/build/index.js.map +1 -1
  135. package/build/private-apis.js +6 -3
  136. package/build/private-apis.js.map +1 -1
  137. package/build/store/actions.js +2 -33
  138. package/build/store/actions.js.map +1 -1
  139. package/build/store/defaults.js +1 -1
  140. package/build/store/defaults.js.map +1 -1
  141. package/build/store/private-actions.js +57 -8
  142. package/build/store/private-actions.js.map +1 -1
  143. package/build/store/private-selectors.js +9 -21
  144. package/build/store/private-selectors.js.map +1 -1
  145. package/build/store/reducer.js +16 -6
  146. package/build/store/reducer.js.map +1 -1
  147. package/build/store/selectors.js +44 -7
  148. package/build/store/selectors.js.map +1 -1
  149. package/build/utils/dom.js +16 -1
  150. package/build/utils/dom.js.map +1 -1
  151. package/build/utils/get-font-styles-and-weights.js +1 -1
  152. package/build/utils/get-font-styles-and-weights.js.map +1 -1
  153. package/build/utils/transform-styles/index.js +4 -3
  154. package/build/utils/transform-styles/index.js.map +1 -1
  155. package/build-module/autocompleters/block.js +14 -6
  156. package/build-module/autocompleters/block.js.map +1 -1
  157. package/build-module/components/block-canvas/index.js +11 -1
  158. package/build-module/components/block-canvas/index.js.map +1 -1
  159. package/build-module/components/block-card/index.js +3 -3
  160. package/build-module/components/block-card/index.js.map +1 -1
  161. package/build-module/components/block-full-height-alignment-control/index.js +1 -1
  162. package/build-module/components/block-full-height-alignment-control/index.js.map +1 -1
  163. package/build-module/components/block-list/block.js +1 -1
  164. package/build-module/components/block-list/block.js.map +1 -1
  165. package/build-module/components/block-list/block.native.js +1 -7
  166. package/build-module/components/block-list/block.native.js.map +1 -1
  167. package/build-module/components/block-list/index.js +5 -5
  168. package/build-module/components/block-list/index.js.map +1 -1
  169. package/build-module/components/block-list/use-block-props/index.js +1 -2
  170. package/build-module/components/block-list/use-block-props/index.js.map +1 -1
  171. package/build-module/components/block-list/use-block-props/use-focus-first-element.js +4 -3
  172. package/build-module/components/block-list/use-block-props/use-focus-first-element.js.map +1 -1
  173. package/build-module/components/block-list/use-block-props/use-selected-block-event-handlers.js +3 -6
  174. package/build-module/components/block-list/use-block-props/use-selected-block-event-handlers.js.map +1 -1
  175. package/build-module/components/block-list/use-in-between-inserter.js +1 -1
  176. package/build-module/components/block-list/use-in-between-inserter.js.map +1 -1
  177. package/build-module/components/block-patterns-paging/index.js +1 -1
  178. package/build-module/components/block-patterns-paging/index.js.map +1 -1
  179. package/build-module/components/block-popover/index.js +2 -45
  180. package/build-module/components/block-popover/index.js.map +1 -1
  181. package/build-module/components/block-preview/index.js +2 -2
  182. package/build-module/components/block-preview/index.js.map +1 -1
  183. package/build-module/components/block-settings-menu/block-settings-dropdown.js +5 -0
  184. package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  185. package/build-module/components/block-settings-menu/index.js +5 -4
  186. package/build-module/components/block-settings-menu/index.js.map +1 -1
  187. package/build-module/components/block-toolbar/change-design.js +114 -0
  188. package/build-module/components/block-toolbar/change-design.js.map +1 -0
  189. package/build-module/components/block-toolbar/index.js +19 -7
  190. package/build-module/components/block-toolbar/index.js.map +1 -1
  191. package/build-module/components/block-tools/index.js +4 -10
  192. package/build-module/components/block-tools/index.js.map +1 -1
  193. package/build-module/components/block-tools/insertion-point.js +4 -3
  194. package/build-module/components/block-tools/insertion-point.js.map +1 -1
  195. package/build-module/components/block-tools/use-show-block-tools.js +3 -9
  196. package/build-module/components/block-tools/use-show-block-tools.js.map +1 -1
  197. package/build-module/components/block-tools/zoom-out-mode-inserters.js +20 -29
  198. package/build-module/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
  199. package/build-module/components/block-variation-transforms/index.js +2 -2
  200. package/build-module/components/block-variation-transforms/index.js.map +1 -1
  201. package/build-module/components/block-vertical-alignment-control/ui.js +6 -10
  202. package/build-module/components/block-vertical-alignment-control/ui.js.map +1 -1
  203. package/build-module/components/border-radius-control/linked-button.js +8 -11
  204. package/build-module/components/border-radius-control/linked-button.js.map +1 -1
  205. package/build-module/components/collab/block-comment-icon-slot.js +11 -0
  206. package/build-module/components/collab/block-comment-icon-slot.js.map +1 -0
  207. package/build-module/components/collab/block-comment-icon-toolbar-slot.js +11 -0
  208. package/build-module/components/collab/block-comment-icon-toolbar-slot.js.map +1 -0
  209. package/build-module/components/colors-gradients/use-multiple-origin-colors-and-gradients.js +7 -1
  210. package/build-module/components/colors-gradients/use-multiple-origin-colors-and-gradients.js.map +1 -1
  211. package/build-module/components/convert-to-group-buttons/toolbar.js +4 -4
  212. package/build-module/components/convert-to-group-buttons/toolbar.js.map +1 -1
  213. package/build-module/components/global-styles/color-panel.js +2 -5
  214. package/build-module/components/global-styles/color-panel.js.map +1 -1
  215. package/build-module/components/global-styles/use-global-styles-context.native.js +6 -0
  216. package/build-module/components/global-styles/use-global-styles-context.native.js.map +1 -1
  217. package/build-module/components/iframe/index.js +17 -22
  218. package/build-module/components/iframe/index.js.map +1 -1
  219. package/build-module/components/image-size-control/index.js +62 -21
  220. package/build-module/components/image-size-control/index.js.map +1 -1
  221. package/build-module/components/inner-blocks/index.js +9 -5
  222. package/build-module/components/inner-blocks/index.js.map +1 -1
  223. package/build-module/components/inserter/block-patterns-tab/pattern-category-previews.js +2 -2
  224. package/build-module/components/inserter/block-patterns-tab/pattern-category-previews.js.map +1 -1
  225. package/build-module/components/inserter/block-patterns-tab/patterns-filter.js +1 -1
  226. package/build-module/components/inserter/block-patterns-tab/patterns-filter.js.map +1 -1
  227. package/build-module/components/inserter/category-tabs/index.js +15 -2
  228. package/build-module/components/inserter/category-tabs/index.js.map +1 -1
  229. package/build-module/components/inserter/menu.js +5 -3
  230. package/build-module/components/inserter/menu.js.map +1 -1
  231. package/build-module/components/inserter-button/index.native.js +1 -1
  232. package/build-module/components/inserter-button/index.native.js.map +1 -1
  233. package/build-module/components/inspector-controls-tabs/index.js +0 -2
  234. package/build-module/components/inspector-controls-tabs/index.js.map +1 -1
  235. package/build-module/components/inspector-controls-tabs/utils.js +3 -6
  236. package/build-module/components/inspector-controls-tabs/utils.js.map +1 -1
  237. package/build-module/components/link-control/link-preview.js +13 -10
  238. package/build-module/components/link-control/link-preview.js.map +1 -1
  239. package/build-module/components/list-view/appender.js +4 -3
  240. package/build-module/components/list-view/appender.js.map +1 -1
  241. package/build-module/components/list-view/branch.js +7 -6
  242. package/build-module/components/list-view/branch.js.map +1 -1
  243. package/build-module/components/list-view/index.js +1 -2
  244. package/build-module/components/list-view/index.js.map +1 -1
  245. package/build-module/components/provider/index.js +1 -1
  246. package/build-module/components/provider/index.js.map +1 -1
  247. package/build-module/components/rich-text/event-listeners/index.js +4 -2
  248. package/build-module/components/rich-text/event-listeners/index.js.map +1 -1
  249. package/build-module/components/rich-text/index.native.js +2 -6
  250. package/build-module/components/rich-text/index.native.js.map +1 -1
  251. package/build-module/components/spacing-sizes-control/index.js +3 -3
  252. package/build-module/components/spacing-sizes-control/index.js.map +1 -1
  253. package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js +4 -4
  254. package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
  255. package/build-module/components/spacing-sizes-control/linked-button.js +2 -6
  256. package/build-module/components/spacing-sizes-control/linked-button.js.map +1 -1
  257. package/build-module/components/tool-selector/index.js +1 -4
  258. package/build-module/components/tool-selector/index.js.map +1 -1
  259. package/build-module/components/url-input/index.js +1 -1
  260. package/build-module/components/url-input/index.js.map +1 -1
  261. package/build-module/components/use-block-commands/index.js +1 -1
  262. package/build-module/components/use-block-commands/index.js.map +1 -1
  263. package/build-module/components/use-block-drop-zone/index.js +5 -5
  264. package/build-module/components/use-block-drop-zone/index.js.map +1 -1
  265. package/build-module/components/use-block-drop-zone/index.native.js +0 -1
  266. package/build-module/components/use-block-drop-zone/index.native.js.map +1 -1
  267. package/build-module/components/use-moving-animation/index.js +1 -3
  268. package/build-module/components/use-moving-animation/index.js.map +1 -1
  269. package/build-module/components/use-settings/index.js +1 -3
  270. package/build-module/components/use-settings/index.js.map +1 -1
  271. package/build-module/components/writing-flow/index.js +5 -3
  272. package/build-module/components/writing-flow/index.js.map +1 -1
  273. package/build-module/components/writing-flow/use-tab-nav.js +2 -3
  274. package/build-module/components/writing-flow/use-tab-nav.js.map +1 -1
  275. package/build-module/hooks/block-bindings.js +20 -9
  276. package/build-module/hooks/block-bindings.js.map +1 -1
  277. package/build-module/hooks/contrast-checker.js +0 -1
  278. package/build-module/hooks/contrast-checker.js.map +1 -1
  279. package/build-module/hooks/duotone.js +2 -2
  280. package/build-module/hooks/duotone.js.map +1 -1
  281. package/build-module/hooks/style.js +4 -1
  282. package/build-module/hooks/style.js.map +1 -1
  283. package/build-module/hooks/use-zoom-out.js +15 -23
  284. package/build-module/hooks/use-zoom-out.js.map +1 -1
  285. package/build-module/index.js +1 -1
  286. package/build-module/index.js.map +1 -1
  287. package/build-module/private-apis.js +7 -5
  288. package/build-module/private-apis.js.map +1 -1
  289. package/build-module/store/actions.js +2 -33
  290. package/build-module/store/actions.js.map +1 -1
  291. package/build-module/store/defaults.js +1 -1
  292. package/build-module/store/defaults.js.map +1 -1
  293. package/build-module/store/private-actions.js +54 -7
  294. package/build-module/store/private-actions.js.map +1 -1
  295. package/build-module/store/private-selectors.js +9 -20
  296. package/build-module/store/private-selectors.js.map +1 -1
  297. package/build-module/store/reducer.js +16 -6
  298. package/build-module/store/reducer.js.map +1 -1
  299. package/build-module/store/selectors.js +45 -8
  300. package/build-module/store/selectors.js.map +1 -1
  301. package/build-module/utils/dom.js +16 -1
  302. package/build-module/utils/dom.js.map +1 -1
  303. package/build-module/utils/get-font-styles-and-weights.js +2 -2
  304. package/build-module/utils/get-font-styles-and-weights.js.map +1 -1
  305. package/build-module/utils/transform-styles/index.js +3 -2
  306. package/build-module/utils/transform-styles/index.js.map +1 -1
  307. package/build-style/content-rtl.css +9 -4
  308. package/build-style/content.css +9 -4
  309. package/build-style/style-rtl.css +33 -22
  310. package/build-style/style.css +33 -22
  311. package/build-types/utils/dom.d.ts.map +1 -1
  312. package/package.json +33 -32
  313. package/src/autocompleters/block.js +16 -7
  314. package/src/components/block-canvas/index.js +17 -1
  315. package/src/components/block-canvas/style.scss +2 -0
  316. package/src/components/block-card/index.js +3 -3
  317. package/src/components/block-full-height-alignment-control/index.js +1 -1
  318. package/src/components/block-inspector/style.scss +0 -6
  319. package/src/components/block-list/block.js +1 -2
  320. package/src/components/block-list/block.native.js +0 -4
  321. package/src/components/block-list/content.scss +1 -1
  322. package/src/components/block-list/index.js +4 -4
  323. package/src/components/block-list/use-block-props/index.js +0 -2
  324. package/src/components/block-list/use-block-props/use-focus-first-element.js +5 -3
  325. package/src/components/block-list/use-block-props/use-selected-block-event-handlers.js +7 -20
  326. package/src/components/block-list/use-in-between-inserter.js +1 -1
  327. package/src/components/block-patterns-list/stories/fixtures.js +834 -0
  328. package/src/components/block-patterns-list/stories/index.story.js +81 -0
  329. package/src/components/block-patterns-list/style.scss +2 -0
  330. package/src/components/block-patterns-paging/index.js +1 -1
  331. package/src/components/block-popover/index.js +0 -62
  332. package/src/components/block-preview/index.js +2 -2
  333. package/src/components/block-settings-menu/block-settings-dropdown.js +4 -0
  334. package/src/components/block-settings-menu/index.js +3 -0
  335. package/src/components/block-toolbar/change-design.js +133 -0
  336. package/src/components/block-toolbar/index.js +25 -8
  337. package/src/components/block-toolbar/style.scss +16 -0
  338. package/src/components/block-tools/index.js +4 -17
  339. package/src/components/block-tools/insertion-point.js +4 -3
  340. package/src/components/block-tools/style.scss +0 -20
  341. package/src/components/block-tools/use-show-block-tools.js +0 -13
  342. package/src/components/block-tools/zoom-out-mode-inserters.js +25 -40
  343. package/src/components/block-variation-transforms/index.js +2 -2
  344. package/src/components/block-vertical-alignment-control/ui.js +11 -15
  345. package/src/components/border-radius-control/linked-button.js +9 -11
  346. package/src/components/collab/block-comment-icon-slot.js +12 -0
  347. package/src/components/collab/block-comment-icon-toolbar-slot.js +12 -0
  348. package/src/components/colors-gradients/use-multiple-origin-colors-and-gradients.js +7 -1
  349. package/src/components/convert-to-group-buttons/toolbar.js +4 -4
  350. package/src/components/global-styles/color-panel.js +2 -10
  351. package/src/components/global-styles/test/use-global-styles-context.native.js +1 -0
  352. package/src/components/global-styles/use-global-styles-context.native.js +6 -0
  353. package/src/components/iframe/content.scss +4 -9
  354. package/src/components/iframe/index.js +31 -34
  355. package/src/components/iframe/style.scss +2 -3
  356. package/src/components/image-size-control/index.js +74 -43
  357. package/src/components/image-size-control/test/index.js +5 -63
  358. package/src/components/inner-blocks/index.js +12 -6
  359. package/src/components/inserter/block-patterns-tab/pattern-category-previews.js +2 -3
  360. package/src/components/inserter/block-patterns-tab/patterns-filter.js +1 -1
  361. package/src/components/inserter/category-tabs/index.js +16 -2
  362. package/src/components/inserter/menu.js +6 -4
  363. package/src/components/inserter/style.scss +13 -0
  364. package/src/components/inserter-button/index.native.js +1 -1
  365. package/src/components/inspector-controls-tabs/index.js +1 -6
  366. package/src/components/inspector-controls-tabs/utils.js +0 -3
  367. package/src/components/link-control/link-preview.js +15 -8
  368. package/src/components/link-control/test/index.js +63 -24
  369. package/src/components/list-view/appender.js +5 -6
  370. package/src/components/list-view/branch.js +8 -6
  371. package/src/components/list-view/index.js +1 -2
  372. package/src/components/provider/index.js +1 -3
  373. package/src/components/provider/test/experimental-provider.js +43 -1
  374. package/src/components/rich-text/event-listeners/index.js +4 -2
  375. package/src/components/rich-text/index.native.js +0 -2
  376. package/src/components/spacing-sizes-control/index.js +3 -3
  377. package/src/components/spacing-sizes-control/input-controls/spacing-input-control.js +4 -4
  378. package/src/components/spacing-sizes-control/linked-button.js +2 -12
  379. package/src/components/tool-selector/index.js +1 -5
  380. package/src/components/url-input/index.js +1 -1
  381. package/src/components/use-block-commands/index.js +1 -1
  382. package/src/components/use-block-drop-zone/index.js +5 -5
  383. package/src/components/use-block-drop-zone/index.native.js +0 -1
  384. package/src/components/use-moving-animation/index.js +0 -1
  385. package/src/components/use-settings/index.js +0 -1
  386. package/src/components/writing-flow/index.js +5 -3
  387. package/src/components/writing-flow/use-tab-nav.js +1 -2
  388. package/src/hooks/block-bindings.js +48 -31
  389. package/src/hooks/contrast-checker.js +0 -1
  390. package/src/hooks/duotone.js +2 -2
  391. package/src/hooks/style.js +7 -3
  392. package/src/hooks/use-zoom-out.js +14 -34
  393. package/src/index.js +0 -1
  394. package/src/private-apis.js +6 -3
  395. package/src/store/actions.js +3 -52
  396. package/src/store/defaults.js +2 -1
  397. package/src/store/private-actions.js +71 -8
  398. package/src/store/private-selectors.js +9 -19
  399. package/src/store/reducer.js +25 -11
  400. package/src/store/selectors.js +59 -8
  401. package/src/store/test/actions.js +41 -0
  402. package/src/store/test/reducer.js +23 -0
  403. package/src/utils/dom.js +22 -2
  404. package/src/utils/get-font-styles-and-weights.js +2 -2
  405. package/src/utils/transform-styles/index.js +3 -2
  406. package/tsconfig.tsbuildinfo +1 -1
  407. package/build/components/block-list/use-block-props/use-zoom-out-mode-exit.js +0 -57
  408. package/build/components/block-list/use-block-props/use-zoom-out-mode-exit.js.map +0 -1
  409. package/build/components/block-toolbar/shuffle.js +0 -110
  410. package/build/components/block-toolbar/shuffle.js.map +0 -1
  411. package/build/components/block-tools/zoom-out-popover.js +0 -58
  412. package/build/components/block-tools/zoom-out-popover.js.map +0 -1
  413. package/build/components/block-tools/zoom-out-toolbar.js +0 -132
  414. package/build/components/block-tools/zoom-out-toolbar.js.map +0 -1
  415. package/build/components/block-vertical-alignment-control/icons.js +0 -48
  416. package/build/components/block-vertical-alignment-control/icons.js.map +0 -1
  417. package/build-module/components/block-list/use-block-props/use-zoom-out-mode-exit.js +0 -51
  418. package/build-module/components/block-list/use-block-props/use-zoom-out-mode-exit.js.map +0 -1
  419. package/build-module/components/block-toolbar/shuffle.js +0 -103
  420. package/build-module/components/block-toolbar/shuffle.js.map +0 -1
  421. package/build-module/components/block-tools/zoom-out-popover.js +0 -49
  422. package/build-module/components/block-tools/zoom-out-popover.js.map +0 -1
  423. package/build-module/components/block-tools/zoom-out-toolbar.js +0 -124
  424. package/build-module/components/block-tools/zoom-out-toolbar.js.map +0 -1
  425. package/build-module/components/block-vertical-alignment-control/icons.js +0 -41
  426. package/build-module/components/block-vertical-alignment-control/icons.js.map +0 -1
  427. package/src/components/block-list/use-block-props/use-zoom-out-mode-exit.js +0 -65
  428. package/src/components/block-toolbar/shuffle.js +0 -111
  429. package/src/components/block-tools/zoom-out-popover.js +0 -47
  430. package/src/components/block-tools/zoom-out-toolbar.js +0 -135
  431. package/src/components/block-vertical-alignment-control/icons.js +0 -34
@@ -1 +1 @@
1
- {"version":3,"names":["_components","require","_element","_data","_appender","_block","_interopRequireDefault","_context","_utils","_store","_useBlockDisplayInformation","_jsxRuntime","countBlocks","block","expandedState","draggedClientIds","isExpandedByDefault","_expandedState$block$","isDragged","includes","clientId","isExpanded","innerBlocks","reduce","countReducer","count","_expandedState$block$2","length","noop","ListViewBranch","props","blocks","selectBlock","showBlockMovers","selectedClientIds","level","path","isBranchSelected","listPosition","fixedListWindow","parentId","shouldShowInnerBlocks","isSyncedBranch","showAppender","showAppenderProp","parentBlockInformation","useBlockDisplayInformation","syncedBranch","isSynced","canParentExpand","useSelect","select","blockEditorStore","canEditBlock","blockDropPosition","blockDropTargetIndex","firstDraggedBlockIndex","blockIndexes","useListViewContext","filteredBlocks","filter","Boolean","blockCount","rowCount","nextPosition","jsxs","Fragment","children","map","index","_expandedState$client","displacement","isAfterDraggedBlocks","isNesting","getDragDisplacementValues","itemInView","blockInView","position","updatedPath","hasNestedBlocks","shouldExpand","undefined","isSelected","isClientIdSelected","isSelectedBranch","showBlock","AsyncModeProvider","value","jsx","default","siblingBlockCount","className","__experimentalTreeGridRow","setSize","positionInSet","__experimentalTreeGridCell","treeGridCellProps","Appender","nestingLevel","_default","exports","memo"],"sources":["@wordpress/block-editor/src/components/list-view/branch.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalTreeGridRow as TreeGridRow,\n\t__experimentalTreeGridCell as TreeGridCell,\n} from '@wordpress/components';\nimport { memo } from '@wordpress/element';\nimport { AsyncModeProvider, useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { Appender } from './appender';\nimport ListViewBlock from './block';\nimport { useListViewContext } from './context';\nimport { getDragDisplacementValues, isClientIdSelected } from './utils';\nimport { store as blockEditorStore } from '../../store';\nimport useBlockDisplayInformation from '../use-block-display-information';\n\n/**\n * Given a block, returns the total number of blocks in that subtree. This is used to help determine\n * the list position of a block.\n *\n * When a block is collapsed, we do not count their children as part of that total. In the current drag\n * implementation dragged blocks and their children are not counted.\n *\n * @param {Object} block block tree\n * @param {Object} expandedState state that notes which branches are collapsed\n * @param {Array} draggedClientIds a list of dragged client ids\n * @param {boolean} isExpandedByDefault flag to determine the default fallback expanded state.\n * @return {number} block count\n */\nfunction countBlocks(\n\tblock,\n\texpandedState,\n\tdraggedClientIds,\n\tisExpandedByDefault\n) {\n\tconst isDragged = draggedClientIds?.includes( block.clientId );\n\tif ( isDragged ) {\n\t\treturn 0;\n\t}\n\tconst isExpanded = expandedState[ block.clientId ] ?? isExpandedByDefault;\n\n\tif ( isExpanded ) {\n\t\treturn (\n\t\t\t1 +\n\t\t\tblock.innerBlocks.reduce(\n\t\t\t\tcountReducer(\n\t\t\t\t\texpandedState,\n\t\t\t\t\tdraggedClientIds,\n\t\t\t\t\tisExpandedByDefault\n\t\t\t\t),\n\t\t\t\t0\n\t\t\t)\n\t\t);\n\t}\n\treturn 1;\n}\nconst countReducer =\n\t( expandedState, draggedClientIds, isExpandedByDefault ) =>\n\t( count, block ) => {\n\t\tconst isDragged = draggedClientIds?.includes( block.clientId );\n\t\tif ( isDragged ) {\n\t\t\treturn count;\n\t\t}\n\t\tconst isExpanded =\n\t\t\texpandedState[ block.clientId ] ?? isExpandedByDefault;\n\t\tif ( isExpanded && block.innerBlocks.length > 0 ) {\n\t\t\treturn (\n\t\t\t\tcount +\n\t\t\t\tcountBlocks(\n\t\t\t\t\tblock,\n\t\t\t\t\texpandedState,\n\t\t\t\t\tdraggedClientIds,\n\t\t\t\t\tisExpandedByDefault\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t\treturn count + 1;\n\t};\n\nconst noop = () => {};\n\nfunction ListViewBranch( props ) {\n\tconst {\n\t\tblocks,\n\t\tselectBlock = noop,\n\t\tshowBlockMovers,\n\t\tselectedClientIds,\n\t\tlevel = 1,\n\t\tpath = '',\n\t\tisBranchSelected = false,\n\t\tlistPosition = 0,\n\t\tfixedListWindow,\n\t\tisExpanded,\n\t\tparentId,\n\t\tshouldShowInnerBlocks = true,\n\t\tisSyncedBranch = false,\n\t\tshowAppender: showAppenderProp = true,\n\t} = props;\n\n\tconst parentBlockInformation = useBlockDisplayInformation( parentId );\n\tconst syncedBranch = isSyncedBranch || !! parentBlockInformation?.isSynced;\n\n\tconst canParentExpand = useSelect(\n\t\t( select ) => {\n\t\t\tif ( ! parentId ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn select( blockEditorStore ).canEditBlock( parentId );\n\t\t},\n\t\t[ parentId ]\n\t);\n\n\tconst {\n\t\tblockDropPosition,\n\t\tblockDropTargetIndex,\n\t\tfirstDraggedBlockIndex,\n\t\tblockIndexes,\n\t\texpandedState,\n\t\tdraggedClientIds,\n\t} = useListViewContext();\n\n\tif ( ! canParentExpand ) {\n\t\treturn null;\n\t}\n\n\t// Only show the appender at the first level.\n\tconst showAppender = showAppenderProp && level === 1;\n\tconst filteredBlocks = blocks.filter( Boolean );\n\tconst blockCount = filteredBlocks.length;\n\t// The appender means an extra row in List View, so add 1 to the row count.\n\tconst rowCount = showAppender ? blockCount + 1 : blockCount;\n\tlet nextPosition = listPosition;\n\n\treturn (\n\t\t<>\n\t\t\t{ filteredBlocks.map( ( block, index ) => {\n\t\t\t\tconst { clientId, innerBlocks } = block;\n\n\t\t\t\tif ( index > 0 ) {\n\t\t\t\t\tnextPosition += countBlocks(\n\t\t\t\t\t\tfilteredBlocks[ index - 1 ],\n\t\t\t\t\t\texpandedState,\n\t\t\t\t\t\tdraggedClientIds,\n\t\t\t\t\t\tisExpanded\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tconst isDragged = !! draggedClientIds?.includes( clientId );\n\n\t\t\t\t// Determine the displacement of the block while dragging. This\n\t\t\t\t// works out whether the current block should be displaced up or\n\t\t\t\t// down, relative to the dragged blocks and the drop target.\n\t\t\t\tconst { displacement, isAfterDraggedBlocks, isNesting } =\n\t\t\t\t\tgetDragDisplacementValues( {\n\t\t\t\t\t\tblockIndexes,\n\t\t\t\t\t\tblockDropTargetIndex,\n\t\t\t\t\t\tblockDropPosition,\n\t\t\t\t\t\tclientId,\n\t\t\t\t\t\tfirstDraggedBlockIndex,\n\t\t\t\t\t\tisDragged,\n\t\t\t\t\t} );\n\n\t\t\t\tconst { itemInView } = fixedListWindow;\n\t\t\t\tconst blockInView = itemInView( nextPosition );\n\n\t\t\t\tconst position = index + 1;\n\t\t\t\tconst updatedPath =\n\t\t\t\t\tpath.length > 0\n\t\t\t\t\t\t? `${ path }_${ position }`\n\t\t\t\t\t\t: `${ position }`;\n\t\t\t\tconst hasNestedBlocks = !! innerBlocks?.length;\n\n\t\t\t\tconst shouldExpand =\n\t\t\t\t\thasNestedBlocks && shouldShowInnerBlocks\n\t\t\t\t\t\t? expandedState[ clientId ] ?? isExpanded\n\t\t\t\t\t\t: undefined;\n\n\t\t\t\t// Make updates to the selected or dragged blocks synchronous,\n\t\t\t\t// but asynchronous for any other block.\n\t\t\t\tconst isSelected = isClientIdSelected(\n\t\t\t\t\tclientId,\n\t\t\t\t\tselectedClientIds\n\t\t\t\t);\n\t\t\t\tconst isSelectedBranch =\n\t\t\t\t\tisBranchSelected || ( isSelected && hasNestedBlocks );\n\n\t\t\t\t// To avoid performance issues, we only render blocks that are in view,\n\t\t\t\t// or blocks that are selected or dragged. If a block is selected,\n\t\t\t\t// it is only counted if it is the first of the block selection.\n\t\t\t\t// This prevents the entire tree from being rendered when a branch is\n\t\t\t\t// selected, or a user selects all blocks, while still enabling scroll\n\t\t\t\t// into view behavior when selecting a block or opening the list view.\n\t\t\t\t// The first and last blocks of the list are always rendered, to ensure\n\t\t\t\t// that Home and End keys work as expected.\n\t\t\t\tconst showBlock =\n\t\t\t\t\tisDragged ||\n\t\t\t\t\tblockInView ||\n\t\t\t\t\t( isSelected && clientId === selectedClientIds[ 0 ] ) ||\n\t\t\t\t\tindex === 0 ||\n\t\t\t\t\tindex === blockCount - 1;\n\t\t\t\treturn (\n\t\t\t\t\t<AsyncModeProvider key={ clientId } value={ ! isSelected }>\n\t\t\t\t\t\t{ showBlock && (\n\t\t\t\t\t\t\t<ListViewBlock\n\t\t\t\t\t\t\t\tblock={ block }\n\t\t\t\t\t\t\t\tselectBlock={ selectBlock }\n\t\t\t\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\t\t\t\tisBranchSelected={ isSelectedBranch }\n\t\t\t\t\t\t\t\tisDragged={ isDragged }\n\t\t\t\t\t\t\t\tlevel={ level }\n\t\t\t\t\t\t\t\tposition={ position }\n\t\t\t\t\t\t\t\trowCount={ rowCount }\n\t\t\t\t\t\t\t\tsiblingBlockCount={ blockCount }\n\t\t\t\t\t\t\t\tshowBlockMovers={ showBlockMovers }\n\t\t\t\t\t\t\t\tpath={ updatedPath }\n\t\t\t\t\t\t\t\tisExpanded={ isDragged ? false : shouldExpand }\n\t\t\t\t\t\t\t\tlistPosition={ nextPosition }\n\t\t\t\t\t\t\t\tselectedClientIds={ selectedClientIds }\n\t\t\t\t\t\t\t\tisSyncedBranch={ syncedBranch }\n\t\t\t\t\t\t\t\tdisplacement={ displacement }\n\t\t\t\t\t\t\t\tisAfterDraggedBlocks={ isAfterDraggedBlocks }\n\t\t\t\t\t\t\t\tisNesting={ isNesting }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ ! showBlock && (\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td className=\"block-editor-list-view-placeholder\" />\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ hasNestedBlocks && shouldExpand && ! isDragged && (\n\t\t\t\t\t\t\t<ListViewBranch\n\t\t\t\t\t\t\t\tparentId={ clientId }\n\t\t\t\t\t\t\t\tblocks={ innerBlocks }\n\t\t\t\t\t\t\t\tselectBlock={ selectBlock }\n\t\t\t\t\t\t\t\tshowBlockMovers={ showBlockMovers }\n\t\t\t\t\t\t\t\tlevel={ level + 1 }\n\t\t\t\t\t\t\t\tpath={ updatedPath }\n\t\t\t\t\t\t\t\tlistPosition={ nextPosition + 1 }\n\t\t\t\t\t\t\t\tfixedListWindow={ fixedListWindow }\n\t\t\t\t\t\t\t\tisBranchSelected={ isSelectedBranch }\n\t\t\t\t\t\t\t\tselectedClientIds={ selectedClientIds }\n\t\t\t\t\t\t\t\tisExpanded={ isExpanded }\n\t\t\t\t\t\t\t\tisSyncedBranch={ syncedBranch }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</AsyncModeProvider>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t\t{ showAppender && (\n\t\t\t\t<TreeGridRow\n\t\t\t\t\tlevel={ level }\n\t\t\t\t\tsetSize={ rowCount }\n\t\t\t\t\tpositionInSet={ rowCount }\n\t\t\t\t\tisExpanded\n\t\t\t\t>\n\t\t\t\t\t<TreeGridCell>\n\t\t\t\t\t\t{ ( treeGridCellProps ) => (\n\t\t\t\t\t\t\t<Appender\n\t\t\t\t\t\t\t\tclientId={ parentId }\n\t\t\t\t\t\t\t\tnestingLevel={ level }\n\t\t\t\t\t\t\t\tblockCount={ blockCount }\n\t\t\t\t\t\t\t\t{ ...treeGridCellProps }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</TreeGridCell>\n\t\t\t\t</TreeGridRow>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default memo( ListViewBranch );\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAIA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AAKA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAC,sBAAA,CAAAL,OAAA;AACA,IAAAM,QAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AACA,IAAAS,2BAAA,GAAAJ,sBAAA,CAAAL,OAAA;AAA0E,IAAAU,WAAA,GAAAV,OAAA;AAlB1E;AACA;AACA;;AAQA;AACA;AACA;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA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AA,EAAC3D,cAAc;UACdW,QAAQ,EAAGpB,QAAU;UACrBW,MAAM,EAAGT,WAAa;UACtBU,WAAW,EAAGA,WAAa;UAC3BC,eAAe,EAAGA,eAAiB;UACnCE,KAAK,EAAGA,KAAK,GAAG,CAAG;UACnBC,IAAI,EAAG0C,WAAa;UACpBxC,YAAY,EAAG0B,YAAY,GAAG,CAAG;UACjCzB,eAAe,EAAGA,eAAiB;UACnCF,gBAAgB,EAAG+C,gBAAkB;UACrClD,iBAAiB,EAAGA,iBAAmB;UACvCb,UAAU,EAAGA,UAAY;UACzBqB,cAAc,EAAGK;QAAc,CAC/B,CACD;MAAA,GA3CuB3B,QA4CN,CAAC;IAEtB,CAAE,CAAC,EACDuB,YAAY,iBACb,IAAAhC,WAAA,CAAA6E,GAAA,EAACxF,WAAA,CAAA4F,yBAAW;MACXzD,KAAK,EAAGA,KAAO;MACf0D,OAAO,EAAG9B,QAAU;MACpB+B,aAAa,EAAG/B,QAAU;MAC1B1C,UAAU;MAAA8C,QAAA,eAEV,IAAAxD,WAAA,CAAA6E,GAAA,EAACxF,WAAA,CAAA+F,0BAAY;QAAA5B,QAAA,EACR6B,iBAAiB,iBACpB,IAAArF,WAAA,CAAA6E,GAAA,EAACpF,SAAA,CAAA6F,QAAQ;UACR7E,QAAQ,EAAGoB,QAAU;UACrB0D,YAAY,EAAG/D,KAAO;UACtB2B,UAAU,EAAGA,UAAY;UAAA,GACpBkC;QAAiB,CACtB;MACD,CACY;IAAC,CACH,CACb;EAAA,CACA,CAAC;AAEL;AAAC,IAAAG,QAAA,GAAAC,OAAA,CAAAX,OAAA,GAEc,IAAAY,aAAI,EAAExE,cAAe,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_components","require","_element","_data","_appender","_block","_interopRequireDefault","_context","_utils","_store","_useBlockDisplayInformation","_jsxRuntime","countBlocks","block","expandedState","draggedClientIds","isExpandedByDefault","_expandedState$block$","isDragged","includes","clientId","isExpanded","innerBlocks","reduce","countReducer","count","_expandedState$block$2","length","noop","ListViewBranch","props","blocks","selectBlock","showBlockMovers","selectedClientIds","level","path","isBranchSelected","listPosition","fixedListWindow","parentId","shouldShowInnerBlocks","isSyncedBranch","showAppender","showAppenderProp","parentBlockInformation","useBlockDisplayInformation","syncedBranch","isSynced","canParentExpand","useSelect","select","blockEditorStore","canEditBlock","blockDropPosition","blockDropTargetIndex","firstDraggedBlockIndex","blockIndexes","useListViewContext","nextPositionRef","useRef","filteredBlocks","filter","Boolean","blockCount","rowCount","current","jsxs","Fragment","children","map","index","_expandedState$client","displacement","isAfterDraggedBlocks","isNesting","getDragDisplacementValues","itemInView","blockInView","position","updatedPath","hasNestedBlocks","shouldExpand","undefined","isSelected","isClientIdSelected","isSelectedBranch","showBlock","AsyncModeProvider","value","jsx","default","siblingBlockCount","className","__experimentalTreeGridRow","setSize","positionInSet","__experimentalTreeGridCell","treeGridCellProps","Appender","nestingLevel","_default","exports","memo"],"sources":["@wordpress/block-editor/src/components/list-view/branch.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalTreeGridRow as TreeGridRow,\n\t__experimentalTreeGridCell as TreeGridCell,\n} from '@wordpress/components';\nimport { memo, useRef } from '@wordpress/element';\nimport { AsyncModeProvider, useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { Appender } from './appender';\nimport ListViewBlock from './block';\nimport { useListViewContext } from './context';\nimport { getDragDisplacementValues, isClientIdSelected } from './utils';\nimport { store as blockEditorStore } from '../../store';\nimport useBlockDisplayInformation from '../use-block-display-information';\n\n/**\n * Given a block, returns the total number of blocks in that subtree. This is used to help determine\n * the list position of a block.\n *\n * When a block is collapsed, we do not count their children as part of that total. In the current drag\n * implementation dragged blocks and their children are not counted.\n *\n * @param {Object} block block tree\n * @param {Object} expandedState state that notes which branches are collapsed\n * @param {Array} draggedClientIds a list of dragged client ids\n * @param {boolean} isExpandedByDefault flag to determine the default fallback expanded state.\n * @return {number} block count\n */\nfunction countBlocks(\n\tblock,\n\texpandedState,\n\tdraggedClientIds,\n\tisExpandedByDefault\n) {\n\tconst isDragged = draggedClientIds?.includes( block.clientId );\n\tif ( isDragged ) {\n\t\treturn 0;\n\t}\n\tconst isExpanded = expandedState[ block.clientId ] ?? isExpandedByDefault;\n\n\tif ( isExpanded ) {\n\t\treturn (\n\t\t\t1 +\n\t\t\tblock.innerBlocks.reduce(\n\t\t\t\tcountReducer(\n\t\t\t\t\texpandedState,\n\t\t\t\t\tdraggedClientIds,\n\t\t\t\t\tisExpandedByDefault\n\t\t\t\t),\n\t\t\t\t0\n\t\t\t)\n\t\t);\n\t}\n\treturn 1;\n}\nconst countReducer =\n\t( expandedState, draggedClientIds, isExpandedByDefault ) =>\n\t( count, block ) => {\n\t\tconst isDragged = draggedClientIds?.includes( block.clientId );\n\t\tif ( isDragged ) {\n\t\t\treturn count;\n\t\t}\n\t\tconst isExpanded =\n\t\t\texpandedState[ block.clientId ] ?? isExpandedByDefault;\n\t\tif ( isExpanded && block.innerBlocks.length > 0 ) {\n\t\t\treturn (\n\t\t\t\tcount +\n\t\t\t\tcountBlocks(\n\t\t\t\t\tblock,\n\t\t\t\t\texpandedState,\n\t\t\t\t\tdraggedClientIds,\n\t\t\t\t\tisExpandedByDefault\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t\treturn count + 1;\n\t};\n\nconst noop = () => {};\n\nfunction ListViewBranch( props ) {\n\tconst {\n\t\tblocks,\n\t\tselectBlock = noop,\n\t\tshowBlockMovers,\n\t\tselectedClientIds,\n\t\tlevel = 1,\n\t\tpath = '',\n\t\tisBranchSelected = false,\n\t\tlistPosition = 0,\n\t\tfixedListWindow,\n\t\tisExpanded,\n\t\tparentId,\n\t\tshouldShowInnerBlocks = true,\n\t\tisSyncedBranch = false,\n\t\tshowAppender: showAppenderProp = true,\n\t} = props;\n\n\tconst parentBlockInformation = useBlockDisplayInformation( parentId );\n\tconst syncedBranch = isSyncedBranch || !! parentBlockInformation?.isSynced;\n\n\tconst canParentExpand = useSelect(\n\t\t( select ) => {\n\t\t\tif ( ! parentId ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn select( blockEditorStore ).canEditBlock( parentId );\n\t\t},\n\t\t[ parentId ]\n\t);\n\n\tconst {\n\t\tblockDropPosition,\n\t\tblockDropTargetIndex,\n\t\tfirstDraggedBlockIndex,\n\t\tblockIndexes,\n\t\texpandedState,\n\t\tdraggedClientIds,\n\t} = useListViewContext();\n\n\tconst nextPositionRef = useRef();\n\n\tif ( ! canParentExpand ) {\n\t\treturn null;\n\t}\n\n\t// Only show the appender at the first level.\n\tconst showAppender = showAppenderProp && level === 1;\n\tconst filteredBlocks = blocks.filter( Boolean );\n\tconst blockCount = filteredBlocks.length;\n\t// The appender means an extra row in List View, so add 1 to the row count.\n\tconst rowCount = showAppender ? blockCount + 1 : blockCount;\n\tnextPositionRef.current = listPosition;\n\n\treturn (\n\t\t<>\n\t\t\t{ filteredBlocks.map( ( block, index ) => {\n\t\t\t\tconst { clientId, innerBlocks } = block;\n\n\t\t\t\tif ( index > 0 ) {\n\t\t\t\t\tnextPositionRef.current += countBlocks(\n\t\t\t\t\t\tfilteredBlocks[ index - 1 ],\n\t\t\t\t\t\texpandedState,\n\t\t\t\t\t\tdraggedClientIds,\n\t\t\t\t\t\tisExpanded\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tconst isDragged = !! draggedClientIds?.includes( clientId );\n\n\t\t\t\t// Determine the displacement of the block while dragging. This\n\t\t\t\t// works out whether the current block should be displaced up or\n\t\t\t\t// down, relative to the dragged blocks and the drop target.\n\t\t\t\tconst { displacement, isAfterDraggedBlocks, isNesting } =\n\t\t\t\t\tgetDragDisplacementValues( {\n\t\t\t\t\t\tblockIndexes,\n\t\t\t\t\t\tblockDropTargetIndex,\n\t\t\t\t\t\tblockDropPosition,\n\t\t\t\t\t\tclientId,\n\t\t\t\t\t\tfirstDraggedBlockIndex,\n\t\t\t\t\t\tisDragged,\n\t\t\t\t\t} );\n\n\t\t\t\tconst { itemInView } = fixedListWindow;\n\t\t\t\tconst blockInView = itemInView( nextPositionRef.current );\n\n\t\t\t\tconst position = index + 1;\n\t\t\t\tconst updatedPath =\n\t\t\t\t\tpath.length > 0\n\t\t\t\t\t\t? `${ path }_${ position }`\n\t\t\t\t\t\t: `${ position }`;\n\t\t\t\tconst hasNestedBlocks = !! innerBlocks?.length;\n\n\t\t\t\tconst shouldExpand =\n\t\t\t\t\thasNestedBlocks && shouldShowInnerBlocks\n\t\t\t\t\t\t? expandedState[ clientId ] ?? isExpanded\n\t\t\t\t\t\t: undefined;\n\n\t\t\t\t// Make updates to the selected or dragged blocks synchronous,\n\t\t\t\t// but asynchronous for any other block.\n\t\t\t\tconst isSelected = isClientIdSelected(\n\t\t\t\t\tclientId,\n\t\t\t\t\tselectedClientIds\n\t\t\t\t);\n\t\t\t\tconst isSelectedBranch =\n\t\t\t\t\tisBranchSelected || ( isSelected && hasNestedBlocks );\n\n\t\t\t\t// To avoid performance issues, we only render blocks that are in view,\n\t\t\t\t// or blocks that are selected or dragged. If a block is selected,\n\t\t\t\t// it is only counted if it is the first of the block selection.\n\t\t\t\t// This prevents the entire tree from being rendered when a branch is\n\t\t\t\t// selected, or a user selects all blocks, while still enabling scroll\n\t\t\t\t// into view behavior when selecting a block or opening the list view.\n\t\t\t\t// The first and last blocks of the list are always rendered, to ensure\n\t\t\t\t// that Home and End keys work as expected.\n\t\t\t\tconst showBlock =\n\t\t\t\t\tisDragged ||\n\t\t\t\t\tblockInView ||\n\t\t\t\t\t( isSelected && clientId === selectedClientIds[ 0 ] ) ||\n\t\t\t\t\tindex === 0 ||\n\t\t\t\t\tindex === blockCount - 1;\n\t\t\t\treturn (\n\t\t\t\t\t<AsyncModeProvider key={ clientId } value={ ! isSelected }>\n\t\t\t\t\t\t{ showBlock && (\n\t\t\t\t\t\t\t<ListViewBlock\n\t\t\t\t\t\t\t\tblock={ block }\n\t\t\t\t\t\t\t\tselectBlock={ selectBlock }\n\t\t\t\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\t\t\t\tisBranchSelected={ isSelectedBranch }\n\t\t\t\t\t\t\t\tisDragged={ isDragged }\n\t\t\t\t\t\t\t\tlevel={ level }\n\t\t\t\t\t\t\t\tposition={ position }\n\t\t\t\t\t\t\t\trowCount={ rowCount }\n\t\t\t\t\t\t\t\tsiblingBlockCount={ blockCount }\n\t\t\t\t\t\t\t\tshowBlockMovers={ showBlockMovers }\n\t\t\t\t\t\t\t\tpath={ updatedPath }\n\t\t\t\t\t\t\t\tisExpanded={ isDragged ? false : shouldExpand }\n\t\t\t\t\t\t\t\tlistPosition={ nextPositionRef.current }\n\t\t\t\t\t\t\t\tselectedClientIds={ selectedClientIds }\n\t\t\t\t\t\t\t\tisSyncedBranch={ syncedBranch }\n\t\t\t\t\t\t\t\tdisplacement={ displacement }\n\t\t\t\t\t\t\t\tisAfterDraggedBlocks={ isAfterDraggedBlocks }\n\t\t\t\t\t\t\t\tisNesting={ isNesting }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ ! showBlock && (\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td className=\"block-editor-list-view-placeholder\" />\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ hasNestedBlocks && shouldExpand && ! isDragged && (\n\t\t\t\t\t\t\t<ListViewBranch\n\t\t\t\t\t\t\t\tparentId={ clientId }\n\t\t\t\t\t\t\t\tblocks={ innerBlocks }\n\t\t\t\t\t\t\t\tselectBlock={ selectBlock }\n\t\t\t\t\t\t\t\tshowBlockMovers={ showBlockMovers }\n\t\t\t\t\t\t\t\tlevel={ level + 1 }\n\t\t\t\t\t\t\t\tpath={ updatedPath }\n\t\t\t\t\t\t\t\tlistPosition={ nextPositionRef.current + 1 }\n\t\t\t\t\t\t\t\tfixedListWindow={ fixedListWindow }\n\t\t\t\t\t\t\t\tisBranchSelected={ isSelectedBranch }\n\t\t\t\t\t\t\t\tselectedClientIds={ selectedClientIds }\n\t\t\t\t\t\t\t\tisExpanded={ isExpanded }\n\t\t\t\t\t\t\t\tisSyncedBranch={ syncedBranch }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</AsyncModeProvider>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t\t{ showAppender && (\n\t\t\t\t<TreeGridRow\n\t\t\t\t\tlevel={ level }\n\t\t\t\t\tsetSize={ rowCount }\n\t\t\t\t\tpositionInSet={ rowCount }\n\t\t\t\t\tisExpanded\n\t\t\t\t>\n\t\t\t\t\t<TreeGridCell>\n\t\t\t\t\t\t{ ( treeGridCellProps ) => (\n\t\t\t\t\t\t\t<Appender\n\t\t\t\t\t\t\t\tclientId={ parentId }\n\t\t\t\t\t\t\t\tnestingLevel={ level }\n\t\t\t\t\t\t\t\tblockCount={ blockCount }\n\t\t\t\t\t\t\t\t{ ...treeGridCellProps }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</TreeGridCell>\n\t\t\t\t</TreeGridRow>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default memo( ListViewBranch );\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAIA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AAKA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAC,sBAAA,CAAAL,OAAA;AACA,IAAAM,QAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AACA,IAAAS,2BAAA,GAAAJ,sBAAA,CAAAL,OAAA;AAA0E,IAAAU,WAAA,GAAAV,OAAA;AAlB1E;AACA;AACA;;AAQA;AACA;AACA;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GACA,SAASW,WAAWA,CACnBC,KAAK,EACLC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Y,IAAI,CAAEhE,SAAS,iBAC/C,IAAAP,WAAA,CAAA+E,GAAA,EAAC7D,cAAc;UACdW,QAAQ,EAAGpB,QAAU;UACrBW,MAAM,EAAGT,WAAa;UACtBU,WAAW,EAAGA,WAAa;UAC3BC,eAAe,EAAGA,eAAiB;UACnCE,KAAK,EAAGA,KAAK,GAAG,CAAG;UACnBC,IAAI,EAAG4C,WAAa;UACpB1C,YAAY,EAAGqB,eAAe,CAACO,OAAO,GAAG,CAAG;UAC5C3B,eAAe,EAAGA,eAAiB;UACnCF,gBAAgB,EAAGiD,gBAAkB;UACrCpD,iBAAiB,EAAGA,iBAAmB;UACvCb,UAAU,EAAGA,UAAY;UACzBqB,cAAc,EAAGK;QAAc,CAC/B,CACD;MAAA,GA3CuB3B,QA4CN,CAAC;IAEtB,CAAE,CAAC,EACDuB,YAAY,iBACb,IAAAhC,WAAA,CAAA+E,GAAA,EAAC1F,WAAA,CAAA8F,yBAAW;MACX3D,KAAK,EAAGA,KAAO;MACf4D,OAAO,EAAG9B,QAAU;MACpB+B,aAAa,EAAG/B,QAAU;MAC1B5C,UAAU;MAAAgD,QAAA,eAEV,IAAA1D,WAAA,CAAA+E,GAAA,EAAC1F,WAAA,CAAAiG,0BAAY;QAAA5B,QAAA,EACR6B,iBAAiB,iBACpB,IAAAvF,WAAA,CAAA+E,GAAA,EAACtF,SAAA,CAAA+F,QAAQ;UACR/E,QAAQ,EAAGoB,QAAU;UACrB4D,YAAY,EAAGjE,KAAO;UACtB6B,UAAU,EAAGA,UAAY;UAAA,GACpBkC;QAAiB,CACtB;MACD,CACY;IAAC,CACH,CACb;EAAA,CACA,CAAC;AAEL;AAAC,IAAAG,QAAA,GAAAC,OAAA,CAAAX,OAAA,GAEc,IAAAY,aAAI,EAAE1E,cAAe,CAAC","ignoreList":[]}
@@ -165,8 +165,7 @@ function ListViewComponent({
165
165
  if (selectedClientIds?.length) {
166
166
  (0, _utils.focusListItem)(selectedClientIds[0], elementRef?.current);
167
167
  }
168
- // Disable reason: Only focus on the selected item when the list view is mounted.
169
- // eslint-disable-next-line react-hooks/exhaustive-deps
168
+ // Only focus on the selected item when the list view is mounted.
170
169
  }, []);
171
170
  const expand = (0, _element.useCallback)(clientId => {
172
171
  if (!clientId) {
@@ -1 +1 @@
1
- {"version":3,"names":["_clsx","_interopRequireDefault","require","_compose","_components","_data","_deprecated","_element","_i18n","_branch","_context","_dropIndicator","_useBlockSelection","_useListViewBlockIndexes","_useListViewClientIds","_useListViewCollapseItems","_useListViewDropZone","_useListViewExpandSelectedItem","_store","_blockSettingsDropdown","_utils","_useClipboardHandler","_jsxRuntime","expanded","state","action","type","Array","isArray","clientIds","reduce","newState","id","BLOCK_LIST_ITEM_HEIGHT","exports","ListViewComponent","blocks","dropZoneElement","showBlockMovers","isExpanded","showAppender","blockSettingsMenu","BlockSettingsMenu","BlockSettingsDropdown","rootClientId","description","onSelect","additionalBlockContent","AdditionalBlockContent","ref","deprecated","since","alternative","instanceId","useInstanceId","clientIdsTree","draggedClientIds","selectedClientIds","useListViewClientIds","blockIndexes","useListViewBlockIndexes","getBlock","useSelect","blockEditorStore","visibleBlockCount","select","getGlobalBlockCount","getClientIdsOfDescendants","draggedBlockCount","length","updateBlockSelection","useBlockSelection","expandedState","setExpandedState","useReducer","insertedBlock","setInsertedBlock","useState","setSelectedTreeId","useListViewExpandSelectedItem","firstSelectedBlockClientId","selectEditorBlock","useCallback","event","blockClientId","focusPosition","dropZoneRef","target","blockDropTarget","useListViewDropZone","elementRef","useRef","clipBoardRef","useClipboardHandler","selectBlock","treeGridRef","useMergeRefs","useEffect","focusListItem","current","expand","clientId","collapse","collapseAll","expandRow","row","dataset","block","collapseRow","focusRow","startRow","endRow","shiftKey","useListViewCollapseItems","firstDraggedBlockClientId","blockDropTargetIndex","blockDropPosition","firstDraggedBlockIndex","useMemo","_blockDropTargetIndex","_firstDraggedBlockIndex","foundBlockIndex","undefined","dropPosition","contextValue","listViewInstanceId","treeGridElementRef","fixedListWindow","useFixedWindowList","useWindowing","windowOverscan","describedById","jsxs","AsyncModeProvider","value","children","jsx","default","draggedBlockClientId","listViewRef","VisuallyHidden","__experimentalTreeGrid","className","clsx","__","onCollapseRow","onExpandRow","onFocusRow","applicationAriaLabel","style","ListViewContext","Provider","parentId","PrivateListView","forwardRef","_default","props"],"sources":["@wordpress/block-editor/src/components/list-view/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tuseInstanceId,\n\tuseMergeRefs,\n\t__experimentalUseFixedWindowList as useFixedWindowList,\n} from '@wordpress/compose';\nimport {\n\t__experimentalTreeGrid as TreeGrid,\n\tVisuallyHidden,\n} from '@wordpress/components';\nimport { AsyncModeProvider, useSelect } from '@wordpress/data';\nimport deprecated from '@wordpress/deprecated';\nimport {\n\tuseCallback,\n\tuseEffect,\n\tuseMemo,\n\tuseRef,\n\tuseReducer,\n\tforwardRef,\n\tuseState,\n} from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport ListViewBranch from './branch';\nimport { ListViewContext } from './context';\nimport ListViewDropIndicatorPreview from './drop-indicator';\nimport useBlockSelection from './use-block-selection';\nimport useListViewBlockIndexes from './use-list-view-block-indexes';\nimport useListViewClientIds from './use-list-view-client-ids';\nimport useListViewCollapseItems from './use-list-view-collapse-items';\nimport useListViewDropZone from './use-list-view-drop-zone';\nimport useListViewExpandSelectedItem from './use-list-view-expand-selected-item';\nimport { store as blockEditorStore } from '../../store';\nimport { BlockSettingsDropdown } from '../block-settings-menu/block-settings-dropdown';\nimport { focusListItem } from './utils';\nimport useClipboardHandler from './use-clipboard-handler';\n\nconst expanded = ( state, action ) => {\n\tif ( action.type === 'clear' ) {\n\t\treturn {};\n\t}\n\tif ( Array.isArray( action.clientIds ) ) {\n\t\treturn {\n\t\t\t...state,\n\t\t\t...action.clientIds.reduce(\n\t\t\t\t( newState, id ) => ( {\n\t\t\t\t\t...newState,\n\t\t\t\t\t[ id ]: action.type === 'expand',\n\t\t\t\t} ),\n\t\t\t\t{}\n\t\t\t),\n\t\t};\n\t}\n\treturn state;\n};\n\nexport const BLOCK_LIST_ITEM_HEIGHT = 32;\n\n/** @typedef {import('react').ComponentType} ComponentType */\n/** @typedef {import('react').Ref<HTMLElement>} Ref */\n\n/**\n * Show a hierarchical list of blocks.\n *\n * @param {Object} props Components props.\n * @param {string} props.id An HTML element id for the root element of ListView.\n * @param {Array} props.blocks _deprecated_ Custom subset of block client IDs to be used instead of the default hierarchy.\n * @param {?HTMLElement} props.dropZoneElement Optional element to be used as the drop zone.\n * @param {?boolean} props.showBlockMovers Flag to enable block movers. Defaults to `false`.\n * @param {?boolean} props.isExpanded Flag to determine whether nested levels are expanded by default. Defaults to `false`.\n * @param {?boolean} props.showAppender Flag to show or hide the block appender. Defaults to `false`.\n * @param {?ComponentType} props.blockSettingsMenu Optional more menu substitution. Defaults to the standard `BlockSettingsDropdown` component.\n * @param {string} props.rootClientId The client id of the root block from which we determine the blocks to show in the list.\n * @param {string} props.description Optional accessible description for the tree grid component.\n * @param {?Function} props.onSelect Optional callback to be invoked when a block is selected. Receives the block object that was selected.\n * @param {?ComponentType} props.additionalBlockContent Component that renders additional block content UI.\n * @param {Ref} ref Forwarded ref\n */\nfunction ListViewComponent(\n\t{\n\t\tid,\n\t\tblocks,\n\t\tdropZoneElement,\n\t\tshowBlockMovers = false,\n\t\tisExpanded = false,\n\t\tshowAppender = false,\n\t\tblockSettingsMenu: BlockSettingsMenu = BlockSettingsDropdown,\n\t\trootClientId,\n\t\tdescription,\n\t\tonSelect,\n\t\tadditionalBlockContent: AdditionalBlockContent,\n\t},\n\tref\n) {\n\t// This can be removed once we no longer need to support the blocks prop.\n\tif ( blocks ) {\n\t\tdeprecated(\n\t\t\t'`blocks` property in `wp.blockEditor.__experimentalListView`',\n\t\t\t{\n\t\t\t\tsince: '6.3',\n\t\t\t\talternative: '`rootClientId` property',\n\t\t\t}\n\t\t);\n\t}\n\n\tconst instanceId = useInstanceId( ListViewComponent );\n\tconst { clientIdsTree, draggedClientIds, selectedClientIds } =\n\t\tuseListViewClientIds( { blocks, rootClientId } );\n\tconst blockIndexes = useListViewBlockIndexes( clientIdsTree );\n\n\tconst { getBlock } = useSelect( blockEditorStore );\n\tconst { visibleBlockCount } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getGlobalBlockCount, getClientIdsOfDescendants } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\tconst draggedBlockCount =\n\t\t\t\tdraggedClientIds?.length > 0\n\t\t\t\t\t? getClientIdsOfDescendants( draggedClientIds ).length + 1\n\t\t\t\t\t: 0;\n\t\t\treturn {\n\t\t\t\tvisibleBlockCount: getGlobalBlockCount() - draggedBlockCount,\n\t\t\t};\n\t\t},\n\t\t[ draggedClientIds ]\n\t);\n\n\tconst { updateBlockSelection } = useBlockSelection();\n\n\tconst [ expandedState, setExpandedState ] = useReducer( expanded, {} );\n\n\tconst [ insertedBlock, setInsertedBlock ] = useState( null );\n\n\tconst { setSelectedTreeId } = useListViewExpandSelectedItem( {\n\t\tfirstSelectedBlockClientId: selectedClientIds[ 0 ],\n\t\tsetExpandedState,\n\t} );\n\tconst selectEditorBlock = useCallback(\n\t\t/**\n\t\t * @param {MouseEvent | KeyboardEvent | undefined} event\n\t\t * @param {string} blockClientId\n\t\t * @param {null | undefined | -1 | 1} focusPosition\n\t\t */\n\t\t( event, blockClientId, focusPosition ) => {\n\t\t\tupdateBlockSelection( event, blockClientId, null, focusPosition );\n\t\t\tsetSelectedTreeId( blockClientId );\n\t\t\tif ( onSelect ) {\n\t\t\t\tonSelect( getBlock( blockClientId ) );\n\t\t\t}\n\t\t},\n\t\t[ setSelectedTreeId, updateBlockSelection, onSelect, getBlock ]\n\t);\n\n\tconst { ref: dropZoneRef, target: blockDropTarget } = useListViewDropZone( {\n\t\tdropZoneElement,\n\t\texpandedState,\n\t\tsetExpandedState,\n\t} );\n\tconst elementRef = useRef();\n\n\t// Allow handling of copy, cut, and paste events.\n\tconst clipBoardRef = useClipboardHandler( {\n\t\tselectBlock: selectEditorBlock,\n\t} );\n\n\tconst treeGridRef = useMergeRefs( [\n\t\tclipBoardRef,\n\t\telementRef,\n\t\tdropZoneRef,\n\t\tref,\n\t] );\n\n\tuseEffect( () => {\n\t\t// If a blocks are already selected when the list view is initially\n\t\t// mounted, shift focus to the first selected block.\n\t\tif ( selectedClientIds?.length ) {\n\t\t\tfocusListItem( selectedClientIds[ 0 ], elementRef?.current );\n\t\t}\n\t\t// Disable reason: Only focus on the selected item when the list view is mounted.\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [] );\n\n\tconst expand = useCallback(\n\t\t( clientId ) => {\n\t\t\tif ( ! clientId ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst clientIds = Array.isArray( clientId )\n\t\t\t\t? clientId\n\t\t\t\t: [ clientId ];\n\t\t\tsetExpandedState( { type: 'expand', clientIds } );\n\t\t},\n\t\t[ setExpandedState ]\n\t);\n\tconst collapse = useCallback(\n\t\t( clientId ) => {\n\t\t\tif ( ! clientId ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tsetExpandedState( { type: 'collapse', clientIds: [ clientId ] } );\n\t\t},\n\t\t[ setExpandedState ]\n\t);\n\tconst collapseAll = useCallback( () => {\n\t\tsetExpandedState( { type: 'clear' } );\n\t}, [ setExpandedState ] );\n\tconst expandRow = useCallback(\n\t\t( row ) => {\n\t\t\texpand( row?.dataset?.block );\n\t\t},\n\t\t[ expand ]\n\t);\n\tconst collapseRow = useCallback(\n\t\t( row ) => {\n\t\t\tcollapse( row?.dataset?.block );\n\t\t},\n\t\t[ collapse ]\n\t);\n\tconst focusRow = useCallback(\n\t\t( event, startRow, endRow ) => {\n\t\t\tif ( event.shiftKey ) {\n\t\t\t\tupdateBlockSelection(\n\t\t\t\t\tevent,\n\t\t\t\t\tstartRow?.dataset?.block,\n\t\t\t\t\tendRow?.dataset?.block\n\t\t\t\t);\n\t\t\t}\n\t\t},\n\t\t[ updateBlockSelection ]\n\t);\n\n\tuseListViewCollapseItems( {\n\t\tcollapseAll,\n\t\texpand,\n\t} );\n\n\tconst firstDraggedBlockClientId = draggedClientIds?.[ 0 ];\n\n\t// Convert a blockDropTarget into indexes relative to the blocks in the list view.\n\t// These values are used to determine which blocks should be displaced to make room\n\t// for the drop indicator. See `ListViewBranch` and `getDragDisplacementValues`.\n\tconst { blockDropTargetIndex, blockDropPosition, firstDraggedBlockIndex } =\n\t\tuseMemo( () => {\n\t\t\tlet _blockDropTargetIndex, _firstDraggedBlockIndex;\n\n\t\t\tif ( blockDropTarget?.clientId ) {\n\t\t\t\tconst foundBlockIndex =\n\t\t\t\t\tblockIndexes[ blockDropTarget.clientId ];\n\t\t\t\t// If dragging below or inside the block, treat the drop target as the next block.\n\t\t\t\t_blockDropTargetIndex =\n\t\t\t\t\tfoundBlockIndex === undefined ||\n\t\t\t\t\tblockDropTarget?.dropPosition === 'top'\n\t\t\t\t\t\t? foundBlockIndex\n\t\t\t\t\t\t: foundBlockIndex + 1;\n\t\t\t} else if ( blockDropTarget === null ) {\n\t\t\t\t// A `null` value is used to indicate that the user is dragging outside of the list view.\n\t\t\t\t_blockDropTargetIndex = null;\n\t\t\t}\n\n\t\t\tif ( firstDraggedBlockClientId ) {\n\t\t\t\tconst foundBlockIndex =\n\t\t\t\t\tblockIndexes[ firstDraggedBlockClientId ];\n\t\t\t\t_firstDraggedBlockIndex =\n\t\t\t\t\tfoundBlockIndex === undefined ||\n\t\t\t\t\tblockDropTarget?.dropPosition === 'top'\n\t\t\t\t\t\t? foundBlockIndex\n\t\t\t\t\t\t: foundBlockIndex + 1;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tblockDropTargetIndex: _blockDropTargetIndex,\n\t\t\t\tblockDropPosition: blockDropTarget?.dropPosition,\n\t\t\t\tfirstDraggedBlockIndex: _firstDraggedBlockIndex,\n\t\t\t};\n\t\t}, [ blockDropTarget, blockIndexes, firstDraggedBlockClientId ] );\n\n\tconst contextValue = useMemo(\n\t\t() => ( {\n\t\t\tblockDropPosition,\n\t\t\tblockDropTargetIndex,\n\t\t\tblockIndexes,\n\t\t\tdraggedClientIds,\n\t\t\texpandedState,\n\t\t\texpand,\n\t\t\tfirstDraggedBlockIndex,\n\t\t\tcollapse,\n\t\t\tcollapseAll,\n\t\t\tBlockSettingsMenu,\n\t\t\tlistViewInstanceId: instanceId,\n\t\t\tAdditionalBlockContent,\n\t\t\tinsertedBlock,\n\t\t\tsetInsertedBlock,\n\t\t\ttreeGridElementRef: elementRef,\n\t\t\trootClientId,\n\t\t} ),\n\t\t[\n\t\t\tblockDropPosition,\n\t\t\tblockDropTargetIndex,\n\t\t\tblockIndexes,\n\t\t\tdraggedClientIds,\n\t\t\texpandedState,\n\t\t\texpand,\n\t\t\tfirstDraggedBlockIndex,\n\t\t\tcollapse,\n\t\t\tcollapseAll,\n\t\t\tBlockSettingsMenu,\n\t\t\tinstanceId,\n\t\t\tAdditionalBlockContent,\n\t\t\tinsertedBlock,\n\t\t\tsetInsertedBlock,\n\t\t\trootClientId,\n\t\t]\n\t);\n\n\t// List View renders a fixed number of items and relies on each having a fixed item height of 36px.\n\t// If this value changes, we should also change the itemHeight value set in useFixedWindowList.\n\t// See: https://github.com/WordPress/gutenberg/pull/35230 for additional context.\n\tconst [ fixedListWindow ] = useFixedWindowList(\n\t\telementRef,\n\t\tBLOCK_LIST_ITEM_HEIGHT,\n\t\tvisibleBlockCount,\n\t\t{\n\t\t\t// Ensure that the windowing logic is recalculated when the expanded state changes.\n\t\t\t// This is necessary because expanding a collapsed block in a short list view can\n\t\t\t// switch the list view to a tall list view with a scrollbar, and vice versa.\n\t\t\t// When this happens, the windowing logic needs to be recalculated to ensure that\n\t\t\t// the correct number of blocks are rendered, by rechecking for a scroll container.\n\t\t\texpandedState,\n\t\t\tuseWindowing: true,\n\t\t\twindowOverscan: 40,\n\t\t}\n\t);\n\n\t// If there are no blocks to show and we're not showing the appender, do not render the list view.\n\tif ( ! clientIdsTree.length && ! showAppender ) {\n\t\treturn null;\n\t}\n\n\tconst describedById =\n\t\tdescription && `block-editor-list-view-description-${ instanceId }`;\n\n\treturn (\n\t\t<AsyncModeProvider value>\n\t\t\t<ListViewDropIndicatorPreview\n\t\t\t\tdraggedBlockClientId={ firstDraggedBlockClientId }\n\t\t\t\tlistViewRef={ elementRef }\n\t\t\t\tblockDropTarget={ blockDropTarget }\n\t\t\t/>\n\t\t\t{ description && (\n\t\t\t\t<VisuallyHidden id={ describedById }>\n\t\t\t\t\t{ description }\n\t\t\t\t</VisuallyHidden>\n\t\t\t) }\n\t\t\t<TreeGrid\n\t\t\t\tid={ id }\n\t\t\t\tclassName={ clsx( 'block-editor-list-view-tree', {\n\t\t\t\t\t'is-dragging':\n\t\t\t\t\t\tdraggedClientIds?.length > 0 &&\n\t\t\t\t\t\tblockDropTargetIndex !== undefined,\n\t\t\t\t} ) }\n\t\t\t\taria-label={ __( 'Block navigation structure' ) }\n\t\t\t\tref={ treeGridRef }\n\t\t\t\tonCollapseRow={ collapseRow }\n\t\t\t\tonExpandRow={ expandRow }\n\t\t\t\tonFocusRow={ focusRow }\n\t\t\t\tapplicationAriaLabel={ __( 'Block navigation structure' ) }\n\t\t\t\taria-describedby={ describedById }\n\t\t\t\tstyle={ {\n\t\t\t\t\t'--wp-admin--list-view-dragged-items-height':\n\t\t\t\t\t\tdraggedClientIds?.length\n\t\t\t\t\t\t\t? `${\n\t\t\t\t\t\t\t\t\tBLOCK_LIST_ITEM_HEIGHT *\n\t\t\t\t\t\t\t\t\t( draggedClientIds.length - 1 )\n\t\t\t\t\t\t\t }px`\n\t\t\t\t\t\t\t: null,\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t<ListViewContext.Provider value={ contextValue }>\n\t\t\t\t\t<ListViewBranch\n\t\t\t\t\t\tblocks={ clientIdsTree }\n\t\t\t\t\t\tparentId={ rootClientId }\n\t\t\t\t\t\tselectBlock={ selectEditorBlock }\n\t\t\t\t\t\tshowBlockMovers={ showBlockMovers }\n\t\t\t\t\t\tfixedListWindow={ fixedListWindow }\n\t\t\t\t\t\tselectedClientIds={ selectedClientIds }\n\t\t\t\t\t\tisExpanded={ isExpanded }\n\t\t\t\t\t\tshowAppender={ showAppender }\n\t\t\t\t\t/>\n\t\t\t\t</ListViewContext.Provider>\n\t\t\t</TreeGrid>\n\t\t</AsyncModeProvider>\n\t);\n}\n\n// This is the private API for the ListView component.\n// It allows access to all props, not just the public ones.\nexport const PrivateListView = forwardRef( ListViewComponent );\n\n// This is the public API for the ListView component.\n// We wrap the PrivateListView component to hide some props from the public API.\nexport default forwardRef( ( props, ref ) => {\n\treturn (\n\t\t<PrivateListView\n\t\t\tref={ ref }\n\t\t\t{ ...props }\n\t\t\tshowAppender={ false }\n\t\t\trootClientId={ null }\n\t\t\tonSelect={ null }\n\t\t\tadditionalBlockContent={ null }\n\t\t\tblockSettingsMenu={ undefined }\n\t\t/>\n\t);\n} );\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AAKA,IAAAE,WAAA,GAAAF,OAAA;AAIA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AASA,IAAAM,KAAA,GAAAN,OAAA;AAKA,IAAAO,OAAA,GAAAR,sBAAA,CAAAC,OAAA;AACA,IAAAQ,QAAA,GAAAR,OAAA;AACA,IAAAS,cAAA,GAAAV,sBAAA,CAAAC,OAAA;AACA,IAAAU,kBAAA,GAAAX,sBAAA,CAAAC,OAAA;AACA,IAAAW,wBAAA,GAAAZ,sBAAA,CAAAC,OAAA;AACA,IAAAY,qBAAA,GAAAb,sBAAA,CAAAC,OAAA;AACA,IAAAa,yBAAA,GAAAd,sBAAA,CAAAC,OAAA;AACA,IAAAc,oBAAA,GAAAf,sBAAA,CAAA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H,GAAA,EAACiB,eAAe;IACfxG,GAAG,EAAGA,GAAK;IAAA,GACN2G,KAAK;IACVpH,YAAY,EAAG,KAAO;IACtBI,YAAY,EAAG,IAAM;IACrBE,QAAQ,EAAG,IAAM;IACjBC,sBAAsB,EAAG,IAAM;IAC/BN,iBAAiB,EAAGiF;EAAW,CAC/B,CAAC;AAEJ,CAAE,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_clsx","_interopRequireDefault","require","_compose","_components","_data","_deprecated","_element","_i18n","_branch","_context","_dropIndicator","_useBlockSelection","_useListViewBlockIndexes","_useListViewClientIds","_useListViewCollapseItems","_useListViewDropZone","_useListViewExpandSelectedItem","_store","_blockSettingsDropdown","_utils","_useClipboardHandler","_jsxRuntime","expanded","state","action","type","Array","isArray","clientIds","reduce","newState","id","BLOCK_LIST_ITEM_HEIGHT","exports","ListViewComponent","blocks","dropZoneElement","showBlockMovers","isExpanded","showAppender","blockSettingsMenu","BlockSettingsMenu","BlockSettingsDropdown","rootClientId","description","onSelect","additionalBlockContent","AdditionalBlockContent","ref","deprecated","since","alternative","instanceId","useInstanceId","clientIdsTree","draggedClientIds","selectedClientIds","useListViewClientIds","blockIndexes","useListViewBlockIndexes","getBlock","useSelect","blockEditorStore","visibleBlockCount","select","getGlobalBlockCount","getClientIdsOfDescendants","draggedBlockCount","length","updateBlockSelection","useBlockSelection","expandedState","setExpandedState","useReducer","insertedBlock","setInsertedBlock","useState","setSelectedTreeId","useListViewExpandSelectedItem","firstSelectedBlockClientId","selectEditorBlock","useCallback","event","blockClientId","focusPosition","dropZoneRef","target","blockDropTarget","useListViewDropZone","elementRef","useRef","clipBoardRef","useClipboardHandler","selectBlock","treeGridRef","useMergeRefs","useEffect","focusListItem","current","expand","clientId","collapse","collapseAll","expandRow","row","dataset","block","collapseRow","focusRow","startRow","endRow","shiftKey","useListViewCollapseItems","firstDraggedBlockClientId","blockDropTargetIndex","blockDropPosition","firstDraggedBlockIndex","useMemo","_blockDropTargetIndex","_firstDraggedBlockIndex","foundBlockIndex","undefined","dropPosition","contextValue","listViewInstanceId","treeGridElementRef","fixedListWindow","useFixedWindowList","useWindowing","windowOverscan","describedById","jsxs","AsyncModeProvider","value","children","jsx","default","draggedBlockClientId","listViewRef","VisuallyHidden","__experimentalTreeGrid","className","clsx","__","onCollapseRow","onExpandRow","onFocusRow","applicationAriaLabel","style","ListViewContext","Provider","parentId","PrivateListView","forwardRef","_default","props"],"sources":["@wordpress/block-editor/src/components/list-view/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tuseInstanceId,\n\tuseMergeRefs,\n\t__experimentalUseFixedWindowList as useFixedWindowList,\n} from '@wordpress/compose';\nimport {\n\t__experimentalTreeGrid as TreeGrid,\n\tVisuallyHidden,\n} from '@wordpress/components';\nimport { AsyncModeProvider, useSelect } from '@wordpress/data';\nimport deprecated from '@wordpress/deprecated';\nimport {\n\tuseCallback,\n\tuseEffect,\n\tuseMemo,\n\tuseRef,\n\tuseReducer,\n\tforwardRef,\n\tuseState,\n} from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport ListViewBranch from './branch';\nimport { ListViewContext } from './context';\nimport ListViewDropIndicatorPreview from './drop-indicator';\nimport useBlockSelection from './use-block-selection';\nimport useListViewBlockIndexes from './use-list-view-block-indexes';\nimport useListViewClientIds from './use-list-view-client-ids';\nimport useListViewCollapseItems from './use-list-view-collapse-items';\nimport useListViewDropZone from './use-list-view-drop-zone';\nimport useListViewExpandSelectedItem from './use-list-view-expand-selected-item';\nimport { store as blockEditorStore } from '../../store';\nimport { BlockSettingsDropdown } from '../block-settings-menu/block-settings-dropdown';\nimport { focusListItem } from './utils';\nimport useClipboardHandler from './use-clipboard-handler';\n\nconst expanded = ( state, action ) => {\n\tif ( action.type === 'clear' ) {\n\t\treturn {};\n\t}\n\tif ( Array.isArray( action.clientIds ) ) {\n\t\treturn {\n\t\t\t...state,\n\t\t\t...action.clientIds.reduce(\n\t\t\t\t( newState, id ) => ( {\n\t\t\t\t\t...newState,\n\t\t\t\t\t[ id ]: action.type === 'expand',\n\t\t\t\t} ),\n\t\t\t\t{}\n\t\t\t),\n\t\t};\n\t}\n\treturn state;\n};\n\nexport const BLOCK_LIST_ITEM_HEIGHT = 32;\n\n/** @typedef {import('react').ComponentType} ComponentType */\n/** @typedef {import('react').Ref<HTMLElement>} Ref */\n\n/**\n * Show a hierarchical list of blocks.\n *\n * @param {Object} props Components props.\n * @param {string} props.id An HTML element id for the root element of ListView.\n * @param {Array} props.blocks _deprecated_ Custom subset of block client IDs to be used instead of the default hierarchy.\n * @param {?HTMLElement} props.dropZoneElement Optional element to be used as the drop zone.\n * @param {?boolean} props.showBlockMovers Flag to enable block movers. Defaults to `false`.\n * @param {?boolean} props.isExpanded Flag to determine whether nested levels are expanded by default. Defaults to `false`.\n * @param {?boolean} props.showAppender Flag to show or hide the block appender. Defaults to `false`.\n * @param {?ComponentType} props.blockSettingsMenu Optional more menu substitution. Defaults to the standard `BlockSettingsDropdown` component.\n * @param {string} props.rootClientId The client id of the root block from which we determine the blocks to show in the list.\n * @param {string} props.description Optional accessible description for the tree grid component.\n * @param {?Function} props.onSelect Optional callback to be invoked when a block is selected. Receives the block object that was selected.\n * @param {?ComponentType} props.additionalBlockContent Component that renders additional block content UI.\n * @param {Ref} ref Forwarded ref\n */\nfunction ListViewComponent(\n\t{\n\t\tid,\n\t\tblocks,\n\t\tdropZoneElement,\n\t\tshowBlockMovers = false,\n\t\tisExpanded = false,\n\t\tshowAppender = false,\n\t\tblockSettingsMenu: BlockSettingsMenu = BlockSettingsDropdown,\n\t\trootClientId,\n\t\tdescription,\n\t\tonSelect,\n\t\tadditionalBlockContent: AdditionalBlockContent,\n\t},\n\tref\n) {\n\t// This can be removed once we no longer need to support the blocks prop.\n\tif ( blocks ) {\n\t\tdeprecated(\n\t\t\t'`blocks` property in `wp.blockEditor.__experimentalListView`',\n\t\t\t{\n\t\t\t\tsince: '6.3',\n\t\t\t\talternative: '`rootClientId` property',\n\t\t\t}\n\t\t);\n\t}\n\n\tconst instanceId = useInstanceId( ListViewComponent );\n\tconst { clientIdsTree, draggedClientIds, selectedClientIds } =\n\t\tuseListViewClientIds( { blocks, rootClientId } );\n\tconst blockIndexes = useListViewBlockIndexes( clientIdsTree );\n\n\tconst { getBlock } = useSelect( blockEditorStore );\n\tconst { visibleBlockCount } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getGlobalBlockCount, getClientIdsOfDescendants } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\tconst draggedBlockCount =\n\t\t\t\tdraggedClientIds?.length > 0\n\t\t\t\t\t? getClientIdsOfDescendants( draggedClientIds ).length + 1\n\t\t\t\t\t: 0;\n\t\t\treturn {\n\t\t\t\tvisibleBlockCount: getGlobalBlockCount() - draggedBlockCount,\n\t\t\t};\n\t\t},\n\t\t[ draggedClientIds ]\n\t);\n\n\tconst { updateBlockSelection } = useBlockSelection();\n\n\tconst [ expandedState, setExpandedState ] = useReducer( expanded, {} );\n\n\tconst [ insertedBlock, setInsertedBlock ] = useState( null );\n\n\tconst { setSelectedTreeId } = useListViewExpandSelectedItem( {\n\t\tfirstSelectedBlockClientId: selectedClientIds[ 0 ],\n\t\tsetExpandedState,\n\t} );\n\tconst selectEditorBlock = useCallback(\n\t\t/**\n\t\t * @param {MouseEvent | KeyboardEvent | undefined} event\n\t\t * @param {string} blockClientId\n\t\t * @param {null | undefined | -1 | 1} focusPosition\n\t\t */\n\t\t( event, blockClientId, focusPosition ) => {\n\t\t\tupdateBlockSelection( event, blockClientId, null, focusPosition );\n\t\t\tsetSelectedTreeId( blockClientId );\n\t\t\tif ( onSelect ) {\n\t\t\t\tonSelect( getBlock( blockClientId ) );\n\t\t\t}\n\t\t},\n\t\t[ setSelectedTreeId, updateBlockSelection, onSelect, getBlock ]\n\t);\n\n\tconst { ref: dropZoneRef, target: blockDropTarget } = useListViewDropZone( {\n\t\tdropZoneElement,\n\t\texpandedState,\n\t\tsetExpandedState,\n\t} );\n\tconst elementRef = useRef();\n\n\t// Allow handling of copy, cut, and paste events.\n\tconst clipBoardRef = useClipboardHandler( {\n\t\tselectBlock: selectEditorBlock,\n\t} );\n\n\tconst treeGridRef = useMergeRefs( [\n\t\tclipBoardRef,\n\t\telementRef,\n\t\tdropZoneRef,\n\t\tref,\n\t] );\n\n\tuseEffect( () => {\n\t\t// If a blocks are already selected when the list view is initially\n\t\t// mounted, shift focus to the first selected block.\n\t\tif ( selectedClientIds?.length ) {\n\t\t\tfocusListItem( selectedClientIds[ 0 ], elementRef?.current );\n\t\t}\n\t\t// Only focus on the selected item when the list view is mounted.\n\t}, [] );\n\n\tconst expand = useCallback(\n\t\t( clientId ) => {\n\t\t\tif ( ! clientId ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst clientIds = Array.isArray( clientId )\n\t\t\t\t? clientId\n\t\t\t\t: [ clientId ];\n\t\t\tsetExpandedState( { type: 'expand', clientIds } );\n\t\t},\n\t\t[ setExpandedState ]\n\t);\n\tconst collapse = useCallback(\n\t\t( clientId ) => {\n\t\t\tif ( ! clientId ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tsetExpandedState( { type: 'collapse', clientIds: [ clientId ] } );\n\t\t},\n\t\t[ setExpandedState ]\n\t);\n\tconst collapseAll = useCallback( () => {\n\t\tsetExpandedState( { type: 'clear' } );\n\t}, [ setExpandedState ] );\n\tconst expandRow = useCallback(\n\t\t( row ) => {\n\t\t\texpand( row?.dataset?.block );\n\t\t},\n\t\t[ expand ]\n\t);\n\tconst collapseRow = useCallback(\n\t\t( row ) => {\n\t\t\tcollapse( row?.dataset?.block );\n\t\t},\n\t\t[ collapse ]\n\t);\n\tconst focusRow = useCallback(\n\t\t( event, startRow, endRow ) => {\n\t\t\tif ( event.shiftKey ) {\n\t\t\t\tupdateBlockSelection(\n\t\t\t\t\tevent,\n\t\t\t\t\tstartRow?.dataset?.block,\n\t\t\t\t\tendRow?.dataset?.block\n\t\t\t\t);\n\t\t\t}\n\t\t},\n\t\t[ updateBlockSelection ]\n\t);\n\n\tuseListViewCollapseItems( {\n\t\tcollapseAll,\n\t\texpand,\n\t} );\n\n\tconst firstDraggedBlockClientId = draggedClientIds?.[ 0 ];\n\n\t// Convert a blockDropTarget into indexes relative to the blocks in the list view.\n\t// These values are used to determine which blocks should be displaced to make room\n\t// for the drop indicator. See `ListViewBranch` and `getDragDisplacementValues`.\n\tconst { blockDropTargetIndex, blockDropPosition, firstDraggedBlockIndex } =\n\t\tuseMemo( () => {\n\t\t\tlet _blockDropTargetIndex, _firstDraggedBlockIndex;\n\n\t\t\tif ( blockDropTarget?.clientId ) {\n\t\t\t\tconst foundBlockIndex =\n\t\t\t\t\tblockIndexes[ blockDropTarget.clientId ];\n\t\t\t\t// If dragging below or inside the block, treat the drop target as the next block.\n\t\t\t\t_blockDropTargetIndex =\n\t\t\t\t\tfoundBlockIndex === undefined ||\n\t\t\t\t\tblockDropTarget?.dropPosition === 'top'\n\t\t\t\t\t\t? foundBlockIndex\n\t\t\t\t\t\t: foundBlockIndex + 1;\n\t\t\t} else if ( blockDropTarget === null ) {\n\t\t\t\t// A `null` value is used to indicate that the user is dragging outside of the list view.\n\t\t\t\t_blockDropTargetIndex = null;\n\t\t\t}\n\n\t\t\tif ( firstDraggedBlockClientId ) {\n\t\t\t\tconst foundBlockIndex =\n\t\t\t\t\tblockIndexes[ firstDraggedBlockClientId ];\n\t\t\t\t_firstDraggedBlockIndex =\n\t\t\t\t\tfoundBlockIndex === undefined ||\n\t\t\t\t\tblockDropTarget?.dropPosition === 'top'\n\t\t\t\t\t\t? foundBlockIndex\n\t\t\t\t\t\t: foundBlockIndex + 1;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tblockDropTargetIndex: _blockDropTargetIndex,\n\t\t\t\tblockDropPosition: blockDropTarget?.dropPosition,\n\t\t\t\tfirstDraggedBlockIndex: _firstDraggedBlockIndex,\n\t\t\t};\n\t\t}, [ blockDropTarget, blockIndexes, firstDraggedBlockClientId ] );\n\n\tconst contextValue = useMemo(\n\t\t() => ( {\n\t\t\tblockDropPosition,\n\t\t\tblockDropTargetIndex,\n\t\t\tblockIndexes,\n\t\t\tdraggedClientIds,\n\t\t\texpandedState,\n\t\t\texpand,\n\t\t\tfirstDraggedBlockIndex,\n\t\t\tcollapse,\n\t\t\tcollapseAll,\n\t\t\tBlockSettingsMenu,\n\t\t\tlistViewInstanceId: instanceId,\n\t\t\tAdditionalBlockContent,\n\t\t\tinsertedBlock,\n\t\t\tsetInsertedBlock,\n\t\t\ttreeGridElementRef: elementRef,\n\t\t\trootClientId,\n\t\t} ),\n\t\t[\n\t\t\tblockDropPosition,\n\t\t\tblockDropTargetIndex,\n\t\t\tblockIndexes,\n\t\t\tdraggedClientIds,\n\t\t\texpandedState,\n\t\t\texpand,\n\t\t\tfirstDraggedBlockIndex,\n\t\t\tcollapse,\n\t\t\tcollapseAll,\n\t\t\tBlockSettingsMenu,\n\t\t\tinstanceId,\n\t\t\tAdditionalBlockContent,\n\t\t\tinsertedBlock,\n\t\t\tsetInsertedBlock,\n\t\t\trootClientId,\n\t\t]\n\t);\n\n\t// List View renders a fixed number of items and relies on each having a fixed item height of 36px.\n\t// If this value changes, we should also change the itemHeight value set in useFixedWindowList.\n\t// See: https://github.com/WordPress/gutenberg/pull/35230 for additional context.\n\tconst [ fixedListWindow ] = useFixedWindowList(\n\t\telementRef,\n\t\tBLOCK_LIST_ITEM_HEIGHT,\n\t\tvisibleBlockCount,\n\t\t{\n\t\t\t// Ensure that the windowing logic is recalculated when the expanded state changes.\n\t\t\t// This is necessary because expanding a collapsed block in a short list view can\n\t\t\t// switch the list view to a tall list view with a scrollbar, and vice versa.\n\t\t\t// When this happens, the windowing logic needs to be recalculated to ensure that\n\t\t\t// the correct number of blocks are rendered, by rechecking for a scroll container.\n\t\t\texpandedState,\n\t\t\tuseWindowing: true,\n\t\t\twindowOverscan: 40,\n\t\t}\n\t);\n\n\t// If there are no blocks to show and we're not showing the appender, do not render the list view.\n\tif ( ! clientIdsTree.length && ! showAppender ) {\n\t\treturn null;\n\t}\n\n\tconst describedById =\n\t\tdescription && `block-editor-list-view-description-${ instanceId }`;\n\n\treturn (\n\t\t<AsyncModeProvider value>\n\t\t\t<ListViewDropIndicatorPreview\n\t\t\t\tdraggedBlockClientId={ firstDraggedBlockClientId }\n\t\t\t\tlistViewRef={ elementRef }\n\t\t\t\tblockDropTarget={ blockDropTarget }\n\t\t\t/>\n\t\t\t{ description && (\n\t\t\t\t<VisuallyHidden id={ describedById }>\n\t\t\t\t\t{ description }\n\t\t\t\t</VisuallyHidden>\n\t\t\t) }\n\t\t\t<TreeGrid\n\t\t\t\tid={ id }\n\t\t\t\tclassName={ clsx( 'block-editor-list-view-tree', {\n\t\t\t\t\t'is-dragging':\n\t\t\t\t\t\tdraggedClientIds?.length > 0 &&\n\t\t\t\t\t\tblockDropTargetIndex !== undefined,\n\t\t\t\t} ) }\n\t\t\t\taria-label={ __( 'Block navigation structure' ) }\n\t\t\t\tref={ treeGridRef }\n\t\t\t\tonCollapseRow={ collapseRow }\n\t\t\t\tonExpandRow={ expandRow }\n\t\t\t\tonFocusRow={ focusRow }\n\t\t\t\tapplicationAriaLabel={ __( 'Block navigation structure' ) }\n\t\t\t\taria-describedby={ describedById }\n\t\t\t\tstyle={ {\n\t\t\t\t\t'--wp-admin--list-view-dragged-items-height':\n\t\t\t\t\t\tdraggedClientIds?.length\n\t\t\t\t\t\t\t? `${\n\t\t\t\t\t\t\t\t\tBLOCK_LIST_ITEM_HEIGHT *\n\t\t\t\t\t\t\t\t\t( draggedClientIds.length - 1 )\n\t\t\t\t\t\t\t }px`\n\t\t\t\t\t\t\t: null,\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t<ListViewContext.Provider value={ contextValue }>\n\t\t\t\t\t<ListViewBranch\n\t\t\t\t\t\tblocks={ clientIdsTree }\n\t\t\t\t\t\tparentId={ rootClientId }\n\t\t\t\t\t\tselectBlock={ selectEditorBlock }\n\t\t\t\t\t\tshowBlockMovers={ showBlockMovers }\n\t\t\t\t\t\tfixedListWindow={ fixedListWindow }\n\t\t\t\t\t\tselectedClientIds={ selectedClientIds }\n\t\t\t\t\t\tisExpanded={ isExpanded }\n\t\t\t\t\t\tshowAppender={ showAppender }\n\t\t\t\t\t/>\n\t\t\t\t</ListViewContext.Provider>\n\t\t\t</TreeGrid>\n\t\t</AsyncModeProvider>\n\t);\n}\n\n// This is the private API for the ListView component.\n// It allows access to all props, not just the public ones.\nexport const PrivateListView = forwardRef( ListViewComponent );\n\n// This is the public API for the ListView component.\n// We wrap the PrivateListView component to hide some props from the public API.\nexport default forwardRef( ( props, ref ) => {\n\treturn (\n\t\t<PrivateListView\n\t\t\tref={ ref }\n\t\t\t{ ...props }\n\t\t\tshowAppender={ false }\n\t\t\trootClientId={ null }\n\t\t\tonSelect={ null }\n\t\t\tadditionalBlockContent={ null }\n\t\t\tblockSettingsMenu={ undefined }\n\t\t/>\n\t);\n} );\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AAKA,IAAAE,WAAA,GAAAF,OAAA;AAIA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AASA,IAAAM,KAAA,GAAAN,OAAA;AAKA,IAAAO,OAAA,GAAAR,sBAAA,CAAAC,OAAA;AACA,IAAAQ,QAAA,GAAAR,OAAA;AACA,IAAAS,cAAA,GAAAV,sBAAA,CAAAC,OAAA;AACA,IAAAU,kBAAA,GAAAX,sBAAA,CAAAC,OAAA;AACA,IAAAW,wBAAA,GAAAZ,sBAAA,CAAAC,OAAA;AACA,IAAAY,qBAAA,GAAAb,sBAAA,CAAAC,OAAA;AACA,IAAAa,yBAAA,GAAAd,sBAAA,CAAAC,OAAA;AACA,IAA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BACC,IAAA3B,WAAA,CAAAkH,GAAA,EAACiB,eAAe;IACfxG,GAAG,EAAGA,GAAK;IAAA,GACN2G,KAAK;IACVpH,YAAY,EAAG,KAAO;IACtBI,YAAY,EAAG,IAAM;IACrBE,QAAQ,EAAG,IAAM;IACjBC,sBAAsB,EAAG,IAAM;IAC/BN,iBAAiB,EAAGiF;EAAW,CAC/B,CAAC;AAEJ,CAAE,CAAC","ignoreList":[]}
@@ -48,7 +48,7 @@ const ExperimentalBlockEditorProvider = exports.ExperimentalBlockEditorProvider
48
48
  (0, _useBlockSync.default)(props);
49
49
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.SlotFillProvider, {
50
50
  passthrough: true,
51
- children: [!settings?.__unstableIsPreviewMode && /*#__PURE__*/(0, _jsxRuntime.jsx)(_keyboardShortcuts.default.Register, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_blockRefsProvider.BlockRefsProvider, {
51
+ children: [!settings?.isPreviewMode && /*#__PURE__*/(0, _jsxRuntime.jsx)(_keyboardShortcuts.default.Register, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_blockRefsProvider.BlockRefsProvider, {
52
52
  children: children
53
53
  })]
54
54
  });
@@ -1 +1 @@
1
- {"version":3,"names":["_data","require","_element","_components","_withRegistryProvider","_interopRequireDefault","_useBlockSync","_store","_blockRefsProvider","_lockUnlock","_keyboardShortcuts","_jsxRuntime","ExperimentalBlockEditorProvider","exports","withRegistryProvider","props","children","settings","stripExperimentalSettings","__experimentalUpdateSettings","unlock","useDispatch","blockEditorStore","useEffect","__internalIsInitialized","reset","useBlockSync","jsxs","SlotFillProvider","passthrough","__unstableIsPreviewMode","jsx","default","Register","BlockRefsProvider","BlockEditorProvider","_default"],"sources":["@wordpress/block-editor/src/components/provider/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useDispatch } from '@wordpress/data';\nimport { useEffect } from '@wordpress/element';\nimport { SlotFillProvider } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport withRegistryProvider from './with-registry-provider';\nimport useBlockSync from './use-block-sync';\nimport { store as blockEditorStore } from '../../store';\nimport { BlockRefsProvider } from './block-refs-provider';\nimport { unlock } from '../../lock-unlock';\nimport KeyboardShortcuts from '../keyboard-shortcuts';\n\n/** @typedef {import('@wordpress/data').WPDataRegistry} WPDataRegistry */\n\nexport const ExperimentalBlockEditorProvider = withRegistryProvider(\n\t( props ) => {\n\t\tconst { children, settings, stripExperimentalSettings = false } = props;\n\n\t\tconst { __experimentalUpdateSettings } = unlock(\n\t\t\tuseDispatch( blockEditorStore )\n\t\t);\n\t\tuseEffect( () => {\n\t\t\t__experimentalUpdateSettings(\n\t\t\t\t{\n\t\t\t\t\t...settings,\n\t\t\t\t\t__internalIsInitialized: true,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tstripExperimentalSettings,\n\t\t\t\t\treset: true,\n\t\t\t\t}\n\t\t\t);\n\t\t}, [\n\t\t\tsettings,\n\t\t\tstripExperimentalSettings,\n\t\t\t__experimentalUpdateSettings,\n\t\t] );\n\n\t\t// Syncs the entity provider with changes in the block-editor store.\n\t\tuseBlockSync( props );\n\n\t\treturn (\n\t\t\t<SlotFillProvider passthrough>\n\t\t\t\t{ ! settings?.__unstableIsPreviewMode && (\n\t\t\t\t\t<KeyboardShortcuts.Register />\n\t\t\t\t) }\n\t\t\t\t<BlockRefsProvider>{ children }</BlockRefsProvider>\n\t\t\t</SlotFillProvider>\n\t\t);\n\t}\n);\n\nexport const BlockEditorProvider = ( props ) => {\n\treturn (\n\t\t<ExperimentalBlockEditorProvider { ...props } stripExperimentalSettings>\n\t\t\t{ props.children }\n\t\t</ExperimentalBlockEditorProvider>\n\t);\n};\n\nexport default BlockEditorProvider;\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAKA,IAAAG,qBAAA,GAAAC,sBAAA,CAAA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AKpB,KAAK,IAAM;EAC/C,oBACC,IAAAJ,WAAA,CAAAoB,GAAA,EAACnB,+BAA+B;IAAA,GAAMG,KAAK;IAAGG,yBAAyB;IAAAF,QAAA,EACpED,KAAK,CAACC;EAAQ,CACgB,CAAC;AAEpC,CAAC;AAACH,OAAA,CAAAsB,mBAAA,GAAAA,mBAAA;AAAA,IAAAC,QAAA,GAAAvB,OAAA,CAAAmB,OAAA,GAEaG,mBAAmB","ignoreList":[]}
1
+ {"version":3,"names":["_data","require","_element","_components","_withRegistryProvider","_interopRequireDefault","_useBlockSync","_store","_blockRefsProvider","_lockUnlock","_keyboardShortcuts","_jsxRuntime","ExperimentalBlockEditorProvider","exports","withRegistryProvider","props","children","settings","stripExperimentalSettings","__experimentalUpdateSettings","unlock","useDispatch","blockEditorStore","useEffect","__internalIsInitialized","reset","useBlockSync","jsxs","SlotFillProvider","passthrough","isPreviewMode","jsx","default","Register","BlockRefsProvider","BlockEditorProvider","_default"],"sources":["@wordpress/block-editor/src/components/provider/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useDispatch } from '@wordpress/data';\nimport { useEffect } from '@wordpress/element';\nimport { SlotFillProvider } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport withRegistryProvider from './with-registry-provider';\nimport useBlockSync from './use-block-sync';\nimport { store as blockEditorStore } from '../../store';\nimport { BlockRefsProvider } from './block-refs-provider';\nimport { unlock } from '../../lock-unlock';\nimport KeyboardShortcuts from '../keyboard-shortcuts';\n\n/** @typedef {import('@wordpress/data').WPDataRegistry} WPDataRegistry */\n\nexport const ExperimentalBlockEditorProvider = withRegistryProvider(\n\t( props ) => {\n\t\tconst { children, settings, stripExperimentalSettings = false } = props;\n\n\t\tconst { __experimentalUpdateSettings } = unlock(\n\t\t\tuseDispatch( blockEditorStore )\n\t\t);\n\t\tuseEffect( () => {\n\t\t\t__experimentalUpdateSettings(\n\t\t\t\t{\n\t\t\t\t\t...settings,\n\t\t\t\t\t__internalIsInitialized: true,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tstripExperimentalSettings,\n\t\t\t\t\treset: true,\n\t\t\t\t}\n\t\t\t);\n\t\t}, [\n\t\t\tsettings,\n\t\t\tstripExperimentalSettings,\n\t\t\t__experimentalUpdateSettings,\n\t\t] );\n\n\t\t// Syncs the entity provider with changes in the block-editor store.\n\t\tuseBlockSync( props );\n\n\t\treturn (\n\t\t\t<SlotFillProvider passthrough>\n\t\t\t\t{ ! settings?.isPreviewMode && <KeyboardShortcuts.Register /> }\n\t\t\t\t<BlockRefsProvider>{ children }</BlockRefsProvider>\n\t\t\t</SlotFillProvider>\n\t\t);\n\t}\n);\n\nexport const BlockEditorProvider = ( props ) => {\n\treturn (\n\t\t<ExperimentalBlockEditorProvider { ...props } stripExperimentalSettings>\n\t\t\t{ props.children }\n\t\t</ExperimentalBlockEditorProvider>\n\t);\n};\n\nexport default BlockEditorProvider;\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAKA,IAAAG,qBAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,aAAA,GAAAD,sBAAA,CAAAJ,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AACA,IAAAO,kBAAA,GAAAP,OAAA;AACA,IAAAQ,WAAA,GAAAR,OAAA;AACA,IAAAS,kBAAA,GAAAL,sBAAA,CAAAJ,OAAA;AAAsD,IAAAU,WAAA,GAAAV,OAAA;AAftD;AACA;AACA;;AAKA;AACA;AACA;;AAQA;;AAEO,MAAMW,+BAA+B,GAAAC,OAAA,CAAAD,+BAAA,GAAG,IAAAE,6BAAoB,EAChEC,KAAK,IAAM;EACZ,MAAM;IAAEC,QAAQ;IAAEC,QAAQ;IAAEC,yBAAyB,GAAG;EAAM,CAAC,GAAGH,KAAK;EAEvE,MAAM;IAAEI;EAA6B,CAAC,GAAG,IAAAC,kBAAM,EAC9C,IAAAC,iBAAW,EAAEC,YAAiB,CAC/B,CAAC;EACD,IAAAC,kBAAS,EAAE,MAAM;IAChBJ,4BAA4B,CAC3B;MACC,GAAGF,QAAQ;MACXO,uBAAuB,EAAE;IAC1B,CAAC,EACD;MACCN,yBAAyB;MACzBO,KAAK,EAAE;IACR,CACD,CAAC;EACF,CAAC,EAAE,CACFR,QAAQ,EACRC,yBAAyB,EACzBC,4BAA4B,CAC3B,CAAC;;EAEH;EACA,IAAAO,qBAAY,EAAEX,KAAM,CAAC;EAErB,oBACC,IAAAJ,WAAA,CAAAgB,IAAA,EAACxB,WAAA,CAAAyB,gBAAgB;IAACC,WAAW;IAAAb,QAAA,GAC1B,CAAEC,QAAQ,EAAEa,aAAa,iBAAI,IAAAnB,WAAA,CAAAoB,GAAA,EAACrB,kBAAA,CAAAsB,OAAiB,CAACC,QAAQ,IAAE,CAAC,eAC7D,IAAAtB,WAAA,CAAAoB,GAAA,EAACvB,kBAAA,CAAA0B,iBAAiB;MAAAlB,QAAA,EAAGA;IAAQ,CAAqB,CAAC;EAAA,CAClC,CAAC;AAErB,CACD,CAAC;AAEM,MAAMmB,mBAAmB,GAAKpB,KAAK,IAAM;EAC/C,oBACC,IAAAJ,WAAA,CAAAoB,GAAA,EAACnB,+BAA+B;IAAA,GAAMG,KAAK;IAAGG,yBAAyB;IAAAF,QAAA,EACpED,KAAK,CAACC;EAAQ,CACgB,CAAC;AAEpC,CAAC;AAACH,OAAA,CAAAsB,mBAAA,GAAAA,mBAAA;AAAA,IAAAC,QAAA,GAAAvB,OAAA,CAAAmB,OAAA,GAEaG,mBAAmB","ignoreList":[]}
@@ -29,7 +29,9 @@ var _firefoxCompat = _interopRequireDefault(require("./firefox-compat"));
29
29
  const allEventListeners = [_beforeInputRules.default, _inputRules.default, _insertReplacementText.default, _removeBrowserShortcuts.default, _shortcuts.default, _inputEvents.default, _undoAutomaticChange.default, _pasteHandler.default, _delete2.default, _enter.default, _firefoxCompat.default];
30
30
  function useEventListeners(props) {
31
31
  const propsRef = (0, _element.useRef)(props);
32
- propsRef.current = props;
32
+ (0, _element.useInsertionEffect)(() => {
33
+ propsRef.current = props;
34
+ });
33
35
  const refEffects = (0, _element.useMemo)(() => allEventListeners.map(refEffect => refEffect(propsRef)), [propsRef]);
34
36
  return (0, _compose.useRefEffect)(element => {
35
37
  if (!props.isSelected) {
@@ -1 +1 @@
1
- {"version":3,"names":["_element","require","_compose","_beforeInputRules","_interopRequireDefault","_inputRules","_insertReplacementText","_removeBrowserShortcuts","_shortcuts","_inputEvents","_undoAutomaticChange","_pasteHandler","_delete2","_enter","_firefoxCompat","allEventListeners","beforeInputRules","inputRules","insertReplacementText","removeBrowserShortcuts","shortcuts","inputEvents","undoAutomaticChange","pasteHandler","_delete","enter","firefoxCompat","useEventListeners","props","propsRef","useRef","current","refEffects","useMemo","map","refEffect","useRefEffect","element","isSelected","cleanups","effect","forEach","cleanup"],"sources":["@wordpress/block-editor/src/components/rich-text/event-listeners/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useMemo, useRef } from '@wordpress/element';\nimport { useRefEffect } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport beforeInputRules from './before-input-rules';\nimport inputRules from './input-rules';\nimport insertReplacementText from './insert-replacement-text';\nimport removeBrowserShortcuts from './remove-browser-shortcuts';\nimport shortcuts from './shortcuts';\nimport inputEvents from './input-events';\nimport undoAutomaticChange from './undo-automatic-change';\nimport pasteHandler from './paste-handler';\nimport _delete from './delete';\nimport enter from './enter';\nimport firefoxCompat from './firefox-compat';\n\nconst allEventListeners = [\n\tbeforeInputRules,\n\tinputRules,\n\tinsertReplacementText,\n\tremoveBrowserShortcuts,\n\tshortcuts,\n\tinputEvents,\n\tundoAutomaticChange,\n\tpasteHandler,\n\t_delete,\n\tenter,\n\tfirefoxCompat,\n];\n\nexport function useEventListeners( props ) {\n\tconst propsRef = useRef( props );\n\tpropsRef.current = props;\n\tconst refEffects = useMemo(\n\t\t() => allEventListeners.map( ( refEffect ) => refEffect( propsRef ) ),\n\t\t[ propsRef ]\n\t);\n\n\treturn useRefEffect(\n\t\t( element ) => {\n\t\t\tif ( ! props.isSelected ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst cleanups = refEffects.map( ( effect ) => effect( element ) );\n\t\t\treturn () => {\n\t\t\t\tcleanups.forEach( ( cleanup ) => cleanup() );\n\t\t\t};\n\t\t},\n\t\t[ refEffects, props.isSelected ]\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AAKA,IAAAE,iBAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,WAAA,GAAAD,sBAAA,CAAAH,OAAA;AACA,IAAAK,sBAAA,GAAAF,sBAAA,CAAAH,OAAA;AACA,IAAAM,uBAAA,GAAAH,sBAAA,CAAAH,OAAA;AACA,IAAAO,UAAA,GAAAJ,sBAAA,CAAAH,OAAA;AACA,IAAAQ,YAAA,GAAAL,sBAAA,CAAAH,OAAA;AACA,IAAAS,oBAAA,GAAAN,sBAAA,CAAAH,OAAA;AACA,IAAAU,aAAA,GAAAP,sBAAA,CAAAH,OAAA;AACA,IAAAW,QAAA,GAAAR,sBAAA,CAAAH,OAAA;AACA,IAAAY,MAAA,GAAAT,sBAAA,CAAAH,OAAA;AACA,IAAAa,cAAA,GAAAV,sBAAA,CAAAH,OAAA;AAnBA;AACA;AACA;;AAIA;AACA;AACA;;AAaA,MAAMc,iBAAiB,GAAG,CACzBC,yBAAgB,EAChBC,mBAAU,EACVC,8BAAqB,EACrBC,+BAAsB,EACtBC,kBAAS,EACTC,oBAAW,EACXC,4BAAmB,EACnBC,qBAAY,EACZC,gBAAO,EACPC,cAAK,EACLC,sBAAa,CACb;AAEM,SAASC,iBAAiBA,CAAEC,KAAK,EAAG;EAC1C,MAAMC,QAAQ,GAAG,IAAAC,eAAM,EAAEF,KAAM,CAAC;EAChCC,QAAQ,CAACE,OAAO,GAAGH,KAAK;EACxB,MAAMI,UAAU,GAAG,IAAAC,gBAAO,EACzB,MAAMlB,iBAAiB,CAACmB,GAAG,CAAIC,SAAS,IAAMA,SAAS,CAAEN,QAAS,CAAE,CAAC,EACrE,CAAEA,QAAQ,CACX,CAAC;EAED,OAAO,IAAAO,qBAAY,EAChBC,OAAO,IAAM;IACd,IAAK,CAAET,KAAK,CAACU,UAAU,EAAG;MACzB;IACD;IACA,MAAMC,QAAQ,GAAGP,UAAU,CAACE,GAAG,CAAIM,MAAM,IAAMA,MAAM,CAAEH,OAAQ,CAAE,CAAC;IAClE,OAAO,MAAM;MACZE,QAAQ,CAACE,OAAO,CAAIC,OAAO,IAAMA,OAAO,CAAC,CAAE,CAAC;IAC7C,CAAC;EACF,CAAC,EACD,CAAEV,UAAU,EAAEJ,KAAK,CAACU,UAAU,CAC/B,CAAC;AACF","ignoreList":[]}
1
+ {"version":3,"names":["_element","require","_compose","_beforeInputRules","_interopRequireDefault","_inputRules","_insertReplacementText","_removeBrowserShortcuts","_shortcuts","_inputEvents","_undoAutomaticChange","_pasteHandler","_delete2","_enter","_firefoxCompat","allEventListeners","beforeInputRules","inputRules","insertReplacementText","removeBrowserShortcuts","shortcuts","inputEvents","undoAutomaticChange","pasteHandler","_delete","enter","firefoxCompat","useEventListeners","props","propsRef","useRef","useInsertionEffect","current","refEffects","useMemo","map","refEffect","useRefEffect","element","isSelected","cleanups","effect","forEach","cleanup"],"sources":["@wordpress/block-editor/src/components/rich-text/event-listeners/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useMemo, useRef, useInsertionEffect } from '@wordpress/element';\nimport { useRefEffect } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport beforeInputRules from './before-input-rules';\nimport inputRules from './input-rules';\nimport insertReplacementText from './insert-replacement-text';\nimport removeBrowserShortcuts from './remove-browser-shortcuts';\nimport shortcuts from './shortcuts';\nimport inputEvents from './input-events';\nimport undoAutomaticChange from './undo-automatic-change';\nimport pasteHandler from './paste-handler';\nimport _delete from './delete';\nimport enter from './enter';\nimport firefoxCompat from './firefox-compat';\n\nconst allEventListeners = [\n\tbeforeInputRules,\n\tinputRules,\n\tinsertReplacementText,\n\tremoveBrowserShortcuts,\n\tshortcuts,\n\tinputEvents,\n\tundoAutomaticChange,\n\tpasteHandler,\n\t_delete,\n\tenter,\n\tfirefoxCompat,\n];\n\nexport function useEventListeners( props ) {\n\tconst propsRef = useRef( props );\n\tuseInsertionEffect( () => {\n\t\tpropsRef.current = props;\n\t} );\n\tconst refEffects = useMemo(\n\t\t() => allEventListeners.map( ( refEffect ) => refEffect( propsRef ) ),\n\t\t[ propsRef ]\n\t);\n\n\treturn useRefEffect(\n\t\t( element ) => {\n\t\t\tif ( ! props.isSelected ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst cleanups = refEffects.map( ( effect ) => effect( element ) );\n\t\t\treturn () => {\n\t\t\t\tcleanups.forEach( ( cleanup ) => cleanup() );\n\t\t\t};\n\t\t},\n\t\t[ refEffects, props.isSelected ]\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AAKA,IAAAE,iBAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,WAAA,GAAAD,sBAAA,CAAAH,OAAA;AACA,IAAAK,sBAAA,GAAAF,sBAAA,CAAAH,OAAA;AACA,IAAAM,uBAAA,GAAAH,sBAAA,CAAAH,OAAA;AACA,IAAAO,UAAA,GAAAJ,sBAAA,CAAAH,OAAA;AACA,IAAAQ,YAAA,GAAAL,sBAAA,CAAAH,OAAA;AACA,IAAAS,oBAAA,GAAAN,sBAAA,CAAAH,OAAA;AACA,IAAAU,aAAA,GAAAP,sBAAA,CAAAH,OAAA;AACA,IAAAW,QAAA,GAAAR,sBAAA,CAAAH,OAAA;AACA,IAAAY,MAAA,GAAAT,sBAAA,CAAAH,OAAA;AACA,IAAAa,cAAA,GAAAV,sBAAA,CAAAH,OAAA;AAnBA;AACA;AACA;;AAIA;AACA;AACA;;AAaA,MAAMc,iBAAiB,GAAG,CACzBC,yBAAgB,EAChBC,mBAAU,EACVC,8BAAqB,EACrBC,+BAAsB,EACtBC,kBAAS,EACTC,oBAAW,EACXC,4BAAmB,EACnBC,qBAAY,EACZC,gBAAO,EACPC,cAAK,EACLC,sBAAa,CACb;AAEM,SAASC,iBAAiBA,CAAEC,KAAK,EAAG;EAC1C,MAAMC,QAAQ,GAAG,IAAAC,eAAM,EAAEF,KAAM,CAAC;EAChC,IAAAG,2BAAkB,EAAE,MAAM;IACzBF,QAAQ,CAACG,OAAO,GAAGJ,KAAK;EACzB,CAAE,CAAC;EACH,MAAMK,UAAU,GAAG,IAAAC,gBAAO,EACzB,MAAMnB,iBAAiB,CAACoB,GAAG,CAAIC,SAAS,IAAMA,SAAS,CAAEP,QAAS,CAAE,CAAC,EACrE,CAAEA,QAAQ,CACX,CAAC;EAED,OAAO,IAAAQ,qBAAY,EAChBC,OAAO,IAAM;IACd,IAAK,CAAEV,KAAK,CAACW,UAAU,EAAG;MACzB;IACD;IACA,MAAMC,QAAQ,GAAGP,UAAU,CAACE,GAAG,CAAIM,MAAM,IAAMA,MAAM,CAAEH,OAAQ,CAAE,CAAC;IAClE,OAAO,MAAM;MACZE,QAAQ,CAACE,OAAO,CAAIC,OAAO,IAAMA,OAAO,CAAC,CAAE,CAAC;IAC7C,CAAC;EACF,CAAC,EACD,CAAEV,UAAU,EAAEL,KAAK,CAACW,UAAU,CAC/B,CAAC;AACF","ignoreList":[]}
@@ -202,9 +202,7 @@ function RichTextWrapper({
202
202
  }
203
203
  const onSelectionChange = (0, _element.useCallback)((selectionChangeStart, selectionChangeEnd) => {
204
204
  selectionChange(clientId, identifier, selectionChangeStart, selectionChangeEnd);
205
- },
206
- // eslint-disable-next-line react-hooks/exhaustive-deps
207
- [clientId, identifier]);
205
+ }, [clientId, identifier]);
208
206
  const clearCurrentSelectionOnUnmount = (0, _element.useCallback)(() => {
209
207
  if (getSelectedBlockClientId() === clientId) {
210
208
  clearSelectedBlock();
@@ -336,9 +334,7 @@ function RichTextWrapper({
336
334
  } else if (!disableLineBreaks) {
337
335
  onChange((0, _richText.insert)(value, '\n'));
338
336
  }
339
- },
340
- // eslint-disable-next-line react-hooks/exhaustive-deps
341
- [onReplace, onSplit, __unstableMarkAutomaticChange, splitValue, onSplitAtEnd]);
337
+ }, [onReplace, onSplit, __unstableMarkAutomaticChange, splitValue, onSplitAtEnd]);
342
338
  const onPaste = (0, _element.useCallback)(({
343
339
  value,
344
340
  onChange,
@@ -1 +1 @@
1
- {"version":3,"names":["_clsx","_interopRequireDefault","require","_element","_data","_blocks","_compose","_richText","_url","_autocomplete","_blockEdit","_removeBrowserShortcuts","_filePasteHandler","_formatToolbarContainer","_store","_utils","_embedHandlerPicker","_content","_native","_withDeprecations","_inputRules","_selection","_jsxRuntime","_shortcut","_toolbarButton","_inputEvent","classes","RichTextWrapper","children","tagName","start","reversed","value","originalValue","onChange","originalOnChange","isSelected","originalIsSelected","inlineToolbar","wrapperClassName","autocompleters","onReplace","placeholder","allowedFormats","withoutInteractiveFormatting","onRemove","onMerge","onSplit","__unstableOnSplitAtEnd","onSplitAtEnd","__unstableOnSplitMiddle","onSplitMiddle","__unstableOnSplitAtDoubleLineEnd","onSplitAtDoubleLineEnd","identifier","preserveWhiteSpace","__unstablePastePlainText","pastePlainText","__unstableEmbedURLOnPaste","__unstableDisableFormats","disableFormats","disableLineBreaks","unstableOnFocus","__unstableAllowPrefixTransformations","__unstableUseSplitSelection","__unstableMobileNoFocusOnMount","deleteEnter","placeholderTextColor","textAlign","selectionColor","tagsToEliminate","disableEditingMenu","fontSize","fontFamily","fontWeight","fontStyle","minWidth","maxWidth","onBlur","disableSuggestions","disableAutocorrection","containerWidth","onEnter","onCustomEnter","props","providedRef","instanceId","useInstanceId","fallbackRef","useRef","clientId","blockIsSelected","useBlockEditContext","embedHandlerPickerRef","selector","select","getSelectionStart","getSelectionEnd","getSettings","didAutomaticChange","getBlock","isMultiSelecting","hasMultiSelection","getSelectedBlockClientId","blockEditorStore","selectionStart","selectionEnd","__experimentalUndo","undo","undefined","attributeKey","extraProps","Platform","OS","block","shouldBlurOnUnmount","isUnmodifiedDefaultBlock","offset","disabled","useSelect","__unstableMarkLastChangeAsPersistent","enterFormattedText","exitFormattedText","selectionChange","__unstableMarkAutomaticChange","__unstableSplitSelection","clearSelectedBlock","useDispatch","adjustedAllowedFormats","getAllowedFormats","hasFormats","length","adjustedValue","adjustedOnChange","Array","isArray","childrenSource","toHTML","newValue","fromDOM","__unstableCreateElement","document","childNodes","onSelectionChange","useCallback","selectionChangeStart","selectionChangeEnd","clearCurrentSelectionOnUnmount","onDelete","isReverse","isEmpty","splitValue","record","pastedBlocks","blocks","before","after","split","hasPastedBlocks","lastPastedBlockIndex","isAfterOriginal","push","toHTMLString","indexToSelect","initialPosition","shiftKey","canSplit","transforms","getBlockTransforms","filter","type","transformation","findTransform","item","regExp","test","text","transform","content","splitStart","end","splitEnd","canSplitAtEnd","insert","slice","remove","onPaste","html","plainText","isInternal","files","activeFormats","pastedValue","create","addActiveFormats","pasteHandler","HTML","filePasteHandler","mode","window","console","log","isPastedURL","isURL","trim","presentEmbedHandlerPicker","current","presentPicker","createEmbed","createLink","createLinkInParagraph","valueToInsert","canPasteEmbed","name","source","inputRule","startPosition","characterBefore","trimmedTextBefore","prefixTransforms","prefix","START_OF_SELECTED_AREA","currentSelection","findSelection","mergedRef","useMergeRefs","jsx","default","nativeEditorRef","__unstableIsSelected","__unstableInputRule","__unstableOnEnterFormattedText","__unstableOnExitFormattedText","__unstableOnCreateUndoLevel","__unstableDidAutomaticChange","__unstableUndo","id","style","nestedIsSelected","onFocus","editableProps","editableTagName","TagName","jsxs","Fragment","inline","anchorRef","RemoveBrowserShortcuts","completers","contentRef","listBoxId","activeId","onKeyDown","className","clsx","event","ref","PrivateRichText","exports","withDeprecations","forwardRef","Content","defaultProps","format","Raw","_default"],"sources":["@wordpress/block-editor/src/components/rich-text/index.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { Platform, useRef, useCallback, forwardRef } from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport {\n\tpasteHandler,\n\tchildren as childrenSource,\n\tgetBlockTransforms,\n\tfindTransform,\n\tisUnmodifiedDefaultBlock,\n} from '@wordpress/blocks';\nimport { useInstanceId, useMergeRefs } from '@wordpress/compose';\nimport {\n\t__unstableCreateElement,\n\tisEmpty,\n\tinsert,\n\tremove,\n\tcreate,\n\tsplit,\n\ttoHTMLString,\n} from '@wordpress/rich-text';\nimport { isURL } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport Autocomplete from '../autocomplete';\nimport { useBlockEditContext } from '../block-edit';\nimport { RemoveBrowserShortcuts } from './remove-browser-shortcuts';\nimport { filePasteHandler } from './file-paste-handler';\nimport FormatToolbarContainer from './format-toolbar-container';\nimport { store as blockEditorStore } from '../../store';\nimport {\n\taddActiveFormats,\n\tgetAllowedFormats,\n\tcreateLinkInParagraph,\n} from './utils';\nimport EmbedHandlerPicker from './embed-handler-picker';\nimport { Content } from './content';\nimport RichText from './native';\nimport { withDeprecations } from './with-deprecations';\nimport { findSelection } from './event-listeners/input-rules';\nimport { START_OF_SELECTED_AREA } from '../../utils/selection';\n\nconst classes = 'block-editor-rich-text__editable';\n\nexport function RichTextWrapper(\n\t{\n\t\tchildren,\n\t\ttagName,\n\t\tstart,\n\t\treversed,\n\t\tvalue: originalValue,\n\t\tonChange: originalOnChange,\n\t\tisSelected: originalIsSelected,\n\t\tinlineToolbar,\n\t\twrapperClassName,\n\t\tautocompleters,\n\t\tonReplace,\n\t\tplaceholder,\n\t\tallowedFormats,\n\t\twithoutInteractiveFormatting,\n\t\tonRemove,\n\t\tonMerge,\n\t\tonSplit,\n\t\t__unstableOnSplitAtEnd: onSplitAtEnd,\n\t\t__unstableOnSplitMiddle: onSplitMiddle,\n\t\t__unstableOnSplitAtDoubleLineEnd: onSplitAtDoubleLineEnd,\n\t\tidentifier,\n\t\tpreserveWhiteSpace,\n\t\t__unstablePastePlainText: pastePlainText,\n\t\t__unstableEmbedURLOnPaste,\n\t\t__unstableDisableFormats: disableFormats,\n\t\tdisableLineBreaks,\n\t\tunstableOnFocus,\n\t\t__unstableAllowPrefixTransformations,\n\t\t// Native props.\n\t\t__unstableUseSplitSelection,\n\t\t__unstableMobileNoFocusOnMount,\n\t\tdeleteEnter,\n\t\tplaceholderTextColor,\n\t\ttextAlign,\n\t\tselectionColor,\n\t\ttagsToEliminate,\n\t\tdisableEditingMenu,\n\t\tfontSize,\n\t\tfontFamily,\n\t\tfontWeight,\n\t\tfontStyle,\n\t\tminWidth,\n\t\tmaxWidth,\n\t\tonBlur,\n\t\tdisableSuggestions,\n\t\tdisableAutocorrection,\n\t\tcontainerWidth,\n\t\tonEnter: onCustomEnter,\n\t\t...props\n\t},\n\tprovidedRef\n) {\n\tconst instanceId = useInstanceId( RichTextWrapper );\n\n\tidentifier = identifier || instanceId;\n\n\tconst fallbackRef = useRef();\n\tconst { clientId, isSelected: blockIsSelected } = useBlockEditContext();\n\tconst embedHandlerPickerRef = useRef();\n\tconst selector = ( select ) => {\n\t\tconst {\n\t\t\tgetSelectionStart,\n\t\t\tgetSelectionEnd,\n\t\t\tgetSettings,\n\t\t\tdidAutomaticChange,\n\t\t\tgetBlock,\n\t\t\tisMultiSelecting,\n\t\t\thasMultiSelection,\n\t\t\tgetSelectedBlockClientId,\n\t\t} = select( blockEditorStore );\n\n\t\tconst selectionStart = getSelectionStart();\n\t\tconst selectionEnd = getSelectionEnd();\n\t\tconst { __experimentalUndo: undo } = getSettings();\n\n\t\tlet isSelected;\n\n\t\tif ( originalIsSelected === undefined ) {\n\t\t\tisSelected =\n\t\t\t\tselectionStart.clientId === clientId &&\n\t\t\t\tselectionStart.attributeKey === identifier;\n\t\t} else if ( originalIsSelected ) {\n\t\t\tisSelected = selectionStart.clientId === clientId;\n\t\t}\n\n\t\tlet extraProps = {};\n\t\tif ( Platform.OS === 'native' ) {\n\t\t\t// If the block of this RichText is unmodified then it's a candidate for replacing when adding a new block.\n\t\t\t// In order to fix https://github.com/wordpress-mobile/gutenberg-mobile/issues/1126, let's blur on unmount in that case.\n\t\t\t// This apparently assumes functionality the BlockHlder actually.\n\t\t\tconst block = clientId && getBlock( clientId );\n\t\t\tconst shouldBlurOnUnmount =\n\t\t\t\tblock && isSelected && isUnmodifiedDefaultBlock( block );\n\t\t\textraProps = {\n\t\t\t\tshouldBlurOnUnmount,\n\t\t\t};\n\t\t}\n\n\t\treturn {\n\t\t\tselectionStart: isSelected ? selectionStart.offset : undefined,\n\t\t\tselectionEnd: isSelected ? selectionEnd.offset : undefined,\n\t\t\tisSelected,\n\t\t\tdidAutomaticChange: didAutomaticChange(),\n\t\t\tdisabled: isMultiSelecting() || hasMultiSelection(),\n\t\t\tundo,\n\t\t\tgetSelectedBlockClientId,\n\t\t\t...extraProps,\n\t\t};\n\t};\n\t// This selector must run on every render so the right selection state is\n\t// retrieved from the store on merge.\n\t// To do: fix this somehow.\n\tconst {\n\t\tselectionStart,\n\t\tselectionEnd,\n\t\tisSelected,\n\t\tgetSelectedBlockClientId,\n\t\tdidAutomaticChange,\n\t\tdisabled,\n\t\tundo,\n\t\tshouldBlurOnUnmount,\n\t} = useSelect( selector );\n\tconst {\n\t\t__unstableMarkLastChangeAsPersistent,\n\t\tenterFormattedText,\n\t\texitFormattedText,\n\t\tselectionChange,\n\t\t__unstableMarkAutomaticChange,\n\t\t__unstableSplitSelection,\n\t\tclearSelectedBlock,\n\t} = useDispatch( blockEditorStore );\n\tconst adjustedAllowedFormats = getAllowedFormats( {\n\t\tallowedFormats,\n\t\tdisableFormats,\n\t} );\n\tconst hasFormats =\n\t\t! adjustedAllowedFormats || adjustedAllowedFormats.length > 0;\n\tlet adjustedValue = originalValue;\n\tlet adjustedOnChange = originalOnChange;\n\n\t// Handle deprecated format.\n\tif ( Array.isArray( originalValue ) ) {\n\t\tadjustedValue = childrenSource.toHTML( originalValue );\n\t\tadjustedOnChange = ( newValue ) =>\n\t\t\toriginalOnChange(\n\t\t\t\tchildrenSource.fromDOM(\n\t\t\t\t\t__unstableCreateElement( document, newValue ).childNodes\n\t\t\t\t)\n\t\t\t);\n\t}\n\n\tconst onSelectionChange = useCallback(\n\t\t( selectionChangeStart, selectionChangeEnd ) => {\n\t\t\tselectionChange(\n\t\t\t\tclientId,\n\t\t\t\tidentifier,\n\t\t\t\tselectionChangeStart,\n\t\t\t\tselectionChangeEnd\n\t\t\t);\n\t\t},\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t\t[ clientId, identifier ]\n\t);\n\n\tconst clearCurrentSelectionOnUnmount = useCallback( () => {\n\t\tif ( getSelectedBlockClientId() === clientId ) {\n\t\t\tclearSelectedBlock();\n\t\t}\n\t}, [ clearSelectedBlock, clientId, getSelectedBlockClientId ] );\n\n\tconst onDelete = useCallback(\n\t\t( { value, isReverse } ) => {\n\t\t\tif ( onMerge ) {\n\t\t\t\tonMerge( ! isReverse );\n\t\t\t}\n\n\t\t\t// Only handle remove on Backspace. This serves dual-purpose of being\n\t\t\t// an intentional user interaction distinguishing between Backspace and\n\t\t\t// Delete to remove the empty field, but also to avoid merge & remove\n\t\t\t// causing destruction of two fields (merge, then removed merged).\n\t\t\telse if ( onRemove && isEmpty( value ) && isReverse ) {\n\t\t\t\tonRemove( ! isReverse );\n\t\t\t}\n\t\t},\n\t\t[ onMerge, onRemove ]\n\t);\n\n\t/**\n\t * Signals to the RichText owner that the block can be replaced with two\n\t * blocks as a result of splitting the block by pressing enter, or with\n\t * blocks as a result of splitting the block by pasting block content in the\n\t * instance.\n\t *\n\t * @param {Object} record The rich text value to split.\n\t * @param {Array} pastedBlocks The pasted blocks to insert, if any.\n\t */\n\tconst splitValue = useCallback(\n\t\t( record, pastedBlocks = [] ) => {\n\t\t\tif ( ! onReplace || ! onSplit ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst blocks = [];\n\t\t\tconst [ before, after ] = split( record );\n\t\t\tconst hasPastedBlocks = pastedBlocks.length > 0;\n\t\t\tlet lastPastedBlockIndex = -1;\n\n\t\t\t// Consider the after value to be the original it is not empty and\n\t\t\t// the before value *is* empty.\n\t\t\tconst isAfterOriginal = isEmpty( before ) && ! isEmpty( after );\n\n\t\t\t// Create a block with the content before the caret if there's no pasted\n\t\t\t// blocks, or if there are pasted blocks and the value is not empty.\n\t\t\t// We do not want a leading empty block on paste, but we do if split\n\t\t\t// with e.g. the enter key.\n\t\t\tif ( ! hasPastedBlocks || ! isEmpty( before ) ) {\n\t\t\t\tblocks.push(\n\t\t\t\t\tonSplit(\n\t\t\t\t\t\ttoHTMLString( { value: before } ),\n\t\t\t\t\t\t! isAfterOriginal\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t\tlastPastedBlockIndex += 1;\n\t\t\t}\n\n\t\t\tif ( hasPastedBlocks ) {\n\t\t\t\tblocks.push( ...pastedBlocks );\n\t\t\t\tlastPastedBlockIndex += pastedBlocks.length;\n\t\t\t} else if ( onSplitMiddle ) {\n\t\t\t\tblocks.push( onSplitMiddle() );\n\t\t\t}\n\n\t\t\t// If there's pasted blocks, append a block with non empty content\n\t\t\t// after the caret. Otherwise, do append an empty block if there\n\t\t\t// is no `onSplitMiddle` prop, but if there is and the content is\n\t\t\t// empty, the middle block is enough to set focus in.\n\t\t\tif (\n\t\t\t\thasPastedBlocks\n\t\t\t\t\t? ! isEmpty( after )\n\t\t\t\t\t: ! onSplitMiddle || ! isEmpty( after )\n\t\t\t) {\n\t\t\t\tblocks.push(\n\t\t\t\t\tonSplit( toHTMLString( { value: after } ), isAfterOriginal )\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// If there are pasted blocks, set the selection to the last one.\n\t\t\t// Otherwise, set the selection to the second block.\n\t\t\tconst indexToSelect = hasPastedBlocks ? lastPastedBlockIndex : 1;\n\n\t\t\t// If there are pasted blocks, move the caret to the end of the selected block\n\t\t\t// Otherwise, retain the default value.\n\t\t\tconst initialPosition = hasPastedBlocks ? -1 : 0;\n\n\t\t\tonReplace( blocks, indexToSelect, initialPosition );\n\t\t},\n\t\t[ onReplace, onSplit, onSplitMiddle ]\n\t);\n\n\tconst onEnter = useCallback(\n\t\t( { value, onChange, shiftKey } ) => {\n\t\t\tconst canSplit = onReplace && onSplit;\n\n\t\t\tif ( onReplace ) {\n\t\t\t\tconst transforms = getBlockTransforms( 'from' ).filter(\n\t\t\t\t\t( { type } ) => type === 'enter'\n\t\t\t\t);\n\t\t\t\tconst transformation = findTransform( transforms, ( item ) => {\n\t\t\t\t\treturn item.regExp.test( value.text );\n\t\t\t\t} );\n\n\t\t\t\tif ( transformation ) {\n\t\t\t\t\tonReplace( [\n\t\t\t\t\t\ttransformation.transform( { content: value.text } ),\n\t\t\t\t\t] );\n\t\t\t\t\t__unstableMarkAutomaticChange();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( onCustomEnter ) {\n\t\t\t\tonCustomEnter();\n\t\t\t}\n\n\t\t\tconst { text, start: splitStart, end: splitEnd } = value;\n\t\t\tconst canSplitAtEnd =\n\t\t\t\tonSplitAtEnd &&\n\t\t\t\tsplitStart === splitEnd &&\n\t\t\t\tsplitEnd === text.length;\n\n\t\t\tif ( shiftKey ) {\n\t\t\t\tif ( ! disableLineBreaks ) {\n\t\t\t\t\tonChange( insert( value, '\\n' ) );\n\t\t\t\t}\n\t\t\t} else if ( canSplit ) {\n\t\t\t\tsplitValue( value );\n\t\t\t} else if ( __unstableUseSplitSelection ) {\n\t\t\t\t__unstableSplitSelection();\n\t\t\t} else if ( canSplitAtEnd ) {\n\t\t\t\tonSplitAtEnd();\n\t\t\t} else if (\n\t\t\t\t// For some blocks it's desirable to split at the end of the\n\t\t\t\t// block when there are two line breaks at the end of the\n\t\t\t\t// block, so triple Enter exits the block.\n\t\t\t\tonSplitAtDoubleLineEnd &&\n\t\t\t\tsplitStart === splitEnd &&\n\t\t\t\tsplitEnd === text.length &&\n\t\t\t\ttext.slice( -2 ) === '\\n\\n'\n\t\t\t) {\n\t\t\t\tvalue.start = value.end - 2;\n\t\t\t\tonChange( remove( value ) );\n\t\t\t\tonSplitAtDoubleLineEnd();\n\t\t\t} else if ( ! disableLineBreaks ) {\n\t\t\t\tonChange( insert( value, '\\n' ) );\n\t\t\t}\n\t\t},\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t\t[\n\t\t\tonReplace,\n\t\t\tonSplit,\n\t\t\t__unstableMarkAutomaticChange,\n\t\t\tsplitValue,\n\t\t\tonSplitAtEnd,\n\t\t]\n\t);\n\n\tconst onPaste = useCallback(\n\t\t( {\n\t\t\tvalue,\n\t\t\tonChange,\n\t\t\thtml,\n\t\t\tplainText,\n\t\t\tisInternal,\n\t\t\tfiles,\n\t\t\tactiveFormats,\n\t\t} ) => {\n\t\t\t// If the data comes from a rich text instance, we can directly use it\n\t\t\t// without filtering the data. The filters are only meant for externally\n\t\t\t// pasted content and remove inline styles.\n\t\t\tif ( isInternal ) {\n\t\t\t\tconst pastedValue = create( {\n\t\t\t\t\thtml,\n\t\t\t\t\tpreserveWhiteSpace,\n\t\t\t\t} );\n\t\t\t\taddActiveFormats( pastedValue, activeFormats );\n\t\t\t\tonChange( insert( value, pastedValue ) );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( pastePlainText ) {\n\t\t\t\tonChange( insert( value, create( { text: plainText } ) ) );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Only process file if no HTML is present.\n\t\t\t// Note: a pasted file may have the URL as plain text.\n\t\t\tif ( files && files.length && ! html ) {\n\t\t\t\tconst content = pasteHandler( {\n\t\t\t\t\tHTML: filePasteHandler( files ),\n\t\t\t\t\tmode: 'BLOCKS',\n\t\t\t\t\ttagName,\n\t\t\t\t\tpreserveWhiteSpace,\n\t\t\t\t} );\n\n\t\t\t\t// Allows us to ask for this information when we get a report.\n\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\twindow.console.log( 'Received items:\\n\\n', files );\n\n\t\t\t\tif ( onReplace && isEmpty( value ) ) {\n\t\t\t\t\tonReplace( content );\n\t\t\t\t} else {\n\t\t\t\t\tsplitValue( value, content );\n\t\t\t\t}\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tlet mode = onReplace && onSplit ? 'AUTO' : 'INLINE';\n\n\t\t\tconst isPastedURL = isURL( plainText.trim() );\n\t\t\tconst presentEmbedHandlerPicker = () =>\n\t\t\t\tembedHandlerPickerRef.current?.presentPicker( {\n\t\t\t\t\tcreateEmbed: () =>\n\t\t\t\t\t\tonReplace( content, content.length - 1, -1 ),\n\t\t\t\t\tcreateLink: () =>\n\t\t\t\t\t\tcreateLinkInParagraph( plainText.trim(), onReplace ),\n\t\t\t\t} );\n\n\t\t\tif (\n\t\t\t\t__unstableEmbedURLOnPaste &&\n\t\t\t\tisEmpty( value ) &&\n\t\t\t\tisPastedURL\n\t\t\t) {\n\t\t\t\tmode = 'BLOCKS';\n\t\t\t}\n\n\t\t\tconst content = pasteHandler( {\n\t\t\t\tHTML: html,\n\t\t\t\tplainText,\n\t\t\t\tmode,\n\t\t\t\ttagName,\n\t\t\t\tpreserveWhiteSpace,\n\t\t\t} );\n\n\t\t\tif ( typeof content === 'string' ) {\n\t\t\t\tconst valueToInsert = create( { html: content } );\n\t\t\t\taddActiveFormats( valueToInsert, activeFormats );\n\t\t\t\tonChange( insert( value, valueToInsert ) );\n\t\t\t} else if ( content.length > 0 ) {\n\t\t\t\t// When an URL is pasted in an empty paragraph then the EmbedHandlerPicker should showcase options allowing the transformation of that URL\n\t\t\t\t// into either an Embed block or a link within the target paragraph. If the paragraph is non-empty, the URL is pasted as text.\n\t\t\t\tconst canPasteEmbed =\n\t\t\t\t\tisPastedURL &&\n\t\t\t\t\tcontent.length === 1 &&\n\t\t\t\t\tcontent[ 0 ].name === 'core/embed';\n\t\t\t\tif ( onReplace && isEmpty( value ) ) {\n\t\t\t\t\tif ( canPasteEmbed ) {\n\t\t\t\t\t\tonChange(\n\t\t\t\t\t\t\tinsert( value, create( { text: plainText } ) )\n\t\t\t\t\t\t);\n\t\t\t\t\t\tif ( __unstableEmbedURLOnPaste ) {\n\t\t\t\t\t\t\tpresentEmbedHandlerPicker();\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tonReplace( content, content.length - 1, -1, {\n\t\t\t\t\t\tsource: 'clipboard',\n\t\t\t\t\t} );\n\t\t\t\t} else {\n\t\t\t\t\tif ( canPasteEmbed ) {\n\t\t\t\t\t\tonChange(\n\t\t\t\t\t\t\tinsert( value, create( { text: plainText } ) )\n\t\t\t\t\t\t);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tsplitValue( value, content );\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t[\n\t\t\ttagName,\n\t\t\tonReplace,\n\t\t\tonSplit,\n\t\t\tsplitValue,\n\t\t\t__unstableEmbedURLOnPaste,\n\t\t\tpreserveWhiteSpace,\n\t\t\tpastePlainText,\n\t\t]\n\t);\n\n\tconst inputRule = useCallback(\n\t\t( value ) => {\n\t\t\tif ( ! onReplace ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst { start: startPosition, text } = value;\n\t\t\tconst characterBefore = text.slice(\n\t\t\t\tstartPosition - 1,\n\t\t\t\tstartPosition\n\t\t\t);\n\n\t\t\t// The character right before the caret must be a plain space.\n\t\t\tif ( characterBefore !== ' ' ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst trimmedTextBefore = text.slice( 0, start ).trim();\n\t\t\tconst prefixTransforms = getBlockTransforms( 'from' ).filter(\n\t\t\t\t( { type } ) => type === 'prefix'\n\t\t\t);\n\t\t\tconst transformation = findTransform(\n\t\t\t\tprefixTransforms,\n\t\t\t\t( { prefix } ) => {\n\t\t\t\t\treturn trimmedTextBefore === prefix;\n\t\t\t\t}\n\t\t\t);\n\n\t\t\tif ( ! transformation ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst content = toHTMLString( {\n\t\t\t\tvalue: insert( value, START_OF_SELECTED_AREA, 0, start ),\n\t\t\t} );\n\t\t\tconst block = transformation.transform( content );\n\t\t\tconst currentSelection = findSelection( [ block ] );\n\t\t\tonReplace( [ block ] );\n\t\t\tselectionChange( ...currentSelection );\n\t\t\t__unstableMarkAutomaticChange();\n\t\t},\n\t\t[ onReplace, start, selectionChange, __unstableMarkAutomaticChange ]\n\t);\n\n\tconst mergedRef = useMergeRefs( [ providedRef, fallbackRef ] );\n\n\treturn (\n\t\t<RichText\n\t\t\tclientId={ clientId }\n\t\t\tidentifier={ identifier }\n\t\t\tnativeEditorRef={ mergedRef }\n\t\t\tvalue={ adjustedValue }\n\t\t\tonChange={ adjustedOnChange }\n\t\t\tselectionStart={ selectionStart }\n\t\t\tselectionEnd={ selectionEnd }\n\t\t\tonSelectionChange={ onSelectionChange }\n\t\t\ttagName={ tagName }\n\t\t\tstart={ start }\n\t\t\treversed={ reversed }\n\t\t\tplaceholder={ placeholder }\n\t\t\tallowedFormats={ adjustedAllowedFormats }\n\t\t\twithoutInteractiveFormatting={ withoutInteractiveFormatting }\n\t\t\tonEnter={ onEnter }\n\t\t\tonDelete={ onDelete }\n\t\t\tonPaste={ onPaste }\n\t\t\t__unstableIsSelected={ isSelected }\n\t\t\t__unstableInputRule={ inputRule }\n\t\t\t__unstableOnEnterFormattedText={ enterFormattedText }\n\t\t\t__unstableOnExitFormattedText={ exitFormattedText }\n\t\t\t__unstableOnCreateUndoLevel={ __unstableMarkLastChangeAsPersistent }\n\t\t\t__unstableMarkAutomaticChange={ __unstableMarkAutomaticChange }\n\t\t\t__unstableDidAutomaticChange={ didAutomaticChange }\n\t\t\t__unstableUndo={ undo }\n\t\t\t__unstableDisableFormats={ disableFormats }\n\t\t\tpreserveWhiteSpace={ preserveWhiteSpace }\n\t\t\tdisabled={ disabled }\n\t\t\tunstableOnFocus={ unstableOnFocus }\n\t\t\t__unstableAllowPrefixTransformations={\n\t\t\t\t__unstableAllowPrefixTransformations\n\t\t\t}\n\t\t\t// Native props.\n\t\t\tblockIsSelected={\n\t\t\t\toriginalIsSelected !== undefined\n\t\t\t\t\t? originalIsSelected\n\t\t\t\t\t: blockIsSelected\n\t\t\t}\n\t\t\tshouldBlurOnUnmount={ shouldBlurOnUnmount }\n\t\t\t__unstableMobileNoFocusOnMount={ __unstableMobileNoFocusOnMount }\n\t\t\tdeleteEnter={ deleteEnter }\n\t\t\tplaceholderTextColor={ placeholderTextColor }\n\t\t\ttextAlign={ textAlign }\n\t\t\tselectionColor={ selectionColor }\n\t\t\ttagsToEliminate={ tagsToEliminate }\n\t\t\tdisableEditingMenu={ disableEditingMenu }\n\t\t\tfontSize={ fontSize }\n\t\t\tfontFamily={ fontFamily }\n\t\t\tfontWeight={ fontWeight }\n\t\t\tfontStyle={ fontStyle }\n\t\t\tminWidth={ minWidth }\n\t\t\tmaxWidth={ maxWidth }\n\t\t\tonBlur={ onBlur }\n\t\t\tdisableSuggestions={ disableSuggestions }\n\t\t\tdisableAutocorrection={ disableAutocorrection }\n\t\t\tcontainerWidth={ containerWidth }\n\t\t\tclearCurrentSelectionOnUnmount={ clearCurrentSelectionOnUnmount }\n\t\t\t// Props to be set on the editable container are destructured on the\n\t\t\t// element itself for web (see below), but passed through rich text\n\t\t\t// for native.\n\t\t\tid={ props.id }\n\t\t\tstyle={ props.style }\n\t\t>\n\t\t\t{ ( {\n\t\t\t\tisSelected: nestedIsSelected,\n\t\t\t\tvalue,\n\t\t\t\tonChange,\n\t\t\t\tonFocus,\n\t\t\t\teditableProps,\n\t\t\t\teditableTagName: TagName,\n\t\t\t} ) => (\n\t\t\t\t<>\n\t\t\t\t\t{ children && children( { value, onChange, onFocus } ) }\n\t\t\t\t\t{ nestedIsSelected && hasFormats && (\n\t\t\t\t\t\t<FormatToolbarContainer\n\t\t\t\t\t\t\tinline={ inlineToolbar }\n\t\t\t\t\t\t\tanchorRef={ fallbackRef.current }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ nestedIsSelected && <RemoveBrowserShortcuts /> }\n\t\t\t\t\t<Autocomplete\n\t\t\t\t\t\tonReplace={ onReplace }\n\t\t\t\t\t\tcompleters={ autocompleters }\n\t\t\t\t\t\trecord={ value }\n\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\tisSelected={ nestedIsSelected }\n\t\t\t\t\t\tcontentRef={ fallbackRef }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ ( { listBoxId, activeId, onKeyDown } ) => (\n\t\t\t\t\t\t\t<TagName\n\t\t\t\t\t\t\t\t{ ...editableProps }\n\t\t\t\t\t\t\t\t{ ...props }\n\t\t\t\t\t\t\t\tstyle={\n\t\t\t\t\t\t\t\t\tprops.style\n\t\t\t\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\t\t\t\t...props.style,\n\t\t\t\t\t\t\t\t\t\t\t\t...editableProps.style,\n\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t: editableProps.style\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\t\t\tclasses,\n\t\t\t\t\t\t\t\t\tprops.className,\n\t\t\t\t\t\t\t\t\teditableProps.className\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\taria-autocomplete={\n\t\t\t\t\t\t\t\t\tlistBoxId ? 'list' : undefined\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\taria-owns={ listBoxId }\n\t\t\t\t\t\t\t\taria-activedescendant={ activeId }\n\t\t\t\t\t\t\t\tonKeyDown={ ( event ) => {\n\t\t\t\t\t\t\t\t\tonKeyDown( event );\n\t\t\t\t\t\t\t\t\teditableProps.onKeyDown( event );\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</Autocomplete>\n\t\t\t\t\t<EmbedHandlerPicker ref={ embedHandlerPickerRef } />\n\t\t\t\t</>\n\t\t\t) }\n\t\t</RichText>\n\t);\n}\n\n// This export does not actually implement a private API, but was exported\n// under this name for interoperability with the web version of the RichText\n// component.\nexport const PrivateRichText = withDeprecations(\n\tforwardRef( RichTextWrapper )\n);\n\nPrivateRichText.Content = Content;\n\nPrivateRichText.isEmpty = ( value ) => {\n\treturn ! value || value.length === 0;\n};\n\nPrivateRichText.Content.defaultProps = {\n\tformat: 'string',\n\tvalue: '',\n};\n\nPrivateRichText.Raw = forwardRef( ( props, ref ) => (\n\t<RichText { ...props } nativeEditorRef={ ref } />\n) );\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/rich-text/README.md\n */\nexport default PrivateRichText;\nexport { RichTextShortcut } from './shortcut';\nexport { RichTextToolbarButton } from './toolbar-button';\nexport { __unstableRichTextInputEvent } from './input-event';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AAOA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AASA,IAAAM,IAAA,GAAAN,OAAA;AAKA,IAAAO,aAAA,GAAAR,sBAAA,CAAAC,OAAA;AACA,IAAAQ,UAAA,GAAAR,OAAA;AACA,IAAAS,uBAAA,GAAAT,OAAA;AACA,IAAAU,iBAAA,GAAAV,OAAA;AACA,IAAAW,uBAAA,GAAAZ,sBAAA,CAAAC,OAAA;AACA,IAAAY,MAAA,GAAAZ,OAAA;AACA,IAAAa,MAAA,GAAAb,OAAA;AAKA,IAAAc,mBAAA,GAAAf,sBAAA,CAAAC,OAAA;AACA,IAAAe,QAAA,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KtH,KAAK,IAAM;EACtC,OAAO,CAAEA,KAAK,IAAIA,KAAK,CAACmG,MAAM,KAAK,CAAC;AACrC,CAAC;AAED8H,eAAe,CAACI,OAAO,CAACC,YAAY,GAAG;EACtCC,MAAM,EAAE,QAAQ;EAChBvO,KAAK,EAAE;AACR,CAAC;AAEDiO,eAAe,CAACO,GAAG,GAAG,IAAAJ,mBAAU,EAAE,CAAEhL,KAAK,EAAE4K,GAAG,kBAC7C,IAAA1O,WAAA,CAAA4M,GAAA,EAAChN,OAAA,CAAAiN,OAAQ;EAAA,GAAM/I,KAAK;EAAGgJ,eAAe,EAAG4B;AAAK,CAAE,CAC/C,CAAC;;AAEH;AACA;AACA;AAFA,IAAAS,QAAA,GAAAP,OAAA,CAAA/B,OAAA,GAGe8B,eAAe","ignoreList":[]}
1
+ {"version":3,"names":["_clsx","_interopRequireDefault","require","_element","_data","_blocks","_compose","_richText","_url","_autocomplete","_blockEdit","_removeBrowserShortcuts","_filePasteHandler","_formatToolbarContainer","_store","_utils","_embedHandlerPicker","_content","_native","_withDeprecations","_inputRules","_selection","_jsxRuntime","_shortcut","_toolbarButton","_inputEvent","classes","RichTextWrapper","children","tagName","start","reversed","value","originalValue","onChange","originalOnChange","isSelected","originalIsSelected","inlineToolbar","wrapperClassName","autocompleters","onReplace","placeholder","allowedFormats","withoutInteractiveFormatting","onRemove","onMerge","onSplit","__unstableOnSplitAtEnd","onSplitAtEnd","__unstableOnSplitMiddle","onSplitMiddle","__unstableOnSplitAtDoubleLineEnd","onSplitAtDoubleLineEnd","identifier","preserveWhiteSpace","__unstablePastePlainText","pastePlainText","__unstableEmbedURLOnPaste","__unstableDisableFormats","disableFormats","disableLineBreaks","unstableOnFocus","__unstableAllowPrefixTransformations","__unstableUseSplitSelection","__unstableMobileNoFocusOnMount","deleteEnter","placeholderTextColor","textAlign","selectionColor","tagsToEliminate","disableEditingMenu","fontSize","fontFamily","fontWeight","fontStyle","minWidth","maxWidth","onBlur","disableSuggestions","disableAutocorrection","containerWidth","onEnter","onCustomEnter","props","providedRef","instanceId","useInstanceId","fallbackRef","useRef","clientId","blockIsSelected","useBlockEditContext","embedHandlerPickerRef","selector","select","getSelectionStart","getSelectionEnd","getSettings","didAutomaticChange","getBlock","isMultiSelecting","hasMultiSelection","getSelectedBlockClientId","blockEditorStore","selectionStart","selectionEnd","__experimentalUndo","undo","undefined","attributeKey","extraProps","Platform","OS","block","shouldBlurOnUnmount","isUnmodifiedDefaultBlock","offset","disabled","useSelect","__unstableMarkLastChangeAsPersistent","enterFormattedText","exitFormattedText","selectionChange","__unstableMarkAutomaticChange","__unstableSplitSelection","clearSelectedBlock","useDispatch","adjustedAllowedFormats","getAllowedFormats","hasFormats","length","adjustedValue","adjustedOnChange","Array","isArray","childrenSource","toHTML","newValue","fromDOM","__unstableCreateElement","document","childNodes","onSelectionChange","useCallback","selectionChangeStart","selectionChangeEnd","clearCurrentSelectionOnUnmount","onDelete","isReverse","isEmpty","splitValue","record","pastedBlocks","blocks","before","after","split","hasPastedBlocks","lastPastedBlockIndex","isAfterOriginal","push","toHTMLString","indexToSelect","initialPosition","shiftKey","canSplit","transforms","getBlockTransforms","filter","type","transformation","findTransform","item","regExp","test","text","transform","content","splitStart","end","splitEnd","canSplitAtEnd","insert","slice","remove","onPaste","html","plainText","isInternal","files","activeFormats","pastedValue","create","addActiveFormats","pasteHandler","HTML","filePasteHandler","mode","window","console","log","isPastedURL","isURL","trim","presentEmbedHandlerPicker","current","presentPicker","createEmbed","createLink","createLinkInParagraph","valueToInsert","canPasteEmbed","name","source","inputRule","startPosition","characterBefore","trimmedTextBefore","prefixTransforms","prefix","START_OF_SELECTED_AREA","currentSelection","findSelection","mergedRef","useMergeRefs","jsx","default","nativeEditorRef","__unstableIsSelected","__unstableInputRule","__unstableOnEnterFormattedText","__unstableOnExitFormattedText","__unstableOnCreateUndoLevel","__unstableDidAutomaticChange","__unstableUndo","id","style","nestedIsSelected","onFocus","editableProps","editableTagName","TagName","jsxs","Fragment","inline","anchorRef","RemoveBrowserShortcuts","completers","contentRef","listBoxId","activeId","onKeyDown","className","clsx","event","ref","PrivateRichText","exports","withDeprecations","forwardRef","Content","defaultProps","format","Raw","_default"],"sources":["@wordpress/block-editor/src/components/rich-text/index.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { Platform, useRef, useCallback, forwardRef } from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport {\n\tpasteHandler,\n\tchildren as childrenSource,\n\tgetBlockTransforms,\n\tfindTransform,\n\tisUnmodifiedDefaultBlock,\n} from '@wordpress/blocks';\nimport { useInstanceId, useMergeRefs } from '@wordpress/compose';\nimport {\n\t__unstableCreateElement,\n\tisEmpty,\n\tinsert,\n\tremove,\n\tcreate,\n\tsplit,\n\ttoHTMLString,\n} from '@wordpress/rich-text';\nimport { isURL } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport Autocomplete from '../autocomplete';\nimport { useBlockEditContext } from '../block-edit';\nimport { RemoveBrowserShortcuts } from './remove-browser-shortcuts';\nimport { filePasteHandler } from './file-paste-handler';\nimport FormatToolbarContainer from './format-toolbar-container';\nimport { store as blockEditorStore } from '../../store';\nimport {\n\taddActiveFormats,\n\tgetAllowedFormats,\n\tcreateLinkInParagraph,\n} from './utils';\nimport EmbedHandlerPicker from './embed-handler-picker';\nimport { Content } from './content';\nimport RichText from './native';\nimport { withDeprecations } from './with-deprecations';\nimport { findSelection } from './event-listeners/input-rules';\nimport { START_OF_SELECTED_AREA } from '../../utils/selection';\n\nconst classes = 'block-editor-rich-text__editable';\n\nexport function RichTextWrapper(\n\t{\n\t\tchildren,\n\t\ttagName,\n\t\tstart,\n\t\treversed,\n\t\tvalue: originalValue,\n\t\tonChange: originalOnChange,\n\t\tisSelected: originalIsSelected,\n\t\tinlineToolbar,\n\t\twrapperClassName,\n\t\tautocompleters,\n\t\tonReplace,\n\t\tplaceholder,\n\t\tallowedFormats,\n\t\twithoutInteractiveFormatting,\n\t\tonRemove,\n\t\tonMerge,\n\t\tonSplit,\n\t\t__unstableOnSplitAtEnd: onSplitAtEnd,\n\t\t__unstableOnSplitMiddle: onSplitMiddle,\n\t\t__unstableOnSplitAtDoubleLineEnd: onSplitAtDoubleLineEnd,\n\t\tidentifier,\n\t\tpreserveWhiteSpace,\n\t\t__unstablePastePlainText: pastePlainText,\n\t\t__unstableEmbedURLOnPaste,\n\t\t__unstableDisableFormats: disableFormats,\n\t\tdisableLineBreaks,\n\t\tunstableOnFocus,\n\t\t__unstableAllowPrefixTransformations,\n\t\t// Native props.\n\t\t__unstableUseSplitSelection,\n\t\t__unstableMobileNoFocusOnMount,\n\t\tdeleteEnter,\n\t\tplaceholderTextColor,\n\t\ttextAlign,\n\t\tselectionColor,\n\t\ttagsToEliminate,\n\t\tdisableEditingMenu,\n\t\tfontSize,\n\t\tfontFamily,\n\t\tfontWeight,\n\t\tfontStyle,\n\t\tminWidth,\n\t\tmaxWidth,\n\t\tonBlur,\n\t\tdisableSuggestions,\n\t\tdisableAutocorrection,\n\t\tcontainerWidth,\n\t\tonEnter: onCustomEnter,\n\t\t...props\n\t},\n\tprovidedRef\n) {\n\tconst instanceId = useInstanceId( RichTextWrapper );\n\n\tidentifier = identifier || instanceId;\n\n\tconst fallbackRef = useRef();\n\tconst { clientId, isSelected: blockIsSelected } = useBlockEditContext();\n\tconst embedHandlerPickerRef = useRef();\n\tconst selector = ( select ) => {\n\t\tconst {\n\t\t\tgetSelectionStart,\n\t\t\tgetSelectionEnd,\n\t\t\tgetSettings,\n\t\t\tdidAutomaticChange,\n\t\t\tgetBlock,\n\t\t\tisMultiSelecting,\n\t\t\thasMultiSelection,\n\t\t\tgetSelectedBlockClientId,\n\t\t} = select( blockEditorStore );\n\n\t\tconst selectionStart = getSelectionStart();\n\t\tconst selectionEnd = getSelectionEnd();\n\t\tconst { __experimentalUndo: undo } = getSettings();\n\n\t\tlet isSelected;\n\n\t\tif ( originalIsSelected === undefined ) {\n\t\t\tisSelected =\n\t\t\t\tselectionStart.clientId === clientId &&\n\t\t\t\tselectionStart.attributeKey === identifier;\n\t\t} else if ( originalIsSelected ) {\n\t\t\tisSelected = selectionStart.clientId === clientId;\n\t\t}\n\n\t\tlet extraProps = {};\n\t\tif ( Platform.OS === 'native' ) {\n\t\t\t// If the block of this RichText is unmodified then it's a candidate for replacing when adding a new block.\n\t\t\t// In order to fix https://github.com/wordpress-mobile/gutenberg-mobile/issues/1126, let's blur on unmount in that case.\n\t\t\t// This apparently assumes functionality the BlockHlder actually.\n\t\t\tconst block = clientId && getBlock( clientId );\n\t\t\tconst shouldBlurOnUnmount =\n\t\t\t\tblock && isSelected && isUnmodifiedDefaultBlock( block );\n\t\t\textraProps = {\n\t\t\t\tshouldBlurOnUnmount,\n\t\t\t};\n\t\t}\n\n\t\treturn {\n\t\t\tselectionStart: isSelected ? selectionStart.offset : undefined,\n\t\t\tselectionEnd: isSelected ? selectionEnd.offset : undefined,\n\t\t\tisSelected,\n\t\t\tdidAutomaticChange: didAutomaticChange(),\n\t\t\tdisabled: isMultiSelecting() || hasMultiSelection(),\n\t\t\tundo,\n\t\t\tgetSelectedBlockClientId,\n\t\t\t...extraProps,\n\t\t};\n\t};\n\t// This selector must run on every render so the right selection state is\n\t// retrieved from the store on merge.\n\t// To do: fix this somehow.\n\tconst {\n\t\tselectionStart,\n\t\tselectionEnd,\n\t\tisSelected,\n\t\tgetSelectedBlockClientId,\n\t\tdidAutomaticChange,\n\t\tdisabled,\n\t\tundo,\n\t\tshouldBlurOnUnmount,\n\t} = useSelect( selector );\n\tconst {\n\t\t__unstableMarkLastChangeAsPersistent,\n\t\tenterFormattedText,\n\t\texitFormattedText,\n\t\tselectionChange,\n\t\t__unstableMarkAutomaticChange,\n\t\t__unstableSplitSelection,\n\t\tclearSelectedBlock,\n\t} = useDispatch( blockEditorStore );\n\tconst adjustedAllowedFormats = getAllowedFormats( {\n\t\tallowedFormats,\n\t\tdisableFormats,\n\t} );\n\tconst hasFormats =\n\t\t! adjustedAllowedFormats || adjustedAllowedFormats.length > 0;\n\tlet adjustedValue = originalValue;\n\tlet adjustedOnChange = originalOnChange;\n\n\t// Handle deprecated format.\n\tif ( Array.isArray( originalValue ) ) {\n\t\tadjustedValue = childrenSource.toHTML( originalValue );\n\t\tadjustedOnChange = ( newValue ) =>\n\t\t\toriginalOnChange(\n\t\t\t\tchildrenSource.fromDOM(\n\t\t\t\t\t__unstableCreateElement( document, newValue ).childNodes\n\t\t\t\t)\n\t\t\t);\n\t}\n\n\tconst onSelectionChange = useCallback(\n\t\t( selectionChangeStart, selectionChangeEnd ) => {\n\t\t\tselectionChange(\n\t\t\t\tclientId,\n\t\t\t\tidentifier,\n\t\t\t\tselectionChangeStart,\n\t\t\t\tselectionChangeEnd\n\t\t\t);\n\t\t},\n\t\t[ clientId, identifier ]\n\t);\n\n\tconst clearCurrentSelectionOnUnmount = useCallback( () => {\n\t\tif ( getSelectedBlockClientId() === clientId ) {\n\t\t\tclearSelectedBlock();\n\t\t}\n\t}, [ clearSelectedBlock, clientId, getSelectedBlockClientId ] );\n\n\tconst onDelete = useCallback(\n\t\t( { value, isReverse } ) => {\n\t\t\tif ( onMerge ) {\n\t\t\t\tonMerge( ! isReverse );\n\t\t\t}\n\n\t\t\t// Only handle remove on Backspace. This serves dual-purpose of being\n\t\t\t// an intentional user interaction distinguishing between Backspace and\n\t\t\t// Delete to remove the empty field, but also to avoid merge & remove\n\t\t\t// causing destruction of two fields (merge, then removed merged).\n\t\t\telse if ( onRemove && isEmpty( value ) && isReverse ) {\n\t\t\t\tonRemove( ! isReverse );\n\t\t\t}\n\t\t},\n\t\t[ onMerge, onRemove ]\n\t);\n\n\t/**\n\t * Signals to the RichText owner that the block can be replaced with two\n\t * blocks as a result of splitting the block by pressing enter, or with\n\t * blocks as a result of splitting the block by pasting block content in the\n\t * instance.\n\t *\n\t * @param {Object} record The rich text value to split.\n\t * @param {Array} pastedBlocks The pasted blocks to insert, if any.\n\t */\n\tconst splitValue = useCallback(\n\t\t( record, pastedBlocks = [] ) => {\n\t\t\tif ( ! onReplace || ! onSplit ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst blocks = [];\n\t\t\tconst [ before, after ] = split( record );\n\t\t\tconst hasPastedBlocks = pastedBlocks.length > 0;\n\t\t\tlet lastPastedBlockIndex = -1;\n\n\t\t\t// Consider the after value to be the original it is not empty and\n\t\t\t// the before value *is* empty.\n\t\t\tconst isAfterOriginal = isEmpty( before ) && ! isEmpty( after );\n\n\t\t\t// Create a block with the content before the caret if there's no pasted\n\t\t\t// blocks, or if there are pasted blocks and the value is not empty.\n\t\t\t// We do not want a leading empty block on paste, but we do if split\n\t\t\t// with e.g. the enter key.\n\t\t\tif ( ! hasPastedBlocks || ! isEmpty( before ) ) {\n\t\t\t\tblocks.push(\n\t\t\t\t\tonSplit(\n\t\t\t\t\t\ttoHTMLString( { value: before } ),\n\t\t\t\t\t\t! isAfterOriginal\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t\tlastPastedBlockIndex += 1;\n\t\t\t}\n\n\t\t\tif ( hasPastedBlocks ) {\n\t\t\t\tblocks.push( ...pastedBlocks );\n\t\t\t\tlastPastedBlockIndex += pastedBlocks.length;\n\t\t\t} else if ( onSplitMiddle ) {\n\t\t\t\tblocks.push( onSplitMiddle() );\n\t\t\t}\n\n\t\t\t// If there's pasted blocks, append a block with non empty content\n\t\t\t// after the caret. Otherwise, do append an empty block if there\n\t\t\t// is no `onSplitMiddle` prop, but if there is and the content is\n\t\t\t// empty, the middle block is enough to set focus in.\n\t\t\tif (\n\t\t\t\thasPastedBlocks\n\t\t\t\t\t? ! isEmpty( after )\n\t\t\t\t\t: ! onSplitMiddle || ! isEmpty( after )\n\t\t\t) {\n\t\t\t\tblocks.push(\n\t\t\t\t\tonSplit( toHTMLString( { value: after } ), isAfterOriginal )\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// If there are pasted blocks, set the selection to the last one.\n\t\t\t// Otherwise, set the selection to the second block.\n\t\t\tconst indexToSelect = hasPastedBlocks ? lastPastedBlockIndex : 1;\n\n\t\t\t// If there are pasted blocks, move the caret to the end of the selected block\n\t\t\t// Otherwise, retain the default value.\n\t\t\tconst initialPosition = hasPastedBlocks ? -1 : 0;\n\n\t\t\tonReplace( blocks, indexToSelect, initialPosition );\n\t\t},\n\t\t[ onReplace, onSplit, onSplitMiddle ]\n\t);\n\n\tconst onEnter = useCallback(\n\t\t( { value, onChange, shiftKey } ) => {\n\t\t\tconst canSplit = onReplace && onSplit;\n\n\t\t\tif ( onReplace ) {\n\t\t\t\tconst transforms = getBlockTransforms( 'from' ).filter(\n\t\t\t\t\t( { type } ) => type === 'enter'\n\t\t\t\t);\n\t\t\t\tconst transformation = findTransform( transforms, ( item ) => {\n\t\t\t\t\treturn item.regExp.test( value.text );\n\t\t\t\t} );\n\n\t\t\t\tif ( transformation ) {\n\t\t\t\t\tonReplace( [\n\t\t\t\t\t\ttransformation.transform( { content: value.text } ),\n\t\t\t\t\t] );\n\t\t\t\t\t__unstableMarkAutomaticChange();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( onCustomEnter ) {\n\t\t\t\tonCustomEnter();\n\t\t\t}\n\n\t\t\tconst { text, start: splitStart, end: splitEnd } = value;\n\t\t\tconst canSplitAtEnd =\n\t\t\t\tonSplitAtEnd &&\n\t\t\t\tsplitStart === splitEnd &&\n\t\t\t\tsplitEnd === text.length;\n\n\t\t\tif ( shiftKey ) {\n\t\t\t\tif ( ! disableLineBreaks ) {\n\t\t\t\t\tonChange( insert( value, '\\n' ) );\n\t\t\t\t}\n\t\t\t} else if ( canSplit ) {\n\t\t\t\tsplitValue( value );\n\t\t\t} else if ( __unstableUseSplitSelection ) {\n\t\t\t\t__unstableSplitSelection();\n\t\t\t} else if ( canSplitAtEnd ) {\n\t\t\t\tonSplitAtEnd();\n\t\t\t} else if (\n\t\t\t\t// For some blocks it's desirable to split at the end of the\n\t\t\t\t// block when there are two line breaks at the end of the\n\t\t\t\t// block, so triple Enter exits the block.\n\t\t\t\tonSplitAtDoubleLineEnd &&\n\t\t\t\tsplitStart === splitEnd &&\n\t\t\t\tsplitEnd === text.length &&\n\t\t\t\ttext.slice( -2 ) === '\\n\\n'\n\t\t\t) {\n\t\t\t\tvalue.start = value.end - 2;\n\t\t\t\tonChange( remove( value ) );\n\t\t\t\tonSplitAtDoubleLineEnd();\n\t\t\t} else if ( ! disableLineBreaks ) {\n\t\t\t\tonChange( insert( value, '\\n' ) );\n\t\t\t}\n\t\t},\n\t\t[\n\t\t\tonReplace,\n\t\t\tonSplit,\n\t\t\t__unstableMarkAutomaticChange,\n\t\t\tsplitValue,\n\t\t\tonSplitAtEnd,\n\t\t]\n\t);\n\n\tconst onPaste = useCallback(\n\t\t( {\n\t\t\tvalue,\n\t\t\tonChange,\n\t\t\thtml,\n\t\t\tplainText,\n\t\t\tisInternal,\n\t\t\tfiles,\n\t\t\tactiveFormats,\n\t\t} ) => {\n\t\t\t// If the data comes from a rich text instance, we can directly use it\n\t\t\t// without filtering the data. The filters are only meant for externally\n\t\t\t// pasted content and remove inline styles.\n\t\t\tif ( isInternal ) {\n\t\t\t\tconst pastedValue = create( {\n\t\t\t\t\thtml,\n\t\t\t\t\tpreserveWhiteSpace,\n\t\t\t\t} );\n\t\t\t\taddActiveFormats( pastedValue, activeFormats );\n\t\t\t\tonChange( insert( value, pastedValue ) );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( pastePlainText ) {\n\t\t\t\tonChange( insert( value, create( { text: plainText } ) ) );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Only process file if no HTML is present.\n\t\t\t// Note: a pasted file may have the URL as plain text.\n\t\t\tif ( files && files.length && ! html ) {\n\t\t\t\tconst content = pasteHandler( {\n\t\t\t\t\tHTML: filePasteHandler( files ),\n\t\t\t\t\tmode: 'BLOCKS',\n\t\t\t\t\ttagName,\n\t\t\t\t\tpreserveWhiteSpace,\n\t\t\t\t} );\n\n\t\t\t\t// Allows us to ask for this information when we get a report.\n\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\twindow.console.log( 'Received items:\\n\\n', files );\n\n\t\t\t\tif ( onReplace && isEmpty( value ) ) {\n\t\t\t\t\tonReplace( content );\n\t\t\t\t} else {\n\t\t\t\t\tsplitValue( value, content );\n\t\t\t\t}\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tlet mode = onReplace && onSplit ? 'AUTO' : 'INLINE';\n\n\t\t\tconst isPastedURL = isURL( plainText.trim() );\n\t\t\tconst presentEmbedHandlerPicker = () =>\n\t\t\t\tembedHandlerPickerRef.current?.presentPicker( {\n\t\t\t\t\tcreateEmbed: () =>\n\t\t\t\t\t\tonReplace( content, content.length - 1, -1 ),\n\t\t\t\t\tcreateLink: () =>\n\t\t\t\t\t\tcreateLinkInParagraph( plainText.trim(), onReplace ),\n\t\t\t\t} );\n\n\t\t\tif (\n\t\t\t\t__unstableEmbedURLOnPaste &&\n\t\t\t\tisEmpty( value ) &&\n\t\t\t\tisPastedURL\n\t\t\t) {\n\t\t\t\tmode = 'BLOCKS';\n\t\t\t}\n\n\t\t\tconst content = pasteHandler( {\n\t\t\t\tHTML: html,\n\t\t\t\tplainText,\n\t\t\t\tmode,\n\t\t\t\ttagName,\n\t\t\t\tpreserveWhiteSpace,\n\t\t\t} );\n\n\t\t\tif ( typeof content === 'string' ) {\n\t\t\t\tconst valueToInsert = create( { html: content } );\n\t\t\t\taddActiveFormats( valueToInsert, activeFormats );\n\t\t\t\tonChange( insert( value, valueToInsert ) );\n\t\t\t} else if ( content.length > 0 ) {\n\t\t\t\t// When an URL is pasted in an empty paragraph then the EmbedHandlerPicker should showcase options allowing the transformation of that URL\n\t\t\t\t// into either an Embed block or a link within the target paragraph. If the paragraph is non-empty, the URL is pasted as text.\n\t\t\t\tconst canPasteEmbed =\n\t\t\t\t\tisPastedURL &&\n\t\t\t\t\tcontent.length === 1 &&\n\t\t\t\t\tcontent[ 0 ].name === 'core/embed';\n\t\t\t\tif ( onReplace && isEmpty( value ) ) {\n\t\t\t\t\tif ( canPasteEmbed ) {\n\t\t\t\t\t\tonChange(\n\t\t\t\t\t\t\tinsert( value, create( { text: plainText } ) )\n\t\t\t\t\t\t);\n\t\t\t\t\t\tif ( __unstableEmbedURLOnPaste ) {\n\t\t\t\t\t\t\tpresentEmbedHandlerPicker();\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tonReplace( content, content.length - 1, -1, {\n\t\t\t\t\t\tsource: 'clipboard',\n\t\t\t\t\t} );\n\t\t\t\t} else {\n\t\t\t\t\tif ( canPasteEmbed ) {\n\t\t\t\t\t\tonChange(\n\t\t\t\t\t\t\tinsert( value, create( { text: plainText } ) )\n\t\t\t\t\t\t);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tsplitValue( value, content );\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t[\n\t\t\ttagName,\n\t\t\tonReplace,\n\t\t\tonSplit,\n\t\t\tsplitValue,\n\t\t\t__unstableEmbedURLOnPaste,\n\t\t\tpreserveWhiteSpace,\n\t\t\tpastePlainText,\n\t\t]\n\t);\n\n\tconst inputRule = useCallback(\n\t\t( value ) => {\n\t\t\tif ( ! onReplace ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst { start: startPosition, text } = value;\n\t\t\tconst characterBefore = text.slice(\n\t\t\t\tstartPosition - 1,\n\t\t\t\tstartPosition\n\t\t\t);\n\n\t\t\t// The character right before the caret must be a plain space.\n\t\t\tif ( characterBefore !== ' ' ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst trimmedTextBefore = text.slice( 0, start ).trim();\n\t\t\tconst prefixTransforms = getBlockTransforms( 'from' ).filter(\n\t\t\t\t( { type } ) => type === 'prefix'\n\t\t\t);\n\t\t\tconst transformation = findTransform(\n\t\t\t\tprefixTransforms,\n\t\t\t\t( { prefix } ) => {\n\t\t\t\t\treturn trimmedTextBefore === prefix;\n\t\t\t\t}\n\t\t\t);\n\n\t\t\tif ( ! transformation ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst content = toHTMLString( {\n\t\t\t\tvalue: insert( value, START_OF_SELECTED_AREA, 0, start ),\n\t\t\t} );\n\t\t\tconst block = transformation.transform( content );\n\t\t\tconst currentSelection = findSelection( [ block ] );\n\t\t\tonReplace( [ block ] );\n\t\t\tselectionChange( ...currentSelection );\n\t\t\t__unstableMarkAutomaticChange();\n\t\t},\n\t\t[ onReplace, start, selectionChange, __unstableMarkAutomaticChange ]\n\t);\n\n\tconst mergedRef = useMergeRefs( [ providedRef, fallbackRef ] );\n\n\treturn (\n\t\t<RichText\n\t\t\tclientId={ clientId }\n\t\t\tidentifier={ identifier }\n\t\t\tnativeEditorRef={ mergedRef }\n\t\t\tvalue={ adjustedValue }\n\t\t\tonChange={ adjustedOnChange }\n\t\t\tselectionStart={ selectionStart }\n\t\t\tselectionEnd={ selectionEnd }\n\t\t\tonSelectionChange={ onSelectionChange }\n\t\t\ttagName={ tagName }\n\t\t\tstart={ start }\n\t\t\treversed={ reversed }\n\t\t\tplaceholder={ placeholder }\n\t\t\tallowedFormats={ adjustedAllowedFormats }\n\t\t\twithoutInteractiveFormatting={ withoutInteractiveFormatting }\n\t\t\tonEnter={ onEnter }\n\t\t\tonDelete={ onDelete }\n\t\t\tonPaste={ onPaste }\n\t\t\t__unstableIsSelected={ isSelected }\n\t\t\t__unstableInputRule={ inputRule }\n\t\t\t__unstableOnEnterFormattedText={ enterFormattedText }\n\t\t\t__unstableOnExitFormattedText={ exitFormattedText }\n\t\t\t__unstableOnCreateUndoLevel={ __unstableMarkLastChangeAsPersistent }\n\t\t\t__unstableMarkAutomaticChange={ __unstableMarkAutomaticChange }\n\t\t\t__unstableDidAutomaticChange={ didAutomaticChange }\n\t\t\t__unstableUndo={ undo }\n\t\t\t__unstableDisableFormats={ disableFormats }\n\t\t\tpreserveWhiteSpace={ preserveWhiteSpace }\n\t\t\tdisabled={ disabled }\n\t\t\tunstableOnFocus={ unstableOnFocus }\n\t\t\t__unstableAllowPrefixTransformations={\n\t\t\t\t__unstableAllowPrefixTransformations\n\t\t\t}\n\t\t\t// Native props.\n\t\t\tblockIsSelected={\n\t\t\t\toriginalIsSelected !== undefined\n\t\t\t\t\t? originalIsSelected\n\t\t\t\t\t: blockIsSelected\n\t\t\t}\n\t\t\tshouldBlurOnUnmount={ shouldBlurOnUnmount }\n\t\t\t__unstableMobileNoFocusOnMount={ __unstableMobileNoFocusOnMount }\n\t\t\tdeleteEnter={ deleteEnter }\n\t\t\tplaceholderTextColor={ placeholderTextColor }\n\t\t\ttextAlign={ textAlign }\n\t\t\tselectionColor={ selectionColor }\n\t\t\ttagsToEliminate={ tagsToEliminate }\n\t\t\tdisableEditingMenu={ disableEditingMenu }\n\t\t\tfontSize={ fontSize }\n\t\t\tfontFamily={ fontFamily }\n\t\t\tfontWeight={ fontWeight }\n\t\t\tfontStyle={ fontStyle }\n\t\t\tminWidth={ minWidth }\n\t\t\tmaxWidth={ maxWidth }\n\t\t\tonBlur={ onBlur }\n\t\t\tdisableSuggestions={ disableSuggestions }\n\t\t\tdisableAutocorrection={ disableAutocorrection }\n\t\t\tcontainerWidth={ containerWidth }\n\t\t\tclearCurrentSelectionOnUnmount={ clearCurrentSelectionOnUnmount }\n\t\t\t// Props to be set on the editable container are destructured on the\n\t\t\t// element itself for web (see below), but passed through rich text\n\t\t\t// for native.\n\t\t\tid={ props.id }\n\t\t\tstyle={ props.style }\n\t\t>\n\t\t\t{ ( {\n\t\t\t\tisSelected: nestedIsSelected,\n\t\t\t\tvalue,\n\t\t\t\tonChange,\n\t\t\t\tonFocus,\n\t\t\t\teditableProps,\n\t\t\t\teditableTagName: TagName,\n\t\t\t} ) => (\n\t\t\t\t<>\n\t\t\t\t\t{ children && children( { value, onChange, onFocus } ) }\n\t\t\t\t\t{ nestedIsSelected && hasFormats && (\n\t\t\t\t\t\t<FormatToolbarContainer\n\t\t\t\t\t\t\tinline={ inlineToolbar }\n\t\t\t\t\t\t\tanchorRef={ fallbackRef.current }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ nestedIsSelected && <RemoveBrowserShortcuts /> }\n\t\t\t\t\t<Autocomplete\n\t\t\t\t\t\tonReplace={ onReplace }\n\t\t\t\t\t\tcompleters={ autocompleters }\n\t\t\t\t\t\trecord={ value }\n\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\tisSelected={ nestedIsSelected }\n\t\t\t\t\t\tcontentRef={ fallbackRef }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ ( { listBoxId, activeId, onKeyDown } ) => (\n\t\t\t\t\t\t\t<TagName\n\t\t\t\t\t\t\t\t{ ...editableProps }\n\t\t\t\t\t\t\t\t{ ...props }\n\t\t\t\t\t\t\t\tstyle={\n\t\t\t\t\t\t\t\t\tprops.style\n\t\t\t\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\t\t\t\t...props.style,\n\t\t\t\t\t\t\t\t\t\t\t\t...editableProps.style,\n\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t: editableProps.style\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\t\t\tclasses,\n\t\t\t\t\t\t\t\t\tprops.className,\n\t\t\t\t\t\t\t\t\teditableProps.className\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\taria-autocomplete={\n\t\t\t\t\t\t\t\t\tlistBoxId ? 'list' : undefined\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\taria-owns={ listBoxId }\n\t\t\t\t\t\t\t\taria-activedescendant={ activeId }\n\t\t\t\t\t\t\t\tonKeyDown={ ( event ) => {\n\t\t\t\t\t\t\t\t\tonKeyDown( event );\n\t\t\t\t\t\t\t\t\teditableProps.onKeyDown( event );\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</Autocomplete>\n\t\t\t\t\t<EmbedHandlerPicker ref={ embedHandlerPickerRef } />\n\t\t\t\t</>\n\t\t\t) }\n\t\t</RichText>\n\t);\n}\n\n// This export does not actually implement a private API, but was exported\n// under this name for interoperability with the web version of the RichText\n// component.\nexport const PrivateRichText = withDeprecations(\n\tforwardRef( RichTextWrapper )\n);\n\nPrivateRichText.Content = Content;\n\nPrivateRichText.isEmpty = ( value ) => {\n\treturn ! value || value.length === 0;\n};\n\nPrivateRichText.Content.defaultProps = {\n\tformat: 'string',\n\tvalue: '',\n};\n\nPrivateRichText.Raw = forwardRef( ( props, ref ) => (\n\t<RichText { ...props } nativeEditorRef={ ref } />\n) );\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/rich-text/README.md\n */\nexport default PrivateRichText;\nexport { RichTextShortcut } from './shortcut';\nexport { RichTextToolbarButton } from './toolbar-button';\nexport { __unstableRichTextInputEvent } from './input-event';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AAOA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AASA,IAAAM,IAAA,GAAAN,OAAA;AAKA,IAAAO,aAAA,GAAAR,sBAAA,CAAAC,OAAA;AACA,IAAAQ,UAAA,GAAAR,OAAA;AACA,IAAAS,uBAAA,GAAAT,OAAA;AACA,IAAAU,iBAAA,GAAAV,OAAA;AACA,IAAAW,uBAAA,GAAAZ,sBAAA,CAAAC,OAAA;AACA,IAAAY,MAAA,GAAAZ,OAAA;AACA,IAAAa,MAAA,GAAAb,OAAA;AAKA,IAAAc,mBAAA,GAAAf,sBA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,eAAe,CAAC3G,OAAO,GAAKtH,KAAK,IAAM;EACtC,OAAO,CAAEA,KAAK,IAAIA,KAAK,CAACmG,MAAM,KAAK,CAAC;AACrC,CAAC;AAED8H,eAAe,CAACI,OAAO,CAACC,YAAY,GAAG;EACtCC,MAAM,EAAE,QAAQ;EAChBvO,KAAK,EAAE;AACR,CAAC;AAEDiO,eAAe,CAACO,GAAG,GAAG,IAAAJ,mBAAU,EAAE,CAAEhL,KAAK,EAAE4K,GAAG,kBAC7C,IAAA1O,WAAA,CAAA4M,GAAA,EAAChN,OAAA,CAAAiN,OAAQ;EAAA,GAAM/I,KAAK;EAAGgJ,eAAe,EAAG4B;AAAK,CAAE,CAC/C,CAAC;;AAEH;AACA;AACA;AAFA,IAAAS,QAAA,GAAAP,OAAA,CAAA/B,OAAA,GAGe8B,eAAe","ignoreList":[]}
@@ -81,8 +81,8 @@ function SpacingSizesControl({
81
81
  };
82
82
  const sideLabel = _utils.ALL_SIDES.includes(view) && showSideInLabel ? _utils.LABELS[view] : '';
83
83
  const label = (0, _i18n.sprintf)(
84
- // translators: 2. Type of spacing being modified (Padding, margin, etc). 1: The side of the block being modified (top, bottom, left etc.).
85
- (0, _i18n.__)('%1$s %2$s'), labelProp, sideLabel).trim();
84
+ // translators: 1: The side of the block being modified (top, bottom, left etc.). 2. Type of spacing being modified (padding, margin, etc).
85
+ (0, _i18n._x)('%1$s %2$s', 'spacing'), labelProp, sideLabel).trim();
86
86
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("fieldset", {
87
87
  className: "spacing-sizes-control",
88
88
  children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.__experimentalHStack, {
@@ -1 +1 @@
1
- {"version":3,"names":["_components","require","_element","_i18n","_axial","_interopRequireDefault","_separated","_single","_linkedButton","_useSpacingSizes","_utils","_jsxRuntime","SpacingSizesControl","inputProps","label","labelProp","minimumCustomValue","onChange","onMouseOut","onMouseOver","showSideInLabel","sides","ALL_SIDES","useSelect","values","spacingSizes","useSpacingSizes","inputValues","DEFAULT_VALUES","hasOneSide","length","hasOnlyAxialSides","includes","view","setView","useState","getInitialView","toggleLinked","VIEWS","axial","custom","handleOnChange","nextValue","newValues","inputControlProps","type","renderControls","jsx","default","side","sideLabel","LABELS","sprintf","__","trim","jsxs","className","children","__experimentalHStack","BaseControl","VisualLabel","as","onClick","isLinked","__experimentalVStack","spacing"],"sources":["@wordpress/block-editor/src/components/spacing-sizes-control/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tBaseControl,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport { useState } from '@wordpress/element';\nimport { __, sprintf } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport AxialInputControls from './input-controls/axial';\nimport SeparatedInputControls from './input-controls/separated';\nimport SingleInputControl from './input-controls/single';\nimport LinkedButton from './linked-button';\nimport useSpacingSizes from './hooks/use-spacing-sizes';\nimport {\n\tALL_SIDES,\n\tDEFAULT_VALUES,\n\tLABELS,\n\tVIEWS,\n\tgetInitialView,\n} from './utils';\n\nexport default function SpacingSizesControl( {\n\tinputProps,\n\tlabel: labelProp,\n\tminimumCustomValue = 0,\n\tonChange,\n\tonMouseOut,\n\tonMouseOver,\n\tshowSideInLabel = true,\n\tsides = ALL_SIDES,\n\tuseSelect,\n\tvalues,\n} ) {\n\tconst spacingSizes = useSpacingSizes();\n\tconst inputValues = values || DEFAULT_VALUES;\n\tconst hasOneSide = sides?.length === 1;\n\tconst hasOnlyAxialSides =\n\t\tsides?.includes( 'horizontal' ) &&\n\t\tsides?.includes( 'vertical' ) &&\n\t\tsides?.length === 2;\n\n\tconst [ view, setView ] = useState( getInitialView( inputValues, sides ) );\n\n\tconst toggleLinked = () => {\n\t\tsetView( view === VIEWS.axial ? VIEWS.custom : VIEWS.axial );\n\t};\n\n\tconst handleOnChange = ( nextValue ) => {\n\t\tconst newValues = { ...values, ...nextValue };\n\t\tonChange( newValues );\n\t};\n\n\tconst inputControlProps = {\n\t\t...inputProps,\n\t\tminimumCustomValue,\n\t\tonChange: handleOnChange,\n\t\tonMouseOut,\n\t\tonMouseOver,\n\t\tsides,\n\t\tspacingSizes,\n\t\ttype: labelProp,\n\t\tuseSelect,\n\t\tvalues: inputValues,\n\t};\n\n\tconst renderControls = () => {\n\t\tif ( view === VIEWS.axial ) {\n\t\t\treturn <AxialInputControls { ...inputControlProps } />;\n\t\t}\n\t\tif ( view === VIEWS.custom ) {\n\t\t\treturn <SeparatedInputControls { ...inputControlProps } />;\n\t\t}\n\t\treturn (\n\t\t\t<SingleInputControl\n\t\t\t\tside={ view }\n\t\t\t\t{ ...inputControlProps }\n\t\t\t\tshowSideInLabel={ showSideInLabel }\n\t\t\t/>\n\t\t);\n\t};\n\n\tconst sideLabel =\n\t\tALL_SIDES.includes( view ) && showSideInLabel ? LABELS[ view ] : '';\n\n\tconst label = sprintf(\n\t\t// translators: 2. Type of spacing being modified (Padding, margin, etc). 1: The side of the block being modified (top, bottom, left etc.).\n\t\t__( '%1$s %2$s' ),\n\t\tlabelProp,\n\t\tsideLabel\n\t).trim();\n\n\treturn (\n\t\t<fieldset className=\"spacing-sizes-control\">\n\t\t\t<HStack className=\"spacing-sizes-control__header\">\n\t\t\t\t<BaseControl.VisualLabel\n\t\t\t\t\tas=\"legend\"\n\t\t\t\t\tclassName=\"spacing-sizes-control__label\"\n\t\t\t\t>\n\t\t\t\t\t{ label }\n\t\t\t\t</BaseControl.VisualLabel>\n\t\t\t\t{ ! hasOneSide && ! hasOnlyAxialSides && (\n\t\t\t\t\t<LinkedButton\n\t\t\t\t\t\tlabel={ labelProp }\n\t\t\t\t\t\tonClick={ toggleLinked }\n\t\t\t\t\t\tisLinked={ view === VIEWS.axial }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</HStack>\n\t\t\t<VStack spacing={ 0.5 }>{ renderControls() }</VStack>\n\t\t</fieldset>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA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AAC,uBAAuB;IAAAC,QAAA,gBAC1C,IAAA9C,WAAA,CAAA4C,IAAA,EAACvD,WAAA,CAAA0D,oBAAM;MAACF,SAAS,EAAC,+BAA+B;MAAAC,QAAA,gBAChD,IAAA9C,WAAA,CAAAoC,GAAA,EAAC/C,WAAA,CAAA2D,WAAW,CAACC,WAAW;QACvBC,EAAE,EAAC,QAAQ;QACXL,SAAS,EAAC,8BAA8B;QAAAC,QAAA,EAEtC3C;MAAK,CACiB,CAAC,EACxB,CAAEe,UAAU,IAAI,CAAEE,iBAAiB,iBACpC,IAAApB,WAAA,CAAAoC,GAAA,EAACvC,aAAA,CAAAwC,OAAY;QACZlC,KAAK,EAAGC,SAAW;QACnB+C,OAAO,EAAGzB,YAAc;QACxB0B,QAAQ,EAAG9B,IAAI,KAAKK,YAAK,CAACC;MAAO,CACjC,CACD;IAAA,CACM,CAAC,eACT,IAAA5B,WAAA,CAAAoC,GAAA,EAAC/C,WAAA,CAAAgE,oBAAM;MAACC,OAAO,EAAG,GAAK;MAAAR,QAAA,EAAGX,cAAc,CAAC;IAAC,CAAU,CAAC;EAAA,CAC5C,CAAC;AAEb","ignoreList":[]}
1
+ {"version":3,"names":["_components","require","_element","_i18n","_axial","_interopRequireDefault","_separated","_single","_linkedButton","_useSpacingSizes","_utils","_jsxRuntime","SpacingSizesControl","inputProps","label","labelProp","minimumCustomValue","onChange","onMouseOut","onMouseOver","showSideInLabel","sides","ALL_SIDES","useSelect","values","spacingSizes","useSpacingSizes","inputValues","DEFAULT_VALUES","hasOneSide","length","hasOnlyAxialSides","includes","view","setView","useState","getInitialView","toggleLinked","VIEWS","axial","custom","handleOnChange","nextValue","newValues","inputControlProps","type","renderControls","jsx","default","side","sideLabel","LABELS","sprintf","_x","trim","jsxs","className","children","__experimentalHStack","BaseControl","VisualLabel","as","onClick","isLinked","__experimentalVStack","spacing"],"sources":["@wordpress/block-editor/src/components/spacing-sizes-control/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tBaseControl,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport { useState } from '@wordpress/element';\nimport { _x, sprintf } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport AxialInputControls from './input-controls/axial';\nimport SeparatedInputControls from './input-controls/separated';\nimport SingleInputControl from './input-controls/single';\nimport LinkedButton from './linked-button';\nimport useSpacingSizes from './hooks/use-spacing-sizes';\nimport {\n\tALL_SIDES,\n\tDEFAULT_VALUES,\n\tLABELS,\n\tVIEWS,\n\tgetInitialView,\n} from './utils';\n\nexport default function SpacingSizesControl( {\n\tinputProps,\n\tlabel: labelProp,\n\tminimumCustomValue = 0,\n\tonChange,\n\tonMouseOut,\n\tonMouseOver,\n\tshowSideInLabel = true,\n\tsides = ALL_SIDES,\n\tuseSelect,\n\tvalues,\n} ) {\n\tconst spacingSizes = useSpacingSizes();\n\tconst inputValues = values || DEFAULT_VALUES;\n\tconst hasOneSide = sides?.length === 1;\n\tconst hasOnlyAxialSides =\n\t\tsides?.includes( 'horizontal' ) &&\n\t\tsides?.includes( 'vertical' ) &&\n\t\tsides?.length === 2;\n\n\tconst [ view, setView ] = useState( getInitialView( inputValues, sides ) );\n\n\tconst toggleLinked = () => {\n\t\tsetView( view === VIEWS.axial ? VIEWS.custom : VIEWS.axial );\n\t};\n\n\tconst handleOnChange = ( nextValue ) => {\n\t\tconst newValues = { ...values, ...nextValue };\n\t\tonChange( newValues );\n\t};\n\n\tconst inputControlProps = {\n\t\t...inputProps,\n\t\tminimumCustomValue,\n\t\tonChange: handleOnChange,\n\t\tonMouseOut,\n\t\tonMouseOver,\n\t\tsides,\n\t\tspacingSizes,\n\t\ttype: labelProp,\n\t\tuseSelect,\n\t\tvalues: inputValues,\n\t};\n\n\tconst renderControls = () => {\n\t\tif ( view === VIEWS.axial ) {\n\t\t\treturn <AxialInputControls { ...inputControlProps } />;\n\t\t}\n\t\tif ( view === VIEWS.custom ) {\n\t\t\treturn <SeparatedInputControls { ...inputControlProps } />;\n\t\t}\n\t\treturn (\n\t\t\t<SingleInputControl\n\t\t\t\tside={ view }\n\t\t\t\t{ ...inputControlProps }\n\t\t\t\tshowSideInLabel={ showSideInLabel }\n\t\t\t/>\n\t\t);\n\t};\n\n\tconst sideLabel =\n\t\tALL_SIDES.includes( view ) && showSideInLabel ? LABELS[ view ] : '';\n\n\tconst label = sprintf(\n\t\t// translators: 1: The side of the block being modified (top, bottom, left etc.). 2. Type of spacing being modified (padding, margin, etc).\n\t\t_x( '%1$s %2$s', 'spacing' ),\n\t\tlabelProp,\n\t\tsideLabel\n\t).trim();\n\n\treturn (\n\t\t<fieldset className=\"spacing-sizes-control\">\n\t\t\t<HStack className=\"spacing-sizes-control__header\">\n\t\t\t\t<BaseControl.VisualLabel\n\t\t\t\t\tas=\"legend\"\n\t\t\t\t\tclassName=\"spacing-sizes-control__label\"\n\t\t\t\t>\n\t\t\t\t\t{ label }\n\t\t\t\t</BaseControl.VisualLabel>\n\t\t\t\t{ ! hasOneSide && ! hasOnlyAxialSides && (\n\t\t\t\t\t<LinkedButton\n\t\t\t\t\t\tlabel={ labelProp }\n\t\t\t\t\t\tonClick={ toggleLinked }\n\t\t\t\t\t\tisLinked={ view === VIEWS.axial }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</HStack>\n\t\t\t<VStack spacing={ 0.5 }>{ renderControls() }</VStack>\n\t\t</fieldset>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AAKA,IAAAG,MAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,UAAA,GAAAD,sBAAA,CAAAJ,OAAA;AACA,IAAAM,OAAA,GAAAF,sBAAA,CAAAJ,OAAA;AACA,IAAAO,aAAA,GAAAH,sBAAA,CAAAJ,OAAA;AACA,IAAAQ,gBAAA,GAAAJ,sBAAA,CA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