@wordpress/block-editor 8.2.0 → 8.2.1-next.a55ed9455a.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 (475) hide show
  1. package/README.md +6 -2
  2. package/build/autocompleters/link.js +78 -0
  3. package/build/autocompleters/link.js.map +1 -0
  4. package/build/components/autocomplete/index.js +3 -1
  5. package/build/components/autocomplete/index.js.map +1 -1
  6. package/build/components/block-actions/index.js +1 -1
  7. package/build/components/block-actions/index.js.map +1 -1
  8. package/build/components/block-breadcrumb/index.js +4 -2
  9. package/build/components/block-breadcrumb/index.js.map +1 -1
  10. package/build/components/block-compare/index.js +2 -2
  11. package/build/components/block-compare/index.js.map +1 -1
  12. package/build/components/block-controls/index.js +1 -1
  13. package/build/components/block-controls/index.js.map +1 -1
  14. package/build/components/block-draggable/index.js +1 -1
  15. package/build/components/block-draggable/index.js.map +1 -1
  16. package/build/components/block-edit/edit.js +1 -1
  17. package/build/components/block-edit/edit.js.map +1 -1
  18. package/build/components/block-list/block-html.js +1 -1
  19. package/build/components/block-list/block-html.js.map +1 -1
  20. package/build/components/block-list/block-invalid-warning.js +1 -1
  21. package/build/components/block-list/block-invalid-warning.js.map +1 -1
  22. package/build/components/block-list/block-list-item.native.js +4 -4
  23. package/build/components/block-list/block-list-item.native.js.map +1 -1
  24. package/build/components/block-list/block-selection-button.native.js +4 -3
  25. package/build/components/block-list/block-selection-button.native.js.map +1 -1
  26. package/build/components/block-list/block.js +1 -1
  27. package/build/components/block-list/block.js.map +1 -1
  28. package/build/components/block-list/block.native.js +5 -5
  29. package/build/components/block-list/block.native.js.map +1 -1
  30. package/build/components/block-list/index.native.js +5 -5
  31. package/build/components/block-list/index.native.js.map +1 -1
  32. package/build/components/block-list/use-block-props/use-block-class-names.js +1 -1
  33. package/build/components/block-list/use-block-props/use-block-class-names.js.map +1 -1
  34. package/build/components/block-media-update-progress/index.native.js +4 -4
  35. package/build/components/block-media-update-progress/index.native.js.map +1 -1
  36. package/build/components/block-mobile-toolbar/block-actions-menu.native.js +3 -3
  37. package/build/components/block-mobile-toolbar/block-actions-menu.native.js.map +1 -1
  38. package/build/components/block-mobile-toolbar/index.native.js +1 -1
  39. package/build/components/block-mobile-toolbar/index.native.js.map +1 -1
  40. package/build/components/block-mover/mover-description.js +4 -4
  41. package/build/components/block-mover/mover-description.js.map +1 -1
  42. package/build/components/block-mover/mover-description.native.js +5 -5
  43. package/build/components/block-mover/mover-description.native.js.map +1 -1
  44. package/build/components/block-settings-menu/block-settings-dropdown.js +7 -12
  45. package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  46. package/build/components/block-styles/preview.native.js +1 -1
  47. package/build/components/block-styles/preview.native.js.map +1 -1
  48. package/build/components/block-switcher/index.js +2 -1
  49. package/build/components/block-switcher/index.js.map +1 -1
  50. package/build/components/block-switcher/use-transformed-patterns.js +0 -1
  51. package/build/components/block-switcher/use-transformed-patterns.js.map +1 -1
  52. package/build/components/block-title/index.js +7 -62
  53. package/build/components/block-title/index.js.map +1 -1
  54. package/build/components/block-title/use-block-display-title.js +94 -0
  55. package/build/components/block-title/use-block-display-title.js.map +1 -0
  56. package/build/components/block-toolbar/utils.js +9 -1
  57. package/build/components/block-toolbar/utils.js.map +1 -1
  58. package/build/components/block-tools/block-popover.js +1 -1
  59. package/build/components/block-tools/block-popover.js.map +1 -1
  60. package/build/components/block-tools/block-selection-button.js +2 -1
  61. package/build/components/block-tools/block-selection-button.js.map +1 -1
  62. package/build/components/block-types-list/index.native.js +1 -1
  63. package/build/components/block-types-list/index.native.js.map +1 -1
  64. package/build/components/border-radius-control/index.js +2 -2
  65. package/build/components/border-radius-control/index.js.map +1 -1
  66. package/build/components/border-radius-control/utils.js +10 -6
  67. package/build/components/border-radius-control/utils.js.map +1 -1
  68. package/build/components/contrast-checker/index.js +3 -3
  69. package/build/components/contrast-checker/index.js.map +1 -1
  70. package/build/components/convert-to-group-buttons/index.js +1 -1
  71. package/build/components/convert-to-group-buttons/index.js.map +1 -1
  72. package/build/components/convert-to-group-buttons/use-convert-to-group-button-props.js +1 -3
  73. package/build/components/convert-to-group-buttons/use-convert-to-group-button-props.js.map +1 -1
  74. package/build/components/copy-handler/index.js +3 -3
  75. package/build/components/copy-handler/index.js.map +1 -1
  76. package/build/components/font-sizes/with-font-sizes.js +3 -3
  77. package/build/components/font-sizes/with-font-sizes.js.map +1 -1
  78. package/build/components/index.native.js +29 -1
  79. package/build/components/index.native.js.map +1 -1
  80. package/build/components/inserter/block-patterns-tab.js +1 -1
  81. package/build/components/inserter/block-patterns-tab.js.map +1 -1
  82. package/build/components/inserter/block-types-tab.js +1 -1
  83. package/build/components/inserter/block-types-tab.js.map +1 -1
  84. package/build/components/inserter/hooks/use-block-type-impressions.native.js +2 -2
  85. package/build/components/inserter/hooks/use-block-type-impressions.native.js.map +1 -1
  86. package/build/components/inserter/index.js +3 -3
  87. package/build/components/inserter/index.js.map +1 -1
  88. package/build/components/inserter/index.native.js +7 -7
  89. package/build/components/inserter/index.native.js.map +1 -1
  90. package/build/components/inserter/menu.js.map +1 -1
  91. package/build/components/inserter/menu.native.js +3 -3
  92. package/build/components/inserter/menu.native.js.map +1 -1
  93. package/build/components/inserter/quick-inserter.js +1 -1
  94. package/build/components/inserter/quick-inserter.js.map +1 -1
  95. package/build/components/inserter/search-items.js +1 -1
  96. package/build/components/inserter/search-items.js.map +1 -1
  97. package/build/components/inserter/search-results.js +1 -1
  98. package/build/components/inserter/search-results.js.map +1 -1
  99. package/build/components/keyboard-shortcuts/index.js +1 -1
  100. package/build/components/keyboard-shortcuts/index.js.map +1 -1
  101. package/build/components/letter-spacing-control/index.js +3 -3
  102. package/build/components/letter-spacing-control/index.js.map +1 -1
  103. package/build/components/line-height-control/index.js +4 -4
  104. package/build/components/line-height-control/index.js.map +1 -1
  105. package/build/components/line-height-control/index.native.js +3 -1
  106. package/build/components/line-height-control/index.native.js.map +1 -1
  107. package/build/components/link-control/index.js +2 -2
  108. package/build/components/link-control/index.js.map +1 -1
  109. package/build/components/link-control/search-input.js +1 -1
  110. package/build/components/link-control/search-input.js.map +1 -1
  111. package/build/components/link-control/search-results.js +2 -2
  112. package/build/components/link-control/search-results.js.map +1 -1
  113. package/build/components/link-control/use-rich-url-data.js +1 -1
  114. package/build/components/link-control/use-rich-url-data.js.map +1 -1
  115. package/build/components/link-control/use-search-handler.js +2 -2
  116. package/build/components/link-control/use-search-handler.js.map +1 -1
  117. package/build/components/list-view/block-select-button.js +2 -1
  118. package/build/components/list-view/block-select-button.js.map +1 -1
  119. package/build/components/list-view/block.js +1 -1
  120. package/build/components/list-view/block.js.map +1 -1
  121. package/build/components/media-placeholder/index.native.js +7 -5
  122. package/build/components/media-placeholder/index.native.js.map +1 -1
  123. package/build/components/media-replace-flow/index.js +20 -24
  124. package/build/components/media-replace-flow/index.js.map +1 -1
  125. package/build/components/media-upload/index.native.js +4 -3
  126. package/build/components/media-upload/index.native.js.map +1 -1
  127. package/build/components/media-upload-progress/index.native.js +1 -1
  128. package/build/components/media-upload-progress/index.native.js.map +1 -1
  129. package/build/components/navigable-toolbar/index.js +3 -3
  130. package/build/components/navigable-toolbar/index.js.map +1 -1
  131. package/build/components/plain-text/index.native.js +3 -3
  132. package/build/components/plain-text/index.native.js.map +1 -1
  133. package/build/components/rich-text/format-toolbar-container.js +2 -2
  134. package/build/components/rich-text/format-toolbar-container.js.map +1 -1
  135. package/build/components/rich-text/format-toolbar-container.native.js +1 -1
  136. package/build/components/rich-text/format-toolbar-container.native.js.map +1 -1
  137. package/build/components/rich-text/index.native.js +3 -3
  138. package/build/components/rich-text/index.native.js.map +1 -1
  139. package/build/components/rich-text/use-paste-handler.js +7 -11
  140. package/build/components/rich-text/use-paste-handler.js.map +1 -1
  141. package/build/components/url-input/index.js +11 -11
  142. package/build/components/url-input/index.js.map +1 -1
  143. package/build/components/use-moving-animation/index.js +1 -1
  144. package/build/components/use-moving-animation/index.js.map +1 -1
  145. package/build/components/use-on-block-drop/index.js +2 -2
  146. package/build/components/use-on-block-drop/index.js.map +1 -1
  147. package/build/components/writing-flow/use-tab-nav.js +4 -3
  148. package/build/components/writing-flow/use-tab-nav.js.map +1 -1
  149. package/build/hooks/align.js +1 -1
  150. package/build/hooks/align.js.map +1 -1
  151. package/build/hooks/anchor.js +1 -1
  152. package/build/hooks/anchor.js.map +1 -1
  153. package/build/hooks/border.js +2 -14
  154. package/build/hooks/border.js.map +1 -1
  155. package/build/hooks/color.js +2 -2
  156. package/build/hooks/color.js.map +1 -1
  157. package/build/hooks/generated-class-name.js +3 -3
  158. package/build/hooks/generated-class-name.js.map +1 -1
  159. package/build/hooks/lock.js +1 -1
  160. package/build/hooks/lock.js.map +1 -1
  161. package/build/hooks/style.js +5 -2
  162. package/build/hooks/style.js.map +1 -1
  163. package/build/store/actions.js +4 -4
  164. package/build/store/actions.js.map +1 -1
  165. package/build/store/defaults.js +1 -1
  166. package/build/store/defaults.js.map +1 -1
  167. package/build/store/reducer.js +11 -11
  168. package/build/store/reducer.js.map +1 -1
  169. package/build/store/selectors.js +6 -6
  170. package/build/store/selectors.js.map +1 -1
  171. package/build/utils/parse-css-unit-to-px.js +3 -3
  172. package/build/utils/parse-css-unit-to-px.js.map +1 -1
  173. package/build/utils/pasting.js +91 -0
  174. package/build/utils/pasting.js.map +1 -0
  175. package/build/utils/transform-styles/ast/parse.js +5 -5
  176. package/build/utils/transform-styles/ast/parse.js.map +1 -1
  177. package/build/utils/transform-styles/transforms/url-rewrite.js +2 -2
  178. package/build/utils/transform-styles/transforms/url-rewrite.js.map +1 -1
  179. package/build-module/autocompleters/link.js +64 -0
  180. package/build-module/autocompleters/link.js.map +1 -0
  181. package/build-module/components/autocomplete/index.js +2 -1
  182. package/build-module/components/autocomplete/index.js.map +1 -1
  183. package/build-module/components/block-actions/index.js +1 -1
  184. package/build-module/components/block-actions/index.js.map +1 -1
  185. package/build-module/components/block-breadcrumb/index.js +4 -2
  186. package/build-module/components/block-breadcrumb/index.js.map +1 -1
  187. package/build-module/components/block-compare/index.js +2 -2
  188. package/build-module/components/block-compare/index.js.map +1 -1
  189. package/build-module/components/block-controls/index.js +1 -1
  190. package/build-module/components/block-controls/index.js.map +1 -1
  191. package/build-module/components/block-draggable/index.js +1 -1
  192. package/build-module/components/block-draggable/index.js.map +1 -1
  193. package/build-module/components/block-edit/edit.js +1 -1
  194. package/build-module/components/block-edit/edit.js.map +1 -1
  195. package/build-module/components/block-list/block-html.js +1 -1
  196. package/build-module/components/block-list/block-html.js.map +1 -1
  197. package/build-module/components/block-list/block-invalid-warning.js +1 -1
  198. package/build-module/components/block-list/block-invalid-warning.js.map +1 -1
  199. package/build-module/components/block-list/block-list-item.native.js +4 -4
  200. package/build-module/components/block-list/block-list-item.native.js.map +1 -1
  201. package/build-module/components/block-list/block-selection-button.native.js +4 -3
  202. package/build-module/components/block-list/block-selection-button.native.js.map +1 -1
  203. package/build-module/components/block-list/block.js +1 -1
  204. package/build-module/components/block-list/block.js.map +1 -1
  205. package/build-module/components/block-list/block.native.js +5 -5
  206. package/build-module/components/block-list/block.native.js.map +1 -1
  207. package/build-module/components/block-list/index.native.js +5 -5
  208. package/build-module/components/block-list/index.native.js.map +1 -1
  209. package/build-module/components/block-list/use-block-props/use-block-class-names.js +1 -1
  210. package/build-module/components/block-list/use-block-props/use-block-class-names.js.map +1 -1
  211. package/build-module/components/block-media-update-progress/index.native.js +4 -4
  212. package/build-module/components/block-media-update-progress/index.native.js.map +1 -1
  213. package/build-module/components/block-mobile-toolbar/block-actions-menu.native.js +3 -3
  214. package/build-module/components/block-mobile-toolbar/block-actions-menu.native.js.map +1 -1
  215. package/build-module/components/block-mobile-toolbar/index.native.js +1 -1
  216. package/build-module/components/block-mobile-toolbar/index.native.js.map +1 -1
  217. package/build-module/components/block-mover/mover-description.js +4 -4
  218. package/build-module/components/block-mover/mover-description.js.map +1 -1
  219. package/build-module/components/block-mover/mover-description.native.js +5 -5
  220. package/build-module/components/block-mover/mover-description.native.js.map +1 -1
  221. package/build-module/components/block-settings-menu/block-settings-dropdown.js +7 -13
  222. package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  223. package/build-module/components/block-styles/preview.native.js +1 -1
  224. package/build-module/components/block-styles/preview.native.js.map +1 -1
  225. package/build-module/components/block-switcher/index.js +2 -1
  226. package/build-module/components/block-switcher/index.js.map +1 -1
  227. package/build-module/components/block-switcher/use-transformed-patterns.js +0 -1
  228. package/build-module/components/block-switcher/use-transformed-patterns.js.map +1 -1
  229. package/build-module/components/block-title/index.js +7 -58
  230. package/build-module/components/block-title/index.js.map +1 -1
  231. package/build-module/components/block-title/use-block-display-title.js +80 -0
  232. package/build-module/components/block-title/use-block-display-title.js.map +1 -0
  233. package/build-module/components/block-toolbar/utils.js +9 -1
  234. package/build-module/components/block-toolbar/utils.js.map +1 -1
  235. package/build-module/components/block-tools/block-popover.js +1 -1
  236. package/build-module/components/block-tools/block-popover.js.map +1 -1
  237. package/build-module/components/block-tools/block-selection-button.js +2 -1
  238. package/build-module/components/block-tools/block-selection-button.js.map +1 -1
  239. package/build-module/components/block-types-list/index.native.js +1 -1
  240. package/build-module/components/block-types-list/index.native.js.map +1 -1
  241. package/build-module/components/border-radius-control/index.js +3 -3
  242. package/build-module/components/border-radius-control/index.js.map +1 -1
  243. package/build-module/components/border-radius-control/utils.js +11 -7
  244. package/build-module/components/border-radius-control/utils.js.map +1 -1
  245. package/build-module/components/contrast-checker/index.js +3 -3
  246. package/build-module/components/contrast-checker/index.js.map +1 -1
  247. package/build-module/components/convert-to-group-buttons/index.js +1 -1
  248. package/build-module/components/convert-to-group-buttons/index.js.map +1 -1
  249. package/build-module/components/convert-to-group-buttons/use-convert-to-group-button-props.js +1 -3
  250. package/build-module/components/convert-to-group-buttons/use-convert-to-group-button-props.js.map +1 -1
  251. package/build-module/components/copy-handler/index.js +2 -2
  252. package/build-module/components/copy-handler/index.js.map +1 -1
  253. package/build-module/components/font-sizes/with-font-sizes.js +3 -3
  254. package/build-module/components/font-sizes/with-font-sizes.js.map +1 -1
  255. package/build-module/components/index.native.js +4 -4
  256. package/build-module/components/index.native.js.map +1 -1
  257. package/build-module/components/inserter/block-patterns-tab.js +1 -1
  258. package/build-module/components/inserter/block-patterns-tab.js.map +1 -1
  259. package/build-module/components/inserter/block-types-tab.js +1 -1
  260. package/build-module/components/inserter/block-types-tab.js.map +1 -1
  261. package/build-module/components/inserter/hooks/use-block-type-impressions.native.js +2 -2
  262. package/build-module/components/inserter/hooks/use-block-type-impressions.native.js.map +1 -1
  263. package/build-module/components/inserter/index.js +3 -3
  264. package/build-module/components/inserter/index.js.map +1 -1
  265. package/build-module/components/inserter/index.native.js +7 -7
  266. package/build-module/components/inserter/index.native.js.map +1 -1
  267. package/build-module/components/inserter/menu.js.map +1 -1
  268. package/build-module/components/inserter/menu.native.js +3 -3
  269. package/build-module/components/inserter/menu.native.js.map +1 -1
  270. package/build-module/components/inserter/quick-inserter.js +1 -1
  271. package/build-module/components/inserter/quick-inserter.js.map +1 -1
  272. package/build-module/components/inserter/search-items.js +1 -1
  273. package/build-module/components/inserter/search-items.js.map +1 -1
  274. package/build-module/components/inserter/search-results.js +1 -1
  275. package/build-module/components/inserter/search-results.js.map +1 -1
  276. package/build-module/components/keyboard-shortcuts/index.js +1 -1
  277. package/build-module/components/keyboard-shortcuts/index.js.map +1 -1
  278. package/build-module/components/letter-spacing-control/index.js +3 -3
  279. package/build-module/components/letter-spacing-control/index.js.map +1 -1
  280. package/build-module/components/line-height-control/index.js +4 -4
  281. package/build-module/components/line-height-control/index.js.map +1 -1
  282. package/build-module/components/line-height-control/index.native.js +3 -1
  283. package/build-module/components/line-height-control/index.native.js.map +1 -1
  284. package/build-module/components/link-control/index.js +2 -2
  285. package/build-module/components/link-control/index.js.map +1 -1
  286. package/build-module/components/link-control/search-input.js +1 -1
  287. package/build-module/components/link-control/search-input.js.map +1 -1
  288. package/build-module/components/link-control/search-results.js +2 -2
  289. package/build-module/components/link-control/search-results.js.map +1 -1
  290. package/build-module/components/link-control/use-rich-url-data.js +1 -1
  291. package/build-module/components/link-control/use-rich-url-data.js.map +1 -1
  292. package/build-module/components/link-control/use-search-handler.js +2 -2
  293. package/build-module/components/link-control/use-search-handler.js.map +1 -1
  294. package/build-module/components/list-view/block-select-button.js +2 -1
  295. package/build-module/components/list-view/block-select-button.js.map +1 -1
  296. package/build-module/components/list-view/block.js +1 -1
  297. package/build-module/components/list-view/block.js.map +1 -1
  298. package/build-module/components/media-placeholder/index.native.js +7 -5
  299. package/build-module/components/media-placeholder/index.native.js.map +1 -1
  300. package/build-module/components/media-replace-flow/index.js +22 -27
  301. package/build-module/components/media-replace-flow/index.js.map +1 -1
  302. package/build-module/components/media-upload/index.native.js +4 -3
  303. package/build-module/components/media-upload/index.native.js.map +1 -1
  304. package/build-module/components/media-upload-progress/index.native.js +1 -1
  305. package/build-module/components/media-upload-progress/index.native.js.map +1 -1
  306. package/build-module/components/navigable-toolbar/index.js +3 -3
  307. package/build-module/components/navigable-toolbar/index.js.map +1 -1
  308. package/build-module/components/plain-text/index.native.js +3 -3
  309. package/build-module/components/plain-text/index.native.js.map +1 -1
  310. package/build-module/components/rich-text/format-toolbar-container.js +2 -2
  311. package/build-module/components/rich-text/format-toolbar-container.js.map +1 -1
  312. package/build-module/components/rich-text/format-toolbar-container.native.js +1 -1
  313. package/build-module/components/rich-text/format-toolbar-container.native.js.map +1 -1
  314. package/build-module/components/rich-text/index.native.js +3 -3
  315. package/build-module/components/rich-text/index.native.js.map +1 -1
  316. package/build-module/components/rich-text/use-paste-handler.js +6 -11
  317. package/build-module/components/rich-text/use-paste-handler.js.map +1 -1
  318. package/build-module/components/url-input/index.js +11 -11
  319. package/build-module/components/url-input/index.js.map +1 -1
  320. package/build-module/components/use-moving-animation/index.js +1 -1
  321. package/build-module/components/use-moving-animation/index.js.map +1 -1
  322. package/build-module/components/use-on-block-drop/index.js +2 -2
  323. package/build-module/components/use-on-block-drop/index.js.map +1 -1
  324. package/build-module/components/writing-flow/use-tab-nav.js +4 -3
  325. package/build-module/components/writing-flow/use-tab-nav.js.map +1 -1
  326. package/build-module/hooks/align.js +1 -1
  327. package/build-module/hooks/align.js.map +1 -1
  328. package/build-module/hooks/anchor.js +1 -1
  329. package/build-module/hooks/anchor.js.map +1 -1
  330. package/build-module/hooks/border.js +2 -14
  331. package/build-module/hooks/border.js.map +1 -1
  332. package/build-module/hooks/color.js +2 -2
  333. package/build-module/hooks/color.js.map +1 -1
  334. package/build-module/hooks/generated-class-name.js +3 -3
  335. package/build-module/hooks/generated-class-name.js.map +1 -1
  336. package/build-module/hooks/lock.js +1 -1
  337. package/build-module/hooks/lock.js.map +1 -1
  338. package/build-module/hooks/style.js +5 -2
  339. package/build-module/hooks/style.js.map +1 -1
  340. package/build-module/store/actions.js +4 -4
  341. package/build-module/store/actions.js.map +1 -1
  342. package/build-module/store/defaults.js +1 -1
  343. package/build-module/store/defaults.js.map +1 -1
  344. package/build-module/store/reducer.js +11 -11
  345. package/build-module/store/reducer.js.map +1 -1
  346. package/build-module/store/selectors.js +6 -6
  347. package/build-module/store/selectors.js.map +1 -1
  348. package/build-module/utils/parse-css-unit-to-px.js +3 -3
  349. package/build-module/utils/parse-css-unit-to-px.js.map +1 -1
  350. package/build-module/utils/pasting.js +80 -0
  351. package/build-module/utils/pasting.js.map +1 -0
  352. package/build-module/utils/transform-styles/ast/parse.js +5 -5
  353. package/build-module/utils/transform-styles/ast/parse.js.map +1 -1
  354. package/build-module/utils/transform-styles/transforms/url-rewrite.js +2 -2
  355. package/build-module/utils/transform-styles/transforms/url-rewrite.js.map +1 -1
  356. package/build-style/style-rtl.css +7 -0
  357. package/build-style/style.css +7 -0
  358. package/package.json +27 -27
  359. package/src/autocompleters/link.js +62 -0
  360. package/src/autocompleters/style.scss +8 -0
  361. package/src/components/alignment-control/test/index.js +2 -2
  362. package/src/components/autocomplete/index.js +2 -0
  363. package/src/components/block-actions/index.js +1 -1
  364. package/src/components/block-alignment-control/test/index.js +1 -1
  365. package/src/components/block-breadcrumb/index.js +5 -2
  366. package/src/components/block-compare/index.js +2 -2
  367. package/src/components/block-controls/index.js +1 -1
  368. package/src/components/block-draggable/index.js +1 -1
  369. package/src/components/block-draggable/stories/index.js +1 -1
  370. package/src/components/block-edit/edit.js +1 -1
  371. package/src/components/block-list/block-html.js +1 -1
  372. package/src/components/block-list/block-invalid-warning.js +1 -1
  373. package/src/components/block-list/block-list-item.native.js +4 -4
  374. package/src/components/block-list/block-selection-button.native.js +3 -3
  375. package/src/components/block-list/block.js +1 -1
  376. package/src/components/block-list/block.native.js +5 -5
  377. package/src/components/block-list/index.native.js +5 -5
  378. package/src/components/block-list/use-block-props/use-block-class-names.js +1 -1
  379. package/src/components/block-media-update-progress/index.native.js +4 -4
  380. package/src/components/block-media-update-progress/test/index.native.js +2 -2
  381. package/src/components/block-mobile-toolbar/block-actions-menu.native.js +3 -3
  382. package/src/components/block-mobile-toolbar/index.native.js +2 -2
  383. package/src/components/block-mover/mover-description.js +4 -4
  384. package/src/components/block-mover/mover-description.native.js +5 -5
  385. package/src/components/block-settings-menu/block-settings-dropdown.js +7 -8
  386. package/src/components/block-styles/preview.native.js +1 -1
  387. package/src/components/block-switcher/index.js +4 -1
  388. package/src/components/block-switcher/use-transformed-patterns.js +0 -1
  389. package/src/components/block-title/README.md +17 -1
  390. package/src/components/block-title/index.js +7 -62
  391. package/src/components/block-title/test/index.js +21 -3
  392. package/src/components/block-title/use-block-display-title.js +83 -0
  393. package/src/components/block-toolbar/utils.js +12 -2
  394. package/src/components/block-tools/block-popover.js +1 -1
  395. package/src/components/block-tools/block-selection-button.js +4 -1
  396. package/src/components/block-types-list/index.native.js +1 -1
  397. package/src/components/border-radius-control/index.js +5 -3
  398. package/src/components/border-radius-control/test/utils.js +10 -10
  399. package/src/components/border-radius-control/utils.js +10 -8
  400. package/src/components/contrast-checker/index.js +3 -3
  401. package/src/components/convert-to-group-buttons/index.js +1 -1
  402. package/src/components/convert-to-group-buttons/use-convert-to-group-button-props.js +1 -6
  403. package/src/components/copy-handler/index.js +2 -2
  404. package/src/components/font-sizes/with-font-sizes.js +3 -3
  405. package/src/components/image-size-control/test/index.js +1 -1
  406. package/src/components/index.native.js +10 -4
  407. package/src/components/inserter/block-patterns-tab.js +1 -1
  408. package/src/components/inserter/block-types-tab.js +1 -1
  409. package/src/components/inserter/hooks/use-block-type-impressions.native.js +2 -2
  410. package/src/components/inserter/index.js +3 -3
  411. package/src/components/inserter/index.native.js +7 -7
  412. package/src/components/inserter/menu.js +1 -1
  413. package/src/components/inserter/menu.native.js +3 -3
  414. package/src/components/inserter/quick-inserter.js +1 -1
  415. package/src/components/inserter/search-items.js +1 -1
  416. package/src/components/inserter/search-results.js +1 -1
  417. package/src/components/inserter/test/fixtures/index.native.js +1 -1
  418. package/src/components/inserter/test/reusable-blocks-tab.js +2 -2
  419. package/src/components/justify-content-control/README.md +1 -1
  420. package/src/components/keyboard-shortcuts/index.js +1 -1
  421. package/src/components/letter-spacing-control/index.js +1 -1
  422. package/src/components/line-height-control/index.js +4 -4
  423. package/src/components/line-height-control/index.native.js +2 -0
  424. package/src/components/link-control/index.js +2 -2
  425. package/src/components/link-control/search-input.js +1 -1
  426. package/src/components/link-control/search-results.js +2 -2
  427. package/src/components/link-control/test/index.js +142 -144
  428. package/src/components/link-control/use-rich-url-data.js +1 -1
  429. package/src/components/link-control/use-search-handler.js +2 -2
  430. package/src/components/list-view/block-select-button.js +1 -1
  431. package/src/components/list-view/block.js +1 -1
  432. package/src/components/media-placeholder/index.native.js +11 -9
  433. package/src/components/media-replace-flow/README.md +7 -0
  434. package/src/components/media-replace-flow/index.js +20 -26
  435. package/src/components/media-replace-flow/test/index.js +100 -0
  436. package/src/components/media-upload/index.native.js +3 -2
  437. package/src/components/media-upload-progress/index.native.js +1 -1
  438. package/src/components/navigable-toolbar/index.js +3 -3
  439. package/src/components/plain-text/index.native.js +3 -3
  440. package/src/components/responsive-block-control/test/index.js +6 -6
  441. package/src/components/rich-text/format-toolbar-container.js +2 -2
  442. package/src/components/rich-text/format-toolbar-container.native.js +1 -1
  443. package/src/components/rich-text/index.native.js +3 -3
  444. package/src/components/rich-text/use-paste-handler.js +7 -13
  445. package/src/components/url-input/index.js +11 -11
  446. package/src/components/use-block-drop-zone/test/index.js +1 -1
  447. package/src/components/use-moving-animation/index.js +1 -1
  448. package/src/components/use-on-block-drop/index.js +2 -2
  449. package/src/components/writing-flow/use-tab-nav.js +6 -3
  450. package/src/hooks/align.js +1 -1
  451. package/src/hooks/anchor.js +1 -1
  452. package/src/hooks/border.js +8 -19
  453. package/src/hooks/color.js +2 -2
  454. package/src/hooks/generated-class-name.js +3 -3
  455. package/src/hooks/lock.js +1 -1
  456. package/src/hooks/style.js +5 -2
  457. package/src/hooks/test/align.js +1 -1
  458. package/src/store/actions.js +4 -4
  459. package/src/store/defaults.js +1 -2
  460. package/src/store/reducer.js +11 -11
  461. package/src/store/selectors.js +6 -6
  462. package/src/store/test/actions.js +1 -1
  463. package/src/store/test/reducer.js +1 -1
  464. package/src/store/test/selectors.js +1 -1
  465. package/src/utils/parse-css-unit-to-px.js +3 -3
  466. package/src/utils/pasting.js +77 -0
  467. package/src/utils/test/parse-css-unit-to-px.js +5 -5
  468. package/src/utils/test/pasting.js +84 -0
  469. package/src/utils/transform-styles/ast/parse.js +5 -5
  470. package/src/utils/transform-styles/transforms/url-rewrite.js +2 -2
  471. package/build/utils/get-paste-event-data.js +0 -56
  472. package/build/utils/get-paste-event-data.js.map +0 -1
  473. package/build-module/utils/get-paste-event-data.js +0 -47
  474. package/build-module/utils/get-paste-event-data.js.map +0 -1
  475. package/src/utils/get-paste-event-data.js +0 -42
@@ -38,7 +38,7 @@ const mockFetchSearchSuggestions = jest.fn();
38
38
  let mockFetchRichUrlData;
39
39
 
40
40
  jest.mock( '@wordpress/data/src/components/use-select', () => {
41
- // This allows us to tweak the returned value on each test
41
+ // This allows us to tweak the returned value on each test.
42
42
  const mock = jest.fn();
43
43
  return mock;
44
44
  } );
@@ -68,19 +68,19 @@ function eventLoopTick() {
68
68
  let container = null;
69
69
 
70
70
  beforeEach( () => {
71
- // setup a DOM element as a render target
71
+ // Setup a DOM element as a render target.
72
72
  container = document.createElement( 'div' );
73
73
  document.body.appendChild( container );
74
74
  mockFetchSearchSuggestions.mockImplementation( fetchFauxEntitySuggestions );
75
75
  } );
76
76
 
77
77
  afterEach( () => {
78
- // cleanup on exiting
78
+ // Cleanup on exiting.
79
79
  unmountComponentAtNode( container );
80
80
  container.remove();
81
81
  container = null;
82
82
  mockFetchSearchSuggestions.mockReset();
83
- mockFetchRichUrlData?.mockReset(); // conditionally reset as it may NOT be a mock
83
+ mockFetchRichUrlData?.mockReset(); // Conditionally reset as it may NOT be a mock.
84
84
  } );
85
85
 
86
86
  function getURLInput() {
@@ -93,7 +93,7 @@ function getSearchResults() {
93
93
  // the search results with `role="listbox"`.
94
94
  const relatedSelector = input.getAttribute( 'aria-owns' );
95
95
 
96
- // Select by relationship as well as role
96
+ // Select by relationship as well as role.
97
97
  return container.querySelectorAll(
98
98
  `#${ relatedSelector }[role="listbox"] [role="option"]`
99
99
  );
@@ -111,7 +111,7 @@ describe( 'Basic rendering', () => {
111
111
  render( <LinkControl />, container );
112
112
  } );
113
113
 
114
- // Search Input UI
114
+ // Search Input UI.
115
115
  const searchInput = getURLInput();
116
116
 
117
117
  expect( searchInput ).not.toBeNull();
@@ -143,19 +143,19 @@ describe( 'Basic rendering', () => {
143
143
  render( <LinkControl />, container );
144
144
  } );
145
145
 
146
- // Search Input UI
146
+ // Search Input UI.
147
147
  const searchInput = getURLInput();
148
148
 
149
- // Simulate searching for a term
149
+ // Simulate searching for a term.
150
150
  act( () => {
151
151
  Simulate.change( searchInput, { target: { value: searchTerm } } );
152
152
  } );
153
153
 
154
- // fetchFauxEntitySuggestions resolves on next "tick" of event loop
154
+ // fetchFauxEntitySuggestions resolves on next "tick" of event loop.
155
155
  await eventLoopTick();
156
156
 
157
157
  // Find all elements with link
158
- // Filter out the element with the text 'ENTER' because it doesn't contain link
158
+ // Filter out the element with the text 'ENTER' because it doesn't contain link.
159
159
  const linkElements = Array.from(
160
160
  container.querySelectorAll(
161
161
  '.block-editor-link-control__search-item-info'
@@ -325,15 +325,15 @@ describe( 'Searching for a link', () => {
325
325
  render( <LinkControl />, container );
326
326
  } );
327
327
 
328
- // Search Input UI
328
+ // Search Input UI.
329
329
  const searchInput = getURLInput();
330
330
 
331
- // Simulate searching for a term
331
+ // Simulate searching for a term.
332
332
  act( () => {
333
333
  Simulate.change( searchInput, { target: { value: searchTerm } } );
334
334
  } );
335
335
 
336
- // fetchFauxEntitySuggestions resolves on next "tick" of event loop
336
+ // fetchFauxEntitySuggestions resolves on next "tick" of event loop.
337
337
  await eventLoopTick();
338
338
 
339
339
  const searchResultElements = getSearchResults();
@@ -363,15 +363,15 @@ describe( 'Searching for a link', () => {
363
363
  render( <LinkControl />, container );
364
364
  } );
365
365
 
366
- // Search Input UI
366
+ // Search Input UI.
367
367
  const searchInput = getURLInput();
368
368
 
369
- // Simulate searching for a term
369
+ // Simulate searching for a term.
370
370
  act( () => {
371
371
  Simulate.change( searchInput, { target: { value: searchTerm } } );
372
372
  } );
373
373
 
374
- // fetchFauxEntitySuggestions resolves on next "tick" of event loop
374
+ // fetchFauxEntitySuggestions resolves on next "tick" of event loop.
375
375
  await eventLoopTick();
376
376
  // TODO: select these by aria relationship to autocomplete rather than arbitrary selector.
377
377
 
@@ -387,7 +387,7 @@ describe( 'Searching for a link', () => {
387
387
 
388
388
  expect( searchInput.getAttribute( 'aria-expanded' ) ).toBe( 'true' );
389
389
 
390
- // Sanity check that a search suggestion shows up corresponding to the data
390
+ // Sanity check that a search suggestion shows up corresponding to the data.
391
391
  expect( firstSearchResultItemHTML ).toEqual(
392
392
  expect.stringContaining( firstFauxSuggestion.title )
393
393
  );
@@ -395,7 +395,7 @@ describe( 'Searching for a link', () => {
395
395
  expect.stringContaining( firstFauxSuggestion.type )
396
396
  );
397
397
 
398
- // The fallback URL suggestion should not be shown when input is not URL-like
398
+ // The fallback URL suggestion should not be shown when input is not URL-like.
399
399
  expect( lastSearchResultItemHTML ).not.toEqual(
400
400
  expect.stringContaining( 'URL' )
401
401
  );
@@ -408,17 +408,17 @@ describe( 'Searching for a link', () => {
408
408
  render( <LinkControl />, container );
409
409
  } );
410
410
 
411
- // Search Input UI
411
+ // Search Input UI.
412
412
  const searchInput = container.querySelector(
413
413
  'input[aria-label="URL"]'
414
414
  );
415
415
 
416
- // Simulate searching for a term
416
+ // Simulate searching for a term.
417
417
  act( () => {
418
418
  Simulate.change( searchInput, { target: { value: searchTerm } } );
419
419
  } );
420
420
 
421
- // fetchFauxEntitySuggestions resolves on next "tick" of event loop
421
+ // fetchFauxEntitySuggestions resolves on next "tick" of event loop.
422
422
  await eventLoopTick();
423
423
 
424
424
  const searchResultTextHighlightElements = Array.from(
@@ -455,10 +455,10 @@ describe( 'Searching for a link', () => {
455
455
  render( <LinkControl showSuggestions={ false } />, container );
456
456
  } );
457
457
 
458
- // Search Input UI
458
+ // Search Input UI.
459
459
  const searchInput = getURLInput();
460
460
 
461
- // Simulate searching for a term
461
+ // Simulate searching for a term.
462
462
  act( () => {
463
463
  Simulate.change( searchInput, {
464
464
  target: { value: 'anything' },
@@ -467,7 +467,7 @@ describe( 'Searching for a link', () => {
467
467
 
468
468
  const searchResultElements = getSearchResults();
469
469
 
470
- // fetchFauxEntitySuggestions resolves on next "tick" of event loop
470
+ // fetchFauxEntitySuggestions resolves on next "tick" of event loop.
471
471
  await eventLoopTick();
472
472
 
473
473
  // TODO: select these by aria relationship to autocomplete rather than arbitrary selector.
@@ -485,17 +485,17 @@ describe( 'Searching for a link', () => {
485
485
  render( <LinkControl />, container );
486
486
  } );
487
487
 
488
- // Search Input UI
488
+ // Search Input UI.
489
489
  const searchInput = getURLInput();
490
490
 
491
- // Simulate searching for a term
491
+ // Simulate searching for a term.
492
492
  act( () => {
493
493
  Simulate.change( searchInput, {
494
494
  target: { value: searchTerm },
495
495
  } );
496
496
  } );
497
497
 
498
- // fetchFauxEntitySuggestions resolves on next "tick" of event loop
498
+ // fetchFauxEntitySuggestions resolves on next "tick" of event loop.
499
499
  await eventLoopTick();
500
500
  // TODO: select these by aria relationship to autocomplete rather than arbitrary selector.
501
501
 
@@ -506,13 +506,13 @@ describe( 'Searching for a link', () => {
506
506
  const additionalDefaultFallbackURLSuggestionLength = 1;
507
507
 
508
508
  // We should see a search result for each of the expect search suggestions
509
- // plus 1 additional one for the fallback URL suggestion
509
+ // plus 1 additional one for the fallback URL suggestion.
510
510
  expect( searchResultElements ).toHaveLength(
511
511
  fauxEntitySuggestions.length +
512
512
  additionalDefaultFallbackURLSuggestionLength
513
513
  );
514
514
 
515
- // The last item should be a URL search suggestion
515
+ // The last item should be a URL search suggestion.
516
516
  expect( lastSearchResultItemHTML ).toEqual(
517
517
  expect.stringContaining( searchTerm )
518
518
  );
@@ -530,23 +530,23 @@ describe( 'Searching for a link', () => {
530
530
  render( <LinkControl noURLSuggestion />, container );
531
531
  } );
532
532
 
533
- // Search Input UI
533
+ // Search Input UI.
534
534
  const searchInput = getURLInput();
535
535
 
536
- // Simulate searching for a term
536
+ // Simulate searching for a term.
537
537
  act( () => {
538
538
  Simulate.change( searchInput, {
539
539
  target: { value: 'couldbeurlorentitysearchterm' },
540
540
  } );
541
541
  } );
542
542
 
543
- // fetchFauxEntitySuggestions resolves on next "tick" of event loop
543
+ // fetchFauxEntitySuggestions resolves on next "tick" of event loop.
544
544
  await eventLoopTick();
545
545
  // TODO: select these by aria relationship to autocomplete rather than arbitrary selector.
546
546
 
547
547
  const searchResultElements = getSearchResults();
548
548
 
549
- // We should see a search result for each of the expect search suggestions and nothing else
549
+ // We should see a search result for each of the expect search suggestions and nothing else.
550
550
  expect( searchResultElements ).toHaveLength(
551
551
  fauxEntitySuggestions.length
552
552
  );
@@ -555,9 +555,9 @@ describe( 'Searching for a link', () => {
555
555
 
556
556
  describe( 'Manual link entry', () => {
557
557
  it.each( [
558
- [ 'https://make.wordpress.org' ], // explicit https
559
- [ 'http://make.wordpress.org' ], // explicit http
560
- [ 'www.wordpress.org' ], // usage of "www"
558
+ [ 'https://make.wordpress.org' ], // Explicit https.
559
+ [ 'http://make.wordpress.org' ], // Explicit http.
560
+ [ 'www.wordpress.org' ], // Usage of "www".
561
561
  ] )(
562
562
  'should display a single suggestion result when the current input value is URL-like (eg: %s)',
563
563
  async ( searchTerm ) => {
@@ -565,17 +565,17 @@ describe( 'Manual link entry', () => {
565
565
  render( <LinkControl />, container );
566
566
  } );
567
567
 
568
- // Search Input UI
568
+ // Search Input UI.
569
569
  const searchInput = getURLInput();
570
570
 
571
- // Simulate searching for a term
571
+ // Simulate searching for a term.
572
572
  act( () => {
573
573
  Simulate.change( searchInput, {
574
574
  target: { value: searchTerm },
575
575
  } );
576
576
  } );
577
577
 
578
- // fetchFauxEntitySuggestions resolves on next "tick" of event loop
578
+ // fetchFauxEntitySuggestions resolves on next "tick" of event loop.
579
579
  await eventLoopTick();
580
580
 
581
581
  const searchResultElements = getSearchResults();
@@ -613,7 +613,7 @@ describe( 'Manual link entry', () => {
613
613
  render( <LinkControl />, container );
614
614
  } );
615
615
 
616
- // Search Input UI
616
+ // Search Input UI.
617
617
  const searchInput = getURLInput();
618
618
 
619
619
  let submitButton = queryByRole( container, 'button', {
@@ -624,14 +624,14 @@ describe( 'Manual link entry', () => {
624
624
  expect( submitButton ).not.toBeNull();
625
625
  expect( submitButton ).toBeInTheDocument();
626
626
 
627
- // Simulate searching for a term
627
+ // Simulate searching for a term.
628
628
  act( () => {
629
629
  Simulate.change( searchInput, {
630
630
  target: { value: searchString },
631
631
  } );
632
632
  } );
633
633
 
634
- // fetchFauxEntitySuggestions resolves on next "tick" of event loop
634
+ // fetchFauxEntitySuggestions resolves on next "tick" of event loop.
635
635
  await eventLoopTick();
636
636
 
637
637
  // Attempt to submit the empty search value in the input.
@@ -658,7 +658,7 @@ describe( 'Manual link entry', () => {
658
658
  render( <LinkControl />, container );
659
659
  } );
660
660
 
661
- // Search Input UI
661
+ // Search Input UI.
662
662
  const searchInput = getURLInput();
663
663
 
664
664
  let submitButton = queryByRole( container, 'button', {
@@ -669,14 +669,14 @@ describe( 'Manual link entry', () => {
669
669
  expect( submitButton ).not.toBeNull();
670
670
  expect( submitButton ).toBeInTheDocument();
671
671
 
672
- // Simulate searching for a term
672
+ // Simulate searching for a term.
673
673
  act( () => {
674
674
  Simulate.change( searchInput, {
675
675
  target: { value: searchString },
676
676
  } );
677
677
  } );
678
678
 
679
- // fetchFauxEntitySuggestions resolves on next "tick" of event loop
679
+ // fetchFauxEntitySuggestions resolves on next "tick" of event loop.
680
680
  await eventLoopTick();
681
681
 
682
682
  // Attempt to submit the empty search value in the input.
@@ -709,17 +709,17 @@ describe( 'Manual link entry', () => {
709
709
  render( <LinkControl />, container );
710
710
  } );
711
711
 
712
- // Search Input UI
712
+ // Search Input UI.
713
713
  const searchInput = getURLInput();
714
714
 
715
- // Simulate searching for a term
715
+ // Simulate searching for a term.
716
716
  act( () => {
717
717
  Simulate.change( searchInput, {
718
718
  target: { value: searchTerm },
719
719
  } );
720
720
  } );
721
721
 
722
- // fetchFauxEntitySuggestions resolves on next "tick" of event loop
722
+ // fetchFauxEntitySuggestions resolves on next "tick" of event loop.
723
723
  await eventLoopTick();
724
724
 
725
725
  const searchResultElements = getSearchResults();
@@ -747,7 +747,7 @@ describe( 'Manual link entry', () => {
747
747
 
748
748
  describe( 'Default search suggestions', () => {
749
749
  it( 'should display a list of initial search suggestions when there is no search value or suggestions', async () => {
750
- const expectedResultsLength = 3; // set within `LinkControl`
750
+ const expectedResultsLength = 3; // Set within `LinkControl`.
751
751
 
752
752
  act( () => {
753
753
  render( <LinkControl showInitialSuggestions />, container );
@@ -755,7 +755,7 @@ describe( 'Default search suggestions', () => {
755
755
 
756
756
  await eventLoopTick();
757
757
 
758
- // Search Input UI
758
+ // Search Input UI.
759
759
  const searchInput = getURLInput();
760
760
 
761
761
  const searchResultsWrapper = container.querySelector(
@@ -770,7 +770,7 @@ describe( 'Default search suggestions', () => {
770
770
  );
771
771
 
772
772
  // Verify input has no value has default suggestions should only show
773
- // when this does not have a value
773
+ // when this does not have a value.
774
774
  expect( searchInput.value ).toBe( '' );
775
775
 
776
776
  // Ensure only called once as a guard against potential infinite
@@ -778,7 +778,7 @@ describe( 'Default search suggestions', () => {
778
778
  // which has calls to `setState` within it.
779
779
  expect( mockFetchSearchSuggestions ).toHaveBeenCalledTimes( 1 );
780
780
 
781
- // Verify the search results already display the initial suggestions
781
+ // Verify the search results already display the initial suggestions.
782
782
  expect( initialSearchResultElements ).toHaveLength(
783
783
  expectedResultsLength
784
784
  );
@@ -789,7 +789,6 @@ describe( 'Default search suggestions', () => {
789
789
  it( 'should not display initial suggestions when input value is present', async () => {
790
790
  // Render with an initial value an ensure that no initial suggestions
791
791
  // are shown.
792
- //
793
792
  act( () => {
794
793
  render(
795
794
  <LinkControl
@@ -804,10 +803,8 @@ describe( 'Default search suggestions', () => {
804
803
 
805
804
  expect( mockFetchSearchSuggestions ).not.toHaveBeenCalled();
806
805
 
807
- //
808
806
  // Click the "Edit/Change" button and check initial suggestions are not
809
807
  // shown.
810
- //
811
808
  const currentLinkUI = getCurrentLink();
812
809
  const currentLinkBtn = currentLinkUI.querySelector( 'button' );
813
810
 
@@ -822,10 +819,10 @@ describe( 'Default search suggestions', () => {
822
819
 
823
820
  const searchResultElements = getSearchResults();
824
821
 
825
- // search input is set to the URL value
822
+ // Search input is set to the URL value.
826
823
  expect( searchInput.value ).toEqual( fauxEntitySuggestions[ 0 ].url );
827
824
 
828
- // it should match any url that's like ?p= and also include a URL option
825
+ // It should match any url that's like ?p= and also include a URL option.
829
826
  expect( searchResultElements ).toHaveLength( 5 );
830
827
 
831
828
  expect( searchInput.getAttribute( 'aria-expanded' ) ).toBe( 'true' );
@@ -843,22 +840,22 @@ describe( 'Default search suggestions', () => {
843
840
  let searchResultElements;
844
841
  let searchInput;
845
842
 
846
- // Search Input UI
843
+ // Search Input UI.
847
844
  searchInput = getURLInput();
848
845
 
849
- // Simulate searching for a term
846
+ // Simulate searching for a term.
850
847
  act( () => {
851
848
  Simulate.change( searchInput, { target: { value: searchTerm } } );
852
849
  } );
853
850
 
854
- // fetchFauxEntitySuggestions resolves on next "tick" of event loop
851
+ // fetchFauxEntitySuggestions resolves on next "tick" of event loop.
855
852
  await eventLoopTick();
856
853
 
857
854
  expect( searchInput.value ).toBe( searchTerm );
858
855
 
859
856
  searchResultElements = getSearchResults();
860
857
 
861
- // delete the text
858
+ // Delete the text.
862
859
  act( () => {
863
860
  Simulate.change( searchInput, { target: { value: '' } } );
864
861
  } );
@@ -869,7 +866,7 @@ describe( 'Default search suggestions', () => {
869
866
 
870
867
  searchInput = getURLInput();
871
868
 
872
- // check the input is empty now
869
+ // Check the input is empty now.
873
870
  expect( searchInput.value ).toBe( '' );
874
871
 
875
872
  const searchResultLabel = container.querySelector(
@@ -960,12 +957,12 @@ describe( 'Creating Entities (eg: Posts, Pages)', () => {
960
957
  render( <LinkControlConsumer />, container );
961
958
  } );
962
959
 
963
- // Search Input UI
960
+ // Search Input UI.
964
961
  const searchInput = container.querySelector(
965
962
  'input[aria-label="URL"]'
966
963
  );
967
964
 
968
- // Simulate searching for a term
965
+ // Simulate searching for a term.
969
966
  act( () => {
970
967
  Simulate.change( searchInput, {
971
968
  target: { value: entityNameText },
@@ -991,14 +988,14 @@ describe( 'Creating Entities (eg: Posts, Pages)', () => {
991
988
  );
992
989
 
993
990
  // No need to wait in this test because we control the Promise
994
- // resolution manually via the `resolver` reference
991
+ // resolution manually via the `resolver` reference.
995
992
  act( () => {
996
993
  Simulate.click( createButton );
997
994
  } );
998
995
 
999
996
  await eventLoopTick();
1000
997
 
1001
- // Check for loading indicator
998
+ // Check for loading indicator.
1002
999
  const loadingIndicator = container.querySelector(
1003
1000
  '.block-editor-link-control__loading'
1004
1001
  );
@@ -1011,7 +1008,7 @@ describe( 'Creating Entities (eg: Posts, Pages)', () => {
1011
1008
  expect.stringContaining( 'Creating' )
1012
1009
  );
1013
1010
 
1014
- // Resolve the `createSuggestion` promise
1011
+ // Resolve the `createSuggestion` promise.
1015
1012
  await act( async () => {
1016
1013
  resolver( resolvedEntity );
1017
1014
  } );
@@ -1057,12 +1054,12 @@ describe( 'Creating Entities (eg: Posts, Pages)', () => {
1057
1054
  render( <LinkControlConsumer />, container );
1058
1055
  } );
1059
1056
 
1060
- // Search Input UI
1057
+ // Search Input UI.
1061
1058
  const searchInput = container.querySelector(
1062
1059
  'input[aria-label="URL"]'
1063
1060
  );
1064
1061
 
1065
- // Simulate searching for a term
1062
+ // Simulate searching for a term.
1066
1063
  act( () => {
1067
1064
  Simulate.change( searchInput, {
1068
1065
  target: { value: 'Some new page to create' },
@@ -1130,12 +1127,12 @@ describe( 'Creating Entities (eg: Posts, Pages)', () => {
1130
1127
  render( <LinkControlConsumer />, container );
1131
1128
  } );
1132
1129
 
1133
- // Search Input UI
1130
+ // Search Input UI.
1134
1131
  const searchInput = container.querySelector(
1135
1132
  'input[aria-label="URL"]'
1136
1133
  );
1137
1134
 
1138
- // Simulate searching for a term
1135
+ // Simulate searching for a term.
1139
1136
  act( () => {
1140
1137
  Simulate.change( searchInput, {
1141
1138
  target: { value: entityNameText },
@@ -1154,7 +1151,7 @@ describe( 'Creating Entities (eg: Posts, Pages)', () => {
1154
1151
  )
1155
1152
  );
1156
1153
 
1157
- // Step down into the search results, highlighting the first result item
1154
+ // Step down into the search results, highlighting the first result item.
1158
1155
  act( () => {
1159
1156
  Simulate.keyDown( searchInput, { keyCode: DOWN } );
1160
1157
  } );
@@ -1196,12 +1193,12 @@ describe( 'Creating Entities (eg: Posts, Pages)', () => {
1196
1193
  render( <LinkControlConsumer />, container );
1197
1194
  } );
1198
1195
 
1199
- // Search Input UI
1196
+ // Search Input UI.
1200
1197
  const searchInput = container.querySelector(
1201
1198
  'input[aria-label="URL"]'
1202
1199
  );
1203
1200
 
1204
- // Simulate searching for a term
1201
+ // Simulate searching for a term.
1205
1202
  act( () => {
1206
1203
  Simulate.change( searchInput, {
1207
1204
  target: { value: entityNameText },
@@ -1234,10 +1231,10 @@ describe( 'Creating Entities (eg: Posts, Pages)', () => {
1234
1231
  container
1235
1232
  );
1236
1233
  } );
1237
- // Await the initial suggestions to be fetched
1234
+ // Await the initial suggestions to be fetched.
1238
1235
  await eventLoopTick();
1239
1236
 
1240
- // Search Input UI
1237
+ // Search Input UI.
1241
1238
  const searchInput = container.querySelector(
1242
1239
  'input[aria-label="URL"]'
1243
1240
  );
@@ -1252,9 +1249,9 @@ describe( 'Creating Entities (eg: Posts, Pages)', () => {
1252
1249
  )
1253
1250
  );
1254
1251
 
1255
- // Verify input has no value
1252
+ // Verify input has no value.
1256
1253
  expect( searchInput.value ).toBe( '' );
1257
- expect( createButton ).toBeFalsy(); // shouldn't exist!
1254
+ expect( createButton ).toBeFalsy(); // Shouldn't exist!
1258
1255
  }
1259
1256
  );
1260
1257
 
@@ -1262,16 +1259,16 @@ describe( 'Creating Entities (eg: Posts, Pages)', () => {
1262
1259
  act( () => {
1263
1260
  render(
1264
1261
  <LinkControl
1265
- showInitialSuggestions={ true } // should show even if we're not showing initial suggestions
1262
+ showInitialSuggestions={ true } // Should show even if we're not showing initial suggestions.
1266
1263
  createSuggestion={ jest.fn() }
1267
1264
  />,
1268
1265
  container
1269
1266
  );
1270
1267
  } );
1271
- // Await the initial suggestions to be fetched
1268
+ // Await the initial suggestions to be fetched.
1272
1269
  await eventLoopTick();
1273
1270
 
1274
- // Search Input UI
1271
+ // Search Input UI.
1275
1272
  const searchInput = container.querySelector(
1276
1273
  'input[aria-label="URL"]'
1277
1274
  );
@@ -1286,9 +1283,9 @@ describe( 'Creating Entities (eg: Posts, Pages)', () => {
1286
1283
  )
1287
1284
  );
1288
1285
 
1289
- // Verify input has no value
1286
+ // Verify input has no value.
1290
1287
  expect( searchInput.value ).toBe( '' );
1291
- expect( createButton ).toBeFalsy(); // shouldn't exist!
1288
+ expect( createButton ).toBeFalsy(); // Shouldn't exist!
1292
1289
  } );
1293
1290
 
1294
1291
  it.each( [
@@ -1307,12 +1304,12 @@ describe( 'Creating Entities (eg: Posts, Pages)', () => {
1307
1304
  );
1308
1305
  } );
1309
1306
 
1310
- // Search Input UI
1307
+ // Search Input UI.
1311
1308
  const searchInput = container.querySelector(
1312
1309
  'input[aria-label="URL"]'
1313
1310
  );
1314
1311
 
1315
- // Simulate searching for a term
1312
+ // Simulate searching for a term.
1316
1313
  act( () => {
1317
1314
  Simulate.change( searchInput, {
1318
1315
  target: { value: inputText },
@@ -1332,7 +1329,7 @@ describe( 'Creating Entities (eg: Posts, Pages)', () => {
1332
1329
  )
1333
1330
  );
1334
1331
 
1335
- expect( createButton ).toBeFalsy(); // shouldn't exist!
1332
+ expect( createButton ).toBeFalsy(); // Shouldn't exist!
1336
1333
  }
1337
1334
  );
1338
1335
  } );
@@ -1343,7 +1340,7 @@ describe( 'Creating Entities (eg: Posts, Pages)', () => {
1343
1340
  let searchInput;
1344
1341
 
1345
1342
  const throwsError = () => {
1346
- throw new Error( 'API response returned invalid entity.' ); // this can be any error and msg
1343
+ throw new Error( 'API response returned invalid entity.' ); // This can be any error and msg.
1347
1344
  };
1348
1345
 
1349
1346
  const createSuggestion = () => Promise.reject( throwsError() );
@@ -1355,10 +1352,10 @@ describe( 'Creating Entities (eg: Posts, Pages)', () => {
1355
1352
  );
1356
1353
  } );
1357
1354
 
1358
- // Search Input UI
1355
+ // Search Input UI.
1359
1356
  searchInput = container.querySelector( 'input[aria-label="URL"]' );
1360
1357
 
1361
- // Simulate searching for a term
1358
+ // Simulate searching for a term.
1362
1359
  act( () => {
1363
1360
  Simulate.change( searchInput, {
1364
1361
  target: { value: searchText },
@@ -1393,10 +1390,10 @@ describe( 'Creating Entities (eg: Posts, Pages)', () => {
1393
1390
  '.block-editor-link-control__search-error'
1394
1391
  );
1395
1392
 
1396
- // Catch the error in the test to avoid test failures
1393
+ // Catch the error in the test to avoid test failures.
1397
1394
  expect( throwsError ).toThrow( Error );
1398
1395
 
1399
- // Check human readable error notice is perceivable
1396
+ // Check human readable error notice is perceivable.
1400
1397
  expect( errorNotice ).not.toBeFalsy();
1401
1398
  expect( errorNotice.innerHTML ).toEqual(
1402
1399
  expect.stringContaining(
@@ -1404,7 +1401,7 @@ describe( 'Creating Entities (eg: Posts, Pages)', () => {
1404
1401
  )
1405
1402
  );
1406
1403
 
1407
- // Verify input is repopulated with original search text
1404
+ // Verify input is repopulated with original search text.
1408
1405
  expect( searchInput ).not.toBeFalsy();
1409
1406
  expect( searchInput.value ).toBe( searchText );
1410
1407
 
@@ -1435,7 +1432,7 @@ describe( 'Selecting links', () => {
1435
1432
  render( <LinkControlConsumer />, container );
1436
1433
  } );
1437
1434
 
1438
- // TODO: select by aria role or visible text
1435
+ // TODO: select by aria role or visible text.
1439
1436
  const currentLink = getCurrentLink();
1440
1437
  const currentLinkHTML = currentLink.innerHTML;
1441
1438
  const currentLinkAnchor = currentLink.querySelector(
@@ -1469,11 +1466,11 @@ describe( 'Selecting links', () => {
1469
1466
  render( <LinkControlConsumer />, container );
1470
1467
  } );
1471
1468
 
1472
- // Required in order to select the button below
1469
+ // Required in order to select the button below.
1473
1470
  let currentLinkUI = getCurrentLink();
1474
1471
  const currentLinkBtn = currentLinkUI.querySelector( 'button' );
1475
1472
 
1476
- // Simulate searching for a term
1473
+ // Simulate searching for a term.
1477
1474
  act( () => {
1478
1475
  Simulate.click( currentLinkBtn );
1479
1476
  } );
@@ -1481,15 +1478,15 @@ describe( 'Selecting links', () => {
1481
1478
  const searchInput = getURLInput();
1482
1479
  currentLinkUI = getCurrentLink();
1483
1480
 
1484
- // We should be back to showing the search input
1481
+ // We should be back to showing the search input.
1485
1482
  expect( searchInput ).not.toBeNull();
1486
- expect( searchInput.value ).toBe( selectedLink.url ); // prepopulated with previous link's URL
1483
+ expect( searchInput.value ).toBe( selectedLink.url ); // Prepopulated with previous link's URL.
1487
1484
  expect( currentLinkUI ).toBeNull();
1488
1485
  } );
1489
1486
 
1490
1487
  describe( 'Selection using mouse click', () => {
1491
1488
  it.each( [
1492
- [ 'entity', 'hello world', first( fauxEntitySuggestions ) ], // entity search
1489
+ [ 'entity', 'hello world', first( fauxEntitySuggestions ) ], // Entity search.
1493
1490
  [
1494
1491
  'url',
1495
1492
  'https://www.wordpress.org',
@@ -1499,7 +1496,7 @@ describe( 'Selecting links', () => {
1499
1496
  url: 'https://www.wordpress.org',
1500
1497
  type: 'URL',
1501
1498
  },
1502
- ], // url
1499
+ ], // Url.
1503
1500
  ] )(
1504
1501
  'should display a current selected link UI when a %s suggestion for the search "%s" is clicked',
1505
1502
  async ( type, searchTerm, selectedLink ) => {
@@ -1518,24 +1515,24 @@ describe( 'Selecting links', () => {
1518
1515
  render( <LinkControlConsumer />, container );
1519
1516
  } );
1520
1517
 
1521
- // Search Input UI
1518
+ // Search Input UI.
1522
1519
  const searchInput = getURLInput();
1523
1520
 
1524
- // Simulate searching for a term
1521
+ // Simulate searching for a term.
1525
1522
  act( () => {
1526
1523
  Simulate.change( searchInput, {
1527
1524
  target: { value: searchTerm },
1528
1525
  } );
1529
1526
  } );
1530
1527
 
1531
- // fetchFauxEntitySuggestions resolves on next "tick" of event loop
1528
+ // fetchFauxEntitySuggestions resolves on next "tick" of event loop.
1532
1529
  await eventLoopTick();
1533
1530
 
1534
1531
  const searchResultElements = getSearchResults();
1535
1532
 
1536
1533
  const firstSearchSuggestion = first( searchResultElements );
1537
1534
 
1538
- // Simulate selecting the first of the search suggestions
1535
+ // Simulate selecting the first of the search suggestions.
1539
1536
  act( () => {
1540
1537
  Simulate.click( firstSearchSuggestion );
1541
1538
  } );
@@ -1548,7 +1545,7 @@ describe( 'Selecting links', () => {
1548
1545
  `[href="${ selectedLink.url }"]`
1549
1546
  );
1550
1547
 
1551
- // Check that this suggestion is now shown as selected
1548
+ // Check that this suggestion is now shown as selected.
1552
1549
  expect( currentLinkHTML ).toEqual(
1553
1550
  expect.stringContaining( selectedLink.title )
1554
1551
  );
@@ -1562,7 +1559,7 @@ describe( 'Selecting links', () => {
1562
1559
 
1563
1560
  describe( 'Selection using keyboard', () => {
1564
1561
  it.each( [
1565
- [ 'entity', 'hello world', first( fauxEntitySuggestions ) ], // entity search
1562
+ [ 'entity', 'hello world', first( fauxEntitySuggestions ) ], // Entity search.
1566
1563
  [
1567
1564
  'url',
1568
1565
  'https://www.wordpress.org',
@@ -1572,7 +1569,7 @@ describe( 'Selecting links', () => {
1572
1569
  url: 'https://www.wordpress.org',
1573
1570
  type: 'URL',
1574
1571
  },
1575
- ], // url
1572
+ ], // Url.
1576
1573
  ] )(
1577
1574
  'should display a current selected link UI when an %s suggestion for the search "%s" is selected using the keyboard',
1578
1575
  async ( type, searchTerm, selectedLink ) => {
@@ -1591,21 +1588,21 @@ describe( 'Selecting links', () => {
1591
1588
  render( <LinkControlConsumer />, container );
1592
1589
  } );
1593
1590
 
1594
- // Search Input UI
1591
+ // Search Input UI.
1595
1592
  const searchInput = getURLInput();
1596
1593
  searchInput.focus();
1597
1594
 
1598
- // Simulate searching for a term
1595
+ // Simulate searching for a term.
1599
1596
  act( () => {
1600
1597
  Simulate.change( searchInput, {
1601
1598
  target: { value: searchTerm },
1602
1599
  } );
1603
1600
  } );
1604
1601
 
1605
- //fetchFauxEntitySuggestions resolves on next "tick" of event loop
1602
+ // fetchFauxEntitySuggestions resolves on next "tick" of event loop.
1606
1603
  await eventLoopTick();
1607
1604
 
1608
- // Step down into the search results, highlighting the first result item
1605
+ // Step down into the search results, highlighting the first result item.
1609
1606
  act( () => {
1610
1607
  Simulate.keyDown( searchInput, { keyCode: DOWN } );
1611
1608
  } );
@@ -1619,14 +1616,14 @@ describe( 'Selecting links', () => {
1619
1616
  '[role="option"][aria-selected="true"]'
1620
1617
  );
1621
1618
 
1622
- // We should have highlighted the first item using the keyboard
1619
+ // We should have highlighted the first item using the keyboard.
1623
1620
  expect( selectedSearchResultElement ).toEqual(
1624
1621
  firstSearchSuggestion
1625
1622
  );
1626
1623
 
1627
- // Only entity searches contain more than 1 suggestion
1624
+ // Only entity searches contain more than 1 suggestion.
1628
1625
  if ( type === 'entity' ) {
1629
- // Check we can go down again using the down arrow
1626
+ // Check we can go down again using the down arrow.
1630
1627
  act( () => {
1631
1628
  Simulate.keyDown( searchInput, { keyCode: DOWN } );
1632
1629
  } );
@@ -1641,7 +1638,7 @@ describe( 'Selecting links', () => {
1641
1638
  secondSearchSuggestion
1642
1639
  );
1643
1640
 
1644
- // Check we can go back up via up arrow
1641
+ // Check we can go back up via up arrow.
1645
1642
  act( () => {
1646
1643
  Simulate.keyDown( searchInput, { keyCode: UP } );
1647
1644
  } );
@@ -1657,12 +1654,12 @@ describe( 'Selecting links', () => {
1657
1654
  );
1658
1655
  }
1659
1656
 
1660
- // Submit the selected item as the current link
1657
+ // Submit the selected item as the current link.
1661
1658
  act( () => {
1662
1659
  Simulate.keyDown( searchInput, { keyCode: ENTER } );
1663
1660
  } );
1664
1661
 
1665
- // Check that the suggestion selected via is now shown as selected
1662
+ // Check that the suggestion selected via is now shown as selected.
1666
1663
  const currentLink = container.querySelector(
1667
1664
  '.block-editor-link-control__search-item.is-current'
1668
1665
  );
@@ -1705,10 +1702,10 @@ describe( 'Selecting links', () => {
1705
1702
  'Recently updated'
1706
1703
  );
1707
1704
 
1708
- // Search Input UI
1705
+ // Search Input UI.
1709
1706
  const searchInput = getURLInput();
1710
1707
 
1711
- // Step down into the search results, highlighting the first result item
1708
+ // Step down into the search results, highlighting the first result item.
1712
1709
  act( () => {
1713
1710
  Simulate.keyDown( searchInput, { keyCode: DOWN } );
1714
1711
  } );
@@ -1724,12 +1721,12 @@ describe( 'Selecting links', () => {
1724
1721
  '[role="option"][aria-selected="true"]'
1725
1722
  );
1726
1723
 
1727
- // We should have highlighted the first item using the keyboard
1724
+ // We should have highlighted the first item using the keyboard.
1728
1725
  expect( selectedSearchResultElement ).toEqual(
1729
1726
  firstSearchSuggestion
1730
1727
  );
1731
1728
 
1732
- // Check we can go down again using the down arrow
1729
+ // Check we can go down again using the down arrow.
1733
1730
  act( () => {
1734
1731
  Simulate.keyDown( searchInput, { keyCode: DOWN } );
1735
1732
  } );
@@ -1738,12 +1735,12 @@ describe( 'Selecting links', () => {
1738
1735
  '[role="option"][aria-selected="true"]'
1739
1736
  );
1740
1737
 
1741
- // We should have highlighted the first item using the keyboard
1738
+ // We should have highlighted the first item using the keyboard.
1742
1739
  expect( selectedSearchResultElement ).toEqual(
1743
1740
  secondSearchSuggestion
1744
1741
  );
1745
1742
 
1746
- // Check we can go back up via up arrow
1743
+ // Check we can go back up via up arrow.
1747
1744
  act( () => {
1748
1745
  Simulate.keyDown( searchInput, { keyCode: UP } );
1749
1746
  } );
@@ -1752,7 +1749,7 @@ describe( 'Selecting links', () => {
1752
1749
  '[role="option"][aria-selected="true"]'
1753
1750
  );
1754
1751
 
1755
- // We should be back to highlighting the first search result again
1752
+ // We should be back to highlighting the first search result again.
1756
1753
  expect( selectedSearchResultElement ).toEqual(
1757
1754
  firstSearchSuggestion
1758
1755
  );
@@ -1784,7 +1781,8 @@ describe( 'Addition Settings UI', () => {
1784
1781
  label.innerHTML &&
1785
1782
  label.innerHTML.includes( expectedSettingText )
1786
1783
  );
1787
- expect( newTabSettingLabel ).not.toBeUndefined(); // find() returns "undefined" if not found
1784
+
1785
+ expect( newTabSettingLabel ).not.toBeUndefined(); // find() returns "undefined" if not found.
1788
1786
 
1789
1787
  const newTabSettingLabelForAttr = newTabSettingLabel.getAttribute(
1790
1788
  'for'
@@ -1829,7 +1827,7 @@ describe( 'Addition Settings UI', () => {
1829
1827
  render( <LinkControlConsumer />, container );
1830
1828
  } );
1831
1829
 
1832
- // Grab the elements using user perceivable DOM queries
1830
+ // Grab the elements using user perceivable DOM queries.
1833
1831
  const settingsLegend = Array.from(
1834
1832
  container.querySelectorAll( 'legend' )
1835
1833
  ).find(
@@ -1851,15 +1849,15 @@ describe( 'Addition Settings UI', () => {
1851
1849
  settingControlsLabels
1852
1850
  ).map( ( label ) => label.innerHTML );
1853
1851
 
1854
- // Check we have the correct number of controls
1852
+ // Check we have the correct number of controls.
1855
1853
  expect( settingControlsLabels ).toHaveLength( 2 );
1856
1854
 
1857
- // Check the labels match
1855
+ // Check the labels match.
1858
1856
  expect( settingControlLabelsText ).toEqual(
1859
1857
  expect.arrayContaining( customSettingsLabelsText )
1860
1858
  );
1861
1859
 
1862
- // Assert the default "checked" states match the expected
1860
+ // Assert the default "checked" states match the expected.
1863
1861
  expect( settingControlsInputs[ 0 ].checked ).toEqual( false );
1864
1862
  expect( settingControlsInputs[ 1 ].checked ).toEqual( true );
1865
1863
  } );
@@ -1873,15 +1871,15 @@ describe( 'Post types', () => {
1873
1871
  render( <LinkControl />, container );
1874
1872
  } );
1875
1873
 
1876
- // Search Input UI
1874
+ // Search Input UI.
1877
1875
  const searchInput = getURLInput();
1878
1876
 
1879
- // Simulate searching for a term
1877
+ // Simulate searching for a term.
1880
1878
  act( () => {
1881
1879
  Simulate.change( searchInput, { target: { value: searchTerm } } );
1882
1880
  } );
1883
1881
 
1884
- // fetchFauxEntitySuggestions resolves on next "tick" of event loop
1882
+ // fetchFauxEntitySuggestions resolves on next "tick" of event loop.
1885
1883
  await eventLoopTick();
1886
1884
 
1887
1885
  const searchResultElements = getSearchResults();
@@ -1905,17 +1903,17 @@ describe( 'Post types', () => {
1905
1903
  );
1906
1904
  } );
1907
1905
 
1908
- // Search Input UI
1906
+ // Search Input UI.
1909
1907
  const searchInput = getURLInput();
1910
1908
 
1911
- // Simulate searching for a term
1909
+ // Simulate searching for a term.
1912
1910
  act( () => {
1913
1911
  Simulate.change( searchInput, {
1914
1912
  target: { value: searchTerm },
1915
1913
  } );
1916
1914
  } );
1917
1915
 
1918
- // fetchFauxEntitySuggestions resolves on next "tick" of event loop
1916
+ // fetchFauxEntitySuggestions resolves on next "tick" of event loop.
1919
1917
  await eventLoopTick();
1920
1918
 
1921
1919
  const searchResultElements = getSearchResults();
@@ -1935,7 +1933,7 @@ describe( 'Post types', () => {
1935
1933
  describe( 'Rich link previews', () => {
1936
1934
  const selectedLink = {
1937
1935
  id: '1',
1938
- title: 'Wordpress.org', // customize this for differentiation in assertions
1936
+ title: 'Wordpress.org', // Customize this for differentiation in assertions.
1939
1937
  url: 'https://www.wordpress.org',
1940
1938
  type: 'URL',
1941
1939
  };
@@ -1966,7 +1964,7 @@ describe( 'Rich link previews', () => {
1966
1964
  render( <LinkControl value={ selectedLink } />, container );
1967
1965
  } );
1968
1966
 
1969
- // mockFetchRichUrlData resolves on next "tick" of event loop
1967
+ // mockFetchRichUrlData resolves on next "tick" of event loop.
1970
1968
  await act( async () => {
1971
1969
  await eventLoopTick();
1972
1970
  } );
@@ -2000,7 +1998,7 @@ describe( 'Rich link previews', () => {
2000
1998
  );
2001
1999
  } );
2002
2000
 
2003
- // mockFetchRichUrlData resolves on next "tick" of event loop
2001
+ // mockFetchRichUrlData resolves on next "tick" of event loop.
2004
2002
  await act( async () => {
2005
2003
  await eventLoopTick();
2006
2004
  } );
@@ -2031,7 +2029,7 @@ describe( 'Rich link previews', () => {
2031
2029
  );
2032
2030
  } );
2033
2031
 
2034
- // mockFetchRichUrlData resolves on next "tick" of event loop
2032
+ // mockFetchRichUrlData resolves on next "tick" of event loop.
2035
2033
  await act( async () => {
2036
2034
  await eventLoopTick();
2037
2035
  } );
@@ -2071,7 +2069,7 @@ describe( 'Rich link previews', () => {
2071
2069
  );
2072
2070
  } );
2073
2071
 
2074
- // mockFetchRichUrlData resolves on next "tick" of event loop
2072
+ // mockFetchRichUrlData resolves on next "tick" of event loop.
2075
2073
  await act( async () => {
2076
2074
  await eventLoopTick();
2077
2075
  } );
@@ -2110,7 +2108,7 @@ describe( 'Rich link previews', () => {
2110
2108
  );
2111
2109
  } );
2112
2110
 
2113
- // mockFetchRichUrlData resolves on next "tick" of event loop
2111
+ // mockFetchRichUrlData resolves on next "tick" of event loop.
2114
2112
  await act( async () => {
2115
2113
  await eventLoopTick();
2116
2114
  } );
@@ -2156,7 +2154,7 @@ describe( 'Rich link previews', () => {
2156
2154
  );
2157
2155
  } );
2158
2156
 
2159
- // mockFetchRichUrlData resolves on next "tick" of event loop
2157
+ // mockFetchRichUrlData resolves on next "tick" of event loop.
2160
2158
  await act( async () => {
2161
2159
  await eventLoopTick();
2162
2160
  } );
@@ -2195,7 +2193,7 @@ describe( 'Rich link previews', () => {
2195
2193
  );
2196
2194
  } );
2197
2195
 
2198
- // mockFetchRichUrlData resolves on next "tick" of event loop
2196
+ // mockFetchRichUrlData resolves on next "tick" of event loop.
2199
2197
  await act( async () => {
2200
2198
  await eventLoopTick();
2201
2199
  } );
@@ -2224,7 +2222,7 @@ describe( 'Rich link previews', () => {
2224
2222
  );
2225
2223
  } );
2226
2224
 
2227
- // mockFetchRichUrlData resolves on next "tick" of event loop
2225
+ // mockFetchRichUrlData resolves on next "tick" of event loop.
2228
2226
  await act( async () => {
2229
2227
  await eventLoopTick();
2230
2228
  } );
@@ -2254,7 +2252,7 @@ describe( 'Rich link previews', () => {
2254
2252
  );
2255
2253
  } );
2256
2254
 
2257
- // mockFetchRichUrlData resolves on next "tick" of event loop
2255
+ // mockFetchRichUrlData resolves on next "tick" of event loop.
2258
2256
  await act( async () => {
2259
2257
  await eventLoopTick();
2260
2258
  } );