@wordpress/editor 14.32.0 → 14.32.1-next.ff1cebbba.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 (1263) hide show
  1. package/build/bindings/api.js +45 -33
  2. package/build/bindings/api.js.map +7 -1
  3. package/build/bindings/entity.js +78 -0
  4. package/build/bindings/entity.js.map +7 -0
  5. package/build/bindings/pattern-overrides.js +58 -65
  6. package/build/bindings/pattern-overrides.js.map +7 -1
  7. package/build/bindings/post-data.js +71 -91
  8. package/build/bindings/post-data.js.map +7 -1
  9. package/build/bindings/post-meta.js +74 -106
  10. package/build/bindings/post-meta.js.map +7 -1
  11. package/build/components/autocompleters/index.js +36 -11
  12. package/build/components/autocompleters/index.js.map +7 -1
  13. package/build/components/autocompleters/user.js +66 -54
  14. package/build/components/autocompleters/user.js.map +7 -1
  15. package/build/components/autosave-monitor/index.js +59 -73
  16. package/build/components/autosave-monitor/index.js.map +7 -1
  17. package/build/components/block-removal-warnings/index.js +81 -57
  18. package/build/components/block-removal-warnings/index.js.map +7 -1
  19. package/build/components/block-settings-menu/content-only-settings-menu.js +161 -121
  20. package/build/components/block-settings-menu/content-only-settings-menu.js.map +7 -1
  21. package/build/components/block-settings-menu/plugin-block-settings-menu-item.js +42 -99
  22. package/build/components/block-settings-menu/plugin-block-settings-menu-item.js.map +7 -1
  23. package/build/components/block-visibility/index.js +123 -0
  24. package/build/components/block-visibility/index.js.map +7 -0
  25. package/build/components/blog-title/index.js +127 -108
  26. package/build/components/blog-title/index.js.map +7 -1
  27. package/build/components/character-count/index.js +30 -23
  28. package/build/components/character-count/index.js.map +7 -1
  29. package/build/components/collab-sidebar/add-comment.js +89 -70
  30. package/build/components/collab-sidebar/add-comment.js.map +7 -1
  31. package/build/components/collab-sidebar/comment-author-info.js +72 -84
  32. package/build/components/collab-sidebar/comment-author-info.js.map +7 -1
  33. package/build/components/collab-sidebar/comment-form.js +92 -81
  34. package/build/components/collab-sidebar/comment-form.js.map +7 -1
  35. package/build/components/collab-sidebar/comment-indicator-toolbar.js +96 -83
  36. package/build/components/collab-sidebar/comment-indicator-toolbar.js.map +7 -1
  37. package/build/components/collab-sidebar/comment-menu-item.js +46 -0
  38. package/build/components/collab-sidebar/comment-menu-item.js.map +7 -0
  39. package/build/components/collab-sidebar/comments.js +544 -317
  40. package/build/components/collab-sidebar/comments.js.map +7 -1
  41. package/build/components/collab-sidebar/constants.js +30 -7
  42. package/build/components/collab-sidebar/constants.js.map +7 -1
  43. package/build/components/collab-sidebar/hooks.js +312 -58
  44. package/build/components/collab-sidebar/hooks.js.map +7 -1
  45. package/build/components/collab-sidebar/index.js +183 -252
  46. package/build/components/collab-sidebar/index.js.map +7 -1
  47. package/build/components/collab-sidebar/utils.js +94 -79
  48. package/build/components/collab-sidebar/utils.js.map +7 -1
  49. package/build/components/collapsible-block-toolbar/index.js +70 -60
  50. package/build/components/collapsible-block-toolbar/index.js.map +7 -1
  51. package/build/components/commands/index.js +218 -268
  52. package/build/components/commands/index.js.map +7 -1
  53. package/build/components/deprecated.js +328 -248
  54. package/build/components/deprecated.js.map +7 -1
  55. package/build/components/document-bar/index.js +145 -153
  56. package/build/components/document-bar/index.js.map +7 -1
  57. package/build/components/document-outline/check.js +28 -27
  58. package/build/components/document-outline/check.js.map +7 -1
  59. package/build/components/document-outline/index.js +169 -207
  60. package/build/components/document-outline/index.js.map +7 -1
  61. package/build/components/document-outline/item.js +68 -35
  62. package/build/components/document-outline/item.js.map +7 -1
  63. package/build/components/document-tools/index.js +145 -133
  64. package/build/components/document-tools/index.js.map +7 -1
  65. package/build/components/editor/index.js +99 -63
  66. package/build/components/editor/index.js.map +7 -1
  67. package/build/components/editor-history/redo.js +51 -54
  68. package/build/components/editor-history/redo.js.map +7 -1
  69. package/build/components/editor-history/undo.js +50 -53
  70. package/build/components/editor-history/undo.js.map +7 -1
  71. package/build/components/editor-interface/content-slot-fill.js +27 -12
  72. package/build/components/editor-interface/content-slot-fill.js.map +7 -1
  73. package/build/components/editor-interface/index.js +142 -127
  74. package/build/components/editor-interface/index.js.map +7 -1
  75. package/build/components/editor-notices/index.js +74 -58
  76. package/build/components/editor-notices/index.js.map +7 -1
  77. package/build/components/editor-snackbars/index.js +40 -32
  78. package/build/components/editor-snackbars/index.js.map +7 -1
  79. package/build/components/entities-saved-states/entity-record-item.js +70 -70
  80. package/build/components/entities-saved-states/entity-record-item.js.map +7 -1
  81. package/build/components/entities-saved-states/entity-type-list.js +108 -78
  82. package/build/components/entities-saved-states/entity-type-list.js.map +7 -1
  83. package/build/components/entities-saved-states/hooks/use-is-dirty.js +62 -61
  84. package/build/components/entities-saved-states/hooks/use-is-dirty.js.map +7 -1
  85. package/build/components/entities-saved-states/index.js +177 -161
  86. package/build/components/entities-saved-states/index.js.map +7 -1
  87. package/build/components/error-boundary/index.js +59 -85
  88. package/build/components/error-boundary/index.js.map +7 -1
  89. package/build/components/global-keyboard-shortcuts/index.js +58 -71
  90. package/build/components/global-keyboard-shortcuts/index.js.map +7 -1
  91. package/build/components/global-keyboard-shortcuts/register-shortcuts.js +106 -93
  92. package/build/components/global-keyboard-shortcuts/register-shortcuts.js.map +7 -1
  93. package/build/components/global-styles-provider/index.js +173 -146
  94. package/build/components/global-styles-provider/index.js.map +7 -1
  95. package/build/components/header/back-button.js +40 -26
  96. package/build/components/header/back-button.js.map +7 -1
  97. package/build/components/header/index.js +175 -162
  98. package/build/components/header/index.js.map +7 -1
  99. package/build/components/index.js +311 -780
  100. package/build/components/index.js.map +7 -1
  101. package/build/components/inserter-sidebar/index.js +62 -71
  102. package/build/components/inserter-sidebar/index.js.map +7 -1
  103. package/build/components/keyboard-shortcut-help-modal/config.js +74 -70
  104. package/build/components/keyboard-shortcut-help-modal/config.js.map +7 -1
  105. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +61 -43
  106. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +7 -1
  107. package/build/components/keyboard-shortcut-help-modal/index.js +165 -111
  108. package/build/components/keyboard-shortcut-help-modal/index.js.map +7 -1
  109. package/build/components/keyboard-shortcut-help-modal/shortcut.js +76 -55
  110. package/build/components/keyboard-shortcut-help-modal/shortcut.js.map +7 -1
  111. package/build/components/list-view-sidebar/index.js +117 -121
  112. package/build/components/list-view-sidebar/index.js.map +7 -1
  113. package/build/components/list-view-sidebar/list-view-outline.js +56 -41
  114. package/build/components/list-view-sidebar/list-view-outline.js.map +7 -1
  115. package/build/components/local-autosave-monitor/index.js +118 -148
  116. package/build/components/local-autosave-monitor/index.js.map +7 -1
  117. package/build/components/media-categories/index.js +160 -144
  118. package/build/components/media-categories/index.js.map +7 -1
  119. package/build/components/mode-switcher/index.js +68 -63
  120. package/build/components/mode-switcher/index.js.map +7 -1
  121. package/build/components/more-menu/copy-content-menu-item.js +46 -43
  122. package/build/components/more-menu/copy-content-menu-item.js.map +7 -1
  123. package/build/components/more-menu/index.js +174 -119
  124. package/build/components/more-menu/index.js.map +7 -1
  125. package/build/components/more-menu/tools-more-menu-group.js +27 -21
  126. package/build/components/more-menu/tools-more-menu-group.js.map +7 -1
  127. package/build/components/more-menu/view-more-menu-group.js +30 -22
  128. package/build/components/more-menu/view-more-menu-group.js.map +7 -1
  129. package/build/components/page-attributes/check.js +37 -40
  130. package/build/components/page-attributes/check.js.map +7 -1
  131. package/build/components/page-attributes/order.js +66 -64
  132. package/build/components/page-attributes/order.js.map +7 -1
  133. package/build/components/page-attributes/panel.js +45 -43
  134. package/build/components/page-attributes/panel.js.map +7 -1
  135. package/build/components/page-attributes/parent.js +224 -207
  136. package/build/components/page-attributes/parent.js.map +7 -1
  137. package/build/components/pattern-duplicate-modal/index.js +58 -48
  138. package/build/components/pattern-duplicate-modal/index.js.map +7 -1
  139. package/build/components/pattern-overrides-panel/index.js +33 -23
  140. package/build/components/pattern-overrides-panel/index.js.map +7 -1
  141. package/build/components/pattern-rename-modal/index.js +51 -47
  142. package/build/components/pattern-rename-modal/index.js.map +7 -1
  143. package/build/components/plugin-document-setting-panel/index.js +74 -114
  144. package/build/components/plugin-document-setting-panel/index.js.map +7 -1
  145. package/build/components/plugin-more-menu-item/index.js +37 -78
  146. package/build/components/plugin-more-menu-item/index.js.map +7 -1
  147. package/build/components/plugin-post-publish-panel/index.js +37 -59
  148. package/build/components/plugin-post-publish-panel/index.js.map +7 -1
  149. package/build/components/plugin-post-status-info/index.js +27 -73
  150. package/build/components/plugin-post-status-info/index.js.map +7 -1
  151. package/build/components/plugin-pre-publish-panel/index.js +37 -62
  152. package/build/components/plugin-pre-publish-panel/index.js.map +7 -1
  153. package/build/components/plugin-preview-menu-item/index.js +37 -57
  154. package/build/components/plugin-preview-menu-item/index.js.map +7 -1
  155. package/build/components/plugin-sidebar/index.js +34 -86
  156. package/build/components/plugin-sidebar/index.js.map +7 -1
  157. package/build/components/plugin-sidebar-more-menu-item/index.js +33 -67
  158. package/build/components/plugin-sidebar-more-menu-item/index.js.map +7 -1
  159. package/build/components/post-actions/actions.js +111 -103
  160. package/build/components/post-actions/actions.js.map +7 -1
  161. package/build/components/post-actions/index.js +126 -131
  162. package/build/components/post-actions/index.js.map +7 -1
  163. package/build/components/post-actions/set-as-homepage.js +123 -123
  164. package/build/components/post-actions/set-as-homepage.js.map +7 -1
  165. package/build/components/post-actions/set-as-posts-page.js +118 -120
  166. package/build/components/post-actions/set-as-posts-page.js.map +7 -1
  167. package/build/components/post-author/check.js +41 -38
  168. package/build/components/post-author/check.js.map +7 -1
  169. package/build/components/post-author/combobox.js +50 -52
  170. package/build/components/post-author/combobox.js.map +7 -1
  171. package/build/components/post-author/constants.js +34 -10
  172. package/build/components/post-author/constants.js.map +7 -1
  173. package/build/components/post-author/hook.js +71 -71
  174. package/build/components/post-author/hook.js.map +7 -1
  175. package/build/components/post-author/index.js +43 -31
  176. package/build/components/post-author/index.js.map +7 -1
  177. package/build/components/post-author/panel.js +106 -95
  178. package/build/components/post-author/panel.js.map +7 -1
  179. package/build/components/post-author/select.js +45 -40
  180. package/build/components/post-author/select.js.map +7 -1
  181. package/build/components/post-card-panel/index.js +128 -113
  182. package/build/components/post-card-panel/index.js.map +7 -1
  183. package/build/components/post-comments/index.js +60 -55
  184. package/build/components/post-comments/index.js.map +7 -1
  185. package/build/components/post-content-information/index.js +64 -65
  186. package/build/components/post-content-information/index.js.map +7 -1
  187. package/build/components/post-discussion/panel.js +114 -128
  188. package/build/components/post-discussion/panel.js.map +7 -1
  189. package/build/components/post-excerpt/check.js +37 -27
  190. package/build/components/post-excerpt/check.js.map +7 -1
  191. package/build/components/post-excerpt/index.js +75 -71
  192. package/build/components/post-excerpt/index.js.map +7 -1
  193. package/build/components/post-excerpt/panel.js +152 -141
  194. package/build/components/post-excerpt/panel.js.map +7 -1
  195. package/build/components/post-excerpt/plugin.js +28 -70
  196. package/build/components/post-excerpt/plugin.js.map +7 -1
  197. package/build/components/post-featured-image/check.js +38 -32
  198. package/build/components/post-featured-image/check.js.map +7 -1
  199. package/build/components/post-featured-image/index.js +224 -211
  200. package/build/components/post-featured-image/index.js.map +7 -1
  201. package/build/components/post-featured-image/panel.js +55 -59
  202. package/build/components/post-featured-image/panel.js.map +7 -1
  203. package/build/components/post-fields/index.js +55 -56
  204. package/build/components/post-fields/index.js.map +7 -1
  205. package/build/components/post-format/check.js +42 -33
  206. package/build/components/post-format/check.js.map +7 -1
  207. package/build/components/post-format/index.js +100 -113
  208. package/build/components/post-format/index.js.map +7 -1
  209. package/build/components/post-format/panel.js +91 -82
  210. package/build/components/post-format/panel.js.map +7 -1
  211. package/build/components/post-last-edited-panel/index.js +38 -29
  212. package/build/components/post-last-edited-panel/index.js.map +7 -1
  213. package/build/components/post-last-revision/check.js +41 -41
  214. package/build/components/post-last-revision/check.js.map +7 -1
  215. package/build/components/post-last-revision/index.js +75 -66
  216. package/build/components/post-last-revision/index.js.map +7 -1
  217. package/build/components/post-last-revision/panel.js +39 -30
  218. package/build/components/post-last-revision/panel.js.map +7 -1
  219. package/build/components/post-locked-modal/index.js +148 -145
  220. package/build/components/post-locked-modal/index.js.map +7 -1
  221. package/build/components/post-panel-row/index.js +49 -35
  222. package/build/components/post-panel-row/index.js.map +7 -1
  223. package/build/components/post-panel-section/index.js +38 -26
  224. package/build/components/post-panel-section/index.js.map +7 -1
  225. package/build/components/post-pending-status/check.js +34 -40
  226. package/build/components/post-pending-status/check.js.map +7 -1
  227. package/build/components/post-pending-status/index.js +58 -41
  228. package/build/components/post-pending-status/index.js.map +7 -1
  229. package/build/components/post-pingbacks/index.js +52 -44
  230. package/build/components/post-pingbacks/index.js.map +7 -1
  231. package/build/components/post-preview-button/index.js +90 -120
  232. package/build/components/post-preview-button/index.js.map +7 -1
  233. package/build/components/post-publish-button/index.js +125 -137
  234. package/build/components/post-publish-button/index.js.map +7 -1
  235. package/build/components/post-publish-button/label.js +39 -40
  236. package/build/components/post-publish-button/label.js.map +7 -1
  237. package/build/components/post-publish-button/post-publish-button-or-toggle.js +62 -68
  238. package/build/components/post-publish-button/post-publish-button-or-toggle.js.map +7 -1
  239. package/build/components/post-publish-panel/index.js +136 -135
  240. package/build/components/post-publish-panel/index.js.map +7 -1
  241. package/build/components/post-publish-panel/maybe-category-panel.js +71 -67
  242. package/build/components/post-publish-panel/maybe-category-panel.js.map +7 -1
  243. package/build/components/post-publish-panel/maybe-post-format-panel.js +72 -63
  244. package/build/components/post-publish-panel/maybe-post-format-panel.js.map +7 -1
  245. package/build/components/post-publish-panel/maybe-tags-panel.js +86 -80
  246. package/build/components/post-publish-panel/maybe-tags-panel.js.map +7 -1
  247. package/build/components/post-publish-panel/maybe-upload-media.js +172 -214
  248. package/build/components/post-publish-panel/maybe-upload-media.js.map +7 -1
  249. package/build/components/post-publish-panel/media-util.js +63 -72
  250. package/build/components/post-publish-panel/media-util.js.map +7 -1
  251. package/build/components/post-publish-panel/postpublish.js +135 -130
  252. package/build/components/post-publish-panel/postpublish.js.map +7 -1
  253. package/build/components/post-publish-panel/prepublish.js +137 -103
  254. package/build/components/post-publish-panel/prepublish.js.map +7 -1
  255. package/build/components/post-saved-state/index.js +115 -131
  256. package/build/components/post-saved-state/index.js.map +7 -1
  257. package/build/components/post-schedule/check.js +27 -29
  258. package/build/components/post-schedule/check.js.map +7 -1
  259. package/build/components/post-schedule/index.js +96 -93
  260. package/build/components/post-schedule/index.js.map +7 -1
  261. package/build/components/post-schedule/label.js +79 -86
  262. package/build/components/post-schedule/label.js.map +7 -1
  263. package/build/components/post-schedule/panel.js +88 -73
  264. package/build/components/post-schedule/panel.js.map +7 -1
  265. package/build/components/post-status/index.js +238 -202
  266. package/build/components/post-status/index.js.map +7 -1
  267. package/build/components/post-sticky/check.js +30 -35
  268. package/build/components/post-sticky/check.js.map +7 -1
  269. package/build/components/post-sticky/index.js +50 -40
  270. package/build/components/post-sticky/index.js.map +7 -1
  271. package/build/components/post-sticky/panel.js +43 -21
  272. package/build/components/post-sticky/panel.js.map +7 -1
  273. package/build/components/post-switch-to-draft-button/index.js +80 -75
  274. package/build/components/post-switch-to-draft-button/index.js.map +7 -1
  275. package/build/components/post-sync-status/index.js +45 -44
  276. package/build/components/post-sync-status/index.js.map +7 -1
  277. package/build/components/post-taxonomies/check.js +36 -33
  278. package/build/components/post-taxonomies/check.js.map +7 -1
  279. package/build/components/post-taxonomies/flat-term-selector.js +189 -189
  280. package/build/components/post-taxonomies/flat-term-selector.js.map +7 -1
  281. package/build/components/post-taxonomies/hierarchical-term-selector.js +244 -280
  282. package/build/components/post-taxonomies/hierarchical-term-selector.js.map +7 -1
  283. package/build/components/post-taxonomies/index.js +68 -58
  284. package/build/components/post-taxonomies/index.js.map +7 -1
  285. package/build/components/post-taxonomies/most-used-terms.js +73 -56
  286. package/build/components/post-taxonomies/most-used-terms.js.map +7 -1
  287. package/build/components/post-taxonomies/panel.js +66 -69
  288. package/build/components/post-taxonomies/panel.js.map +7 -1
  289. package/build/components/post-template/block-theme.js +165 -123
  290. package/build/components/post-template/block-theme.js.map +7 -1
  291. package/build/components/post-template/classic-theme.js +193 -187
  292. package/build/components/post-template/classic-theme.js.map +7 -1
  293. package/build/components/post-template/create-new-template-modal.js +139 -110
  294. package/build/components/post-template/create-new-template-modal.js.map +7 -1
  295. package/build/components/post-template/create-new-template.js +65 -46
  296. package/build/components/post-template/create-new-template.js.map +7 -1
  297. package/build/components/post-template/hooks.js +116 -84
  298. package/build/components/post-template/hooks.js.map +7 -1
  299. package/build/components/post-template/panel.js +56 -52
  300. package/build/components/post-template/panel.js.map +7 -1
  301. package/build/components/post-template/reset-default-template.js +49 -43
  302. package/build/components/post-template/reset-default-template.js.map +7 -1
  303. package/build/components/post-template/swap-template-button.js +109 -91
  304. package/build/components/post-template/swap-template-button.js.map +7 -1
  305. package/build/components/post-text-editor/index.js +80 -81
  306. package/build/components/post-text-editor/index.js.map +7 -1
  307. package/build/components/post-title/constants.js +30 -7
  308. package/build/components/post-title/constants.js.map +7 -1
  309. package/build/components/post-title/index.js +99 -126
  310. package/build/components/post-title/index.js.map +7 -1
  311. package/build/components/post-title/post-title-raw.js +74 -78
  312. package/build/components/post-title/post-title-raw.js.map +7 -1
  313. package/build/components/post-title/use-post-title-focus.js +35 -52
  314. package/build/components/post-title/use-post-title-focus.js.map +7 -1
  315. package/build/components/post-title/use-post-title.js +30 -37
  316. package/build/components/post-title/use-post-title.js.map +7 -1
  317. package/build/components/post-transform-panel/hooks.js +70 -67
  318. package/build/components/post-transform-panel/hooks.js.map +7 -1
  319. package/build/components/post-transform-panel/index.js +69 -75
  320. package/build/components/post-transform-panel/index.js.map +7 -1
  321. package/build/components/post-trash/check.js +33 -42
  322. package/build/components/post-trash/check.js.map +7 -1
  323. package/build/components/post-trash/index.js +78 -67
  324. package/build/components/post-trash/index.js.map +7 -1
  325. package/build/components/post-type-support-check/index.js +34 -47
  326. package/build/components/post-type-support-check/index.js.map +7 -1
  327. package/build/components/post-url/check.js +31 -32
  328. package/build/components/post-url/check.js.map +7 -1
  329. package/build/components/post-url/index.js +155 -156
  330. package/build/components/post-url/index.js.map +7 -1
  331. package/build/components/post-url/label.js +35 -30
  332. package/build/components/post-url/label.js.map +7 -1
  333. package/build/components/post-url/panel.js +111 -112
  334. package/build/components/post-url/panel.js.map +7 -1
  335. package/build/components/post-view-link/index.js +48 -47
  336. package/build/components/post-view-link/index.js.map +7 -1
  337. package/build/components/post-visibility/check.js +28 -33
  338. package/build/components/post-visibility/check.js.map +7 -1
  339. package/build/components/post-visibility/index.js +83 -84
  340. package/build/components/post-visibility/index.js.map +7 -1
  341. package/build/components/post-visibility/label.js +35 -30
  342. package/build/components/post-visibility/label.js.map +7 -1
  343. package/build/components/post-visibility/utils.js +44 -23
  344. package/build/components/post-visibility/utils.js.map +7 -1
  345. package/build/components/posts-per-page/index.js +110 -98
  346. package/build/components/posts-per-page/index.js.map +7 -1
  347. package/build/components/preferences-modal/enable-panel.js +47 -42
  348. package/build/components/preferences-modal/enable-panel.js.map +7 -1
  349. package/build/components/preferences-modal/enable-plugin-document-setting-panel.js +40 -31
  350. package/build/components/preferences-modal/enable-plugin-document-setting-panel.js.map +7 -1
  351. package/build/components/preferences-modal/enable-publish-sidebar.js +39 -32
  352. package/build/components/preferences-modal/enable-publish-sidebar.js.map +7 -1
  353. package/build/components/preferences-modal/index.js +391 -231
  354. package/build/components/preferences-modal/index.js.map +7 -1
  355. package/build/components/preview-dropdown/index.js +165 -151
  356. package/build/components/preview-dropdown/index.js.map +7 -1
  357. package/build/components/provider/disable-non-page-content-blocks.js +67 -82
  358. package/build/components/provider/disable-non-page-content-blocks.js.map +7 -1
  359. package/build/components/provider/index.js +283 -325
  360. package/build/components/provider/index.js.map +7 -1
  361. package/build/components/provider/navigation-block-editing-mode.js +32 -29
  362. package/build/components/provider/navigation-block-editing-mode.js.map +7 -1
  363. package/build/components/provider/use-auto-switch-editor-sidebars.js +48 -39
  364. package/build/components/provider/use-auto-switch-editor-sidebars.js.map +7 -1
  365. package/build/components/provider/use-block-editor-settings.js +249 -178
  366. package/build/components/provider/use-block-editor-settings.js.map +7 -1
  367. package/build/components/provider/use-hide-blocks-from-inserter.js +87 -46
  368. package/build/components/provider/use-hide-blocks-from-inserter.js.map +7 -1
  369. package/build/components/provider/use-post-content-blocks.js +48 -29
  370. package/build/components/provider/use-post-content-blocks.js.map +7 -1
  371. package/build/components/provider/with-registry-provider.js +52 -46
  372. package/build/components/provider/with-registry-provider.js.map +7 -1
  373. package/build/components/resizable-editor/index.js +99 -86
  374. package/build/components/resizable-editor/index.js.map +7 -1
  375. package/build/components/resizable-editor/resize-handle.js +42 -36
  376. package/build/components/resizable-editor/resize-handle.js.map +7 -1
  377. package/build/components/save-publish-panels/index.js +88 -69
  378. package/build/components/save-publish-panels/index.js.map +7 -1
  379. package/build/components/sidebar/constants.js +29 -8
  380. package/build/components/sidebar/constants.js.map +7 -1
  381. package/build/components/sidebar/header.js +56 -50
  382. package/build/components/sidebar/header.js.map +7 -1
  383. package/build/components/sidebar/index.js +156 -136
  384. package/build/components/sidebar/index.js.map +7 -1
  385. package/build/components/sidebar/post-summary.js +114 -91
  386. package/build/components/sidebar/post-summary.js.map +7 -1
  387. package/build/components/site-discussion/index.js +132 -113
  388. package/build/components/site-discussion/index.js.map +7 -1
  389. package/build/components/start-page-options/index.js +136 -146
  390. package/build/components/start-page-options/index.js.map +7 -1
  391. package/build/components/start-template-options/index.js +168 -157
  392. package/build/components/start-template-options/index.js.map +7 -1
  393. package/build/components/table-of-contents/index.js +78 -69
  394. package/build/components/table-of-contents/index.js.map +7 -1
  395. package/build/components/table-of-contents/panel.js +101 -94
  396. package/build/components/table-of-contents/panel.js.map +7 -1
  397. package/build/components/template-content-panel/index.js +74 -58
  398. package/build/components/template-content-panel/index.js.map +7 -1
  399. package/build/components/template-part-content-panel/index.js +51 -54
  400. package/build/components/template-part-content-panel/index.js.map +7 -1
  401. package/build/components/template-part-menu-items/convert-to-regular.js +44 -32
  402. package/build/components/template-part-menu-items/convert-to-regular.js.map +7 -1
  403. package/build/components/template-part-menu-items/convert-to-template-part.js +76 -68
  404. package/build/components/template-part-menu-items/convert-to-template-part.js.map +7 -1
  405. package/build/components/template-part-menu-items/index.js +62 -52
  406. package/build/components/template-part-menu-items/index.js.map +7 -1
  407. package/build/components/template-validation-notice/index.js +71 -47
  408. package/build/components/template-validation-notice/index.js.map +7 -1
  409. package/build/components/text-editor/index.js +68 -62
  410. package/build/components/text-editor/index.js.map +7 -1
  411. package/build/components/theme-support-check/index.js +32 -43
  412. package/build/components/theme-support-check/index.js.map +7 -1
  413. package/build/components/time-to-read/index.js +54 -51
  414. package/build/components/time-to-read/index.js.map +7 -1
  415. package/build/components/unsaved-changes-warning/index.js +34 -38
  416. package/build/components/unsaved-changes-warning/index.js.map +7 -1
  417. package/build/components/visual-editor/edit-template-blocks-notification.js +64 -68
  418. package/build/components/visual-editor/edit-template-blocks-notification.js.map +7 -1
  419. package/build/components/visual-editor/index.js +286 -247
  420. package/build/components/visual-editor/index.js.map +7 -1
  421. package/build/components/visual-editor/use-select-nearest-editable-block.js +75 -68
  422. package/build/components/visual-editor/use-select-nearest-editable-block.js.map +7 -1
  423. package/build/components/visual-editor/use-zoom-out-mode-exit.js +52 -46
  424. package/build/components/visual-editor/use-zoom-out-mode-exit.js.map +7 -1
  425. package/build/components/word-count/index.js +34 -35
  426. package/build/components/word-count/index.js.map +7 -1
  427. package/build/components/zoom-out-toggle/index.js +88 -72
  428. package/build/components/zoom-out-toggle/index.js.map +7 -1
  429. package/build/dataviews/api.js +47 -80
  430. package/build/dataviews/api.js.map +7 -1
  431. package/build/dataviews/fields/content-preview/content-preview-view.js +81 -89
  432. package/build/dataviews/fields/content-preview/content-preview-view.js.map +7 -1
  433. package/build/dataviews/fields/content-preview/index.js +39 -21
  434. package/build/dataviews/fields/content-preview/index.js.map +7 -1
  435. package/build/dataviews/store/private-actions.js +122 -56
  436. package/build/dataviews/store/private-actions.js.map +7 -1
  437. package/build/dataviews/store/private-selectors.js +32 -15
  438. package/build/dataviews/store/private-selectors.js.map +7 -1
  439. package/build/dataviews/store/reducer.js +50 -31
  440. package/build/dataviews/store/reducer.js.map +7 -1
  441. package/build/hooks/custom-sources-backwards-compatibility.js +70 -83
  442. package/build/hooks/custom-sources-backwards-compatibility.js.map +7 -1
  443. package/build/hooks/default-autocompleters.js +9 -17
  444. package/build/hooks/default-autocompleters.js.map +7 -1
  445. package/build/hooks/index.js +7 -7
  446. package/build/hooks/index.js.map +7 -1
  447. package/build/hooks/media-upload.js +8 -9
  448. package/build/hooks/media-upload.js.map +7 -1
  449. package/build/hooks/navigation-link-view-button.js +44 -66
  450. package/build/hooks/navigation-link-view-button.js.map +7 -1
  451. package/build/hooks/pattern-overrides.js +51 -70
  452. package/build/hooks/pattern-overrides.js.map +7 -1
  453. package/build/hooks/template-part-navigation-edit-button.js +91 -0
  454. package/build/hooks/template-part-navigation-edit-button.js.map +7 -0
  455. package/build/index.js +41 -77
  456. package/build/index.js.map +7 -1
  457. package/build/lock-unlock.js +31 -14
  458. package/build/lock-unlock.js.map +7 -1
  459. package/build/private-apis.js +76 -59
  460. package/build/private-apis.js.map +7 -1
  461. package/build/store/actions.js +516 -931
  462. package/build/store/actions.js.map +7 -1
  463. package/build/store/constants.js +70 -31
  464. package/build/store/constants.js.map +7 -1
  465. package/build/store/defaults.js +31 -33
  466. package/build/store/defaults.js.map +7 -1
  467. package/build/store/index.js +52 -41
  468. package/build/store/index.js.map +7 -1
  469. package/build/store/local-autosave.js +39 -27
  470. package/build/store/local-autosave.js.map +7 -1
  471. package/build/store/private-actions.js +290 -299
  472. package/build/store/private-actions.js.map +7 -1
  473. package/build/store/private-selectors.js +189 -188
  474. package/build/store/private-selectors.js.map +7 -1
  475. package/build/store/reducer.js +128 -280
  476. package/build/store/reducer.js.map +7 -1
  477. package/build/store/selectors.js +819 -1470
  478. package/build/store/selectors.js.map +7 -1
  479. package/build/store/utils/is-template-revertable.js +24 -19
  480. package/build/store/utils/is-template-revertable.js.map +7 -1
  481. package/build/store/utils/notice-builder.js +73 -94
  482. package/build/store/utils/notice-builder.js.map +7 -1
  483. package/build/utils/get-item-title.js +34 -25
  484. package/build/utils/get-item-title.js.map +7 -1
  485. package/build/utils/get-template-info.js +37 -46
  486. package/build/utils/get-template-info.js.map +7 -1
  487. package/build/utils/get-template-part-icon.js +34 -24
  488. package/build/utils/get-template-part-icon.js.map +7 -1
  489. package/build/utils/index.js +41 -24
  490. package/build/utils/index.js.map +7 -1
  491. package/build/utils/media-sideload/index.js +26 -19
  492. package/build/utils/media-sideload/index.js.map +7 -1
  493. package/build/utils/media-upload/index.js +46 -63
  494. package/build/utils/media-upload/index.js.map +7 -1
  495. package/build/utils/pageTypeBadge.js +33 -31
  496. package/build/utils/pageTypeBadge.js.map +7 -1
  497. package/build/utils/search-templates.js +45 -47
  498. package/build/utils/search-templates.js.map +7 -1
  499. package/build/utils/terms.js +57 -63
  500. package/build/utils/terms.js.map +7 -1
  501. package/build/utils/url.js +43 -33
  502. package/build/utils/url.js.map +7 -1
  503. package/build-module/bindings/api.js +11 -26
  504. package/build-module/bindings/api.js.map +7 -1
  505. package/build-module/bindings/entity.js +58 -0
  506. package/build-module/bindings/entity.js.map +7 -0
  507. package/build-module/bindings/pattern-overrides.js +39 -59
  508. package/build-module/bindings/pattern-overrides.js.map +7 -1
  509. package/build-module/bindings/post-data.js +53 -87
  510. package/build-module/bindings/post-data.js.map +7 -1
  511. package/build-module/bindings/post-meta.js +55 -101
  512. package/build-module/bindings/post-meta.js.map +7 -1
  513. package/build-module/components/autocompleters/index.js +5 -2
  514. package/build-module/components/autocompleters/index.js.map +7 -1
  515. package/build-module/components/autocompleters/user.js +45 -49
  516. package/build-module/components/autocompleters/user.js.map +7 -1
  517. package/build-module/components/autosave-monitor/index.js +37 -67
  518. package/build-module/components/autosave-monitor/index.js.map +7 -1
  519. package/build-module/components/block-removal-warnings/index.js +64 -54
  520. package/build-module/components/block-removal-warnings/index.js.map +7 -1
  521. package/build-module/components/block-settings-menu/content-only-settings-menu.js +136 -113
  522. package/build-module/components/block-settings-menu/content-only-settings-menu.js.map +7 -1
  523. package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js +23 -93
  524. package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js.map +7 -1
  525. package/build-module/components/block-visibility/index.js +103 -0
  526. package/build-module/components/block-visibility/index.js.map +7 -0
  527. package/build-module/components/blog-title/index.js +102 -101
  528. package/build-module/components/blog-title/index.js.map +7 -1
  529. package/build-module/components/character-count/index.js +13 -20
  530. package/build-module/components/character-count/index.js.map +7 -1
  531. package/build-module/components/collab-sidebar/add-comment.js +64 -66
  532. package/build-module/components/collab-sidebar/add-comment.js.map +7 -1
  533. package/build-module/components/collab-sidebar/comment-author-info.js +55 -77
  534. package/build-module/components/collab-sidebar/comment-author-info.js.map +7 -1
  535. package/build-module/components/collab-sidebar/comment-form.js +68 -75
  536. package/build-module/components/collab-sidebar/comment-form.js.map +7 -1
  537. package/build-module/components/collab-sidebar/comment-indicator-toolbar.js +67 -76
  538. package/build-module/components/collab-sidebar/comment-indicator-toolbar.js.map +7 -1
  539. package/build-module/components/collab-sidebar/comment-menu-item.js +26 -0
  540. package/build-module/components/collab-sidebar/comment-menu-item.js.map +7 -0
  541. package/build-module/components/collab-sidebar/comments.js +521 -309
  542. package/build-module/components/collab-sidebar/comments.js.map +7 -1
  543. package/build-module/components/collab-sidebar/constants.js +7 -3
  544. package/build-module/components/collab-sidebar/constants.js.map +7 -1
  545. package/build-module/components/collab-sidebar/hooks.js +301 -54
  546. package/build-module/components/collab-sidebar/hooks.js.map +7 -1
  547. package/build-module/components/collab-sidebar/index.js +158 -245
  548. package/build-module/components/collab-sidebar/index.js.map +7 -1
  549. package/build-module/components/collab-sidebar/utils.js +71 -76
  550. package/build-module/components/collab-sidebar/utils.js.map +7 -1
  551. package/build-module/components/collapsible-block-toolbar/index.js +44 -52
  552. package/build-module/components/collapsible-block-toolbar/index.js.map +7 -1
  553. package/build-module/components/commands/index.js +188 -241
  554. package/build-module/components/commands/index.js.map +7 -1
  555. package/build-module/components/deprecated.js +297 -237
  556. package/build-module/components/deprecated.js.map +7 -1
  557. package/build-module/components/document-bar/index.js +114 -141
  558. package/build-module/components/document-bar/index.js.map +7 -1
  559. package/build-module/components/document-outline/check.js +10 -23
  560. package/build-module/components/document-outline/check.js.map +7 -1
  561. package/build-module/components/document-outline/index.js +141 -203
  562. package/build-module/components/document-outline/index.js.map +7 -1
  563. package/build-module/components/document-outline/item.js +40 -29
  564. package/build-module/components/document-outline/item.js.map +7 -1
  565. package/build-module/components/document-tools/index.js +115 -125
  566. package/build-module/components/document-tools/index.js.map +7 -1
  567. package/build-module/components/editor/index.js +71 -57
  568. package/build-module/components/editor/index.js.map +7 -1
  569. package/build-module/components/editor-history/redo.js +33 -49
  570. package/build-module/components/editor-history/redo.js.map +7 -1
  571. package/build-module/components/editor-history/undo.js +32 -48
  572. package/build-module/components/editor-history/undo.js.map +7 -1
  573. package/build-module/components/editor-interface/content-slot-fill.js +9 -7
  574. package/build-module/components/editor-interface/content-slot-fill.js.map +7 -1
  575. package/build-module/components/editor-interface/index.js +111 -118
  576. package/build-module/components/editor-interface/index.js.map +7 -1
  577. package/build-module/components/editor-notices/index.js +43 -53
  578. package/build-module/components/editor-notices/index.js.map +7 -1
  579. package/build-module/components/editor-snackbars/index.js +23 -29
  580. package/build-module/components/editor-snackbars/index.js.map +7 -1
  581. package/build-module/components/entities-saved-states/entity-record-item.js +52 -65
  582. package/build-module/components/entities-saved-states/entity-record-item.js.map +7 -1
  583. package/build-module/components/entities-saved-states/entity-type-list.js +81 -73
  584. package/build-module/components/entities-saved-states/entity-type-list.js.map +7 -1
  585. package/build-module/components/entities-saved-states/hooks/use-is-dirty.js +39 -55
  586. package/build-module/components/entities-saved-states/hooks/use-is-dirty.js.map +7 -1
  587. package/build-module/components/entities-saved-states/index.js +150 -152
  588. package/build-module/components/entities-saved-states/index.js.map +7 -1
  589. package/build-module/components/error-boundary/index.js +42 -77
  590. package/build-module/components/error-boundary/index.js.map +7 -1
  591. package/build-module/components/global-keyboard-shortcuts/index.js +39 -66
  592. package/build-module/components/global-keyboard-shortcuts/index.js.map +7 -1
  593. package/build-module/components/global-keyboard-shortcuts/register-shortcuts.js +86 -88
  594. package/build-module/components/global-keyboard-shortcuts/register-shortcuts.js.map +7 -1
  595. package/build-module/components/global-styles-provider/index.js +135 -134
  596. package/build-module/components/global-styles-provider/index.js.map +7 -1
  597. package/build-module/components/header/back-button.js +20 -20
  598. package/build-module/components/header/back-button.js.map +7 -1
  599. package/build-module/components/header/index.js +148 -151
  600. package/build-module/components/header/index.js.map +7 -1
  601. package/build-module/components/index.js +192 -118
  602. package/build-module/components/index.js.map +7 -1
  603. package/build-module/components/inserter-sidebar/index.js +45 -64
  604. package/build-module/components/inserter-sidebar/index.js.map +7 -1
  605. package/build-module/components/keyboard-shortcut-help-modal/config.js +62 -75
  606. package/build-module/components/keyboard-shortcut-help-modal/config.js.map +7 -1
  607. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +33 -37
  608. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +7 -1
  609. package/build-module/components/keyboard-shortcut-help-modal/index.js +140 -105
  610. package/build-module/components/keyboard-shortcut-help-modal/index.js.map +7 -1
  611. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +58 -50
  612. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js.map +7 -1
  613. package/build-module/components/list-view-sidebar/index.js +86 -109
  614. package/build-module/components/list-view-sidebar/index.js.map +7 -1
  615. package/build-module/components/list-view-sidebar/list-view-outline.js +29 -36
  616. package/build-module/components/list-view-sidebar/list-view-outline.js.map +7 -1
  617. package/build-module/components/local-autosave-monitor/index.js +81 -130
  618. package/build-module/components/local-autosave-monitor/index.js.map +7 -1
  619. package/build-module/components/media-categories/index.js +139 -137
  620. package/build-module/components/media-categories/index.js.map +7 -1
  621. package/build-module/components/mode-switcher/index.js +50 -60
  622. package/build-module/components/mode-switcher/index.js.map +7 -1
  623. package/build-module/components/more-menu/copy-content-menu-item.js +27 -37
  624. package/build-module/components/more-menu/copy-content-menu-item.js.map +7 -1
  625. package/build-module/components/more-menu/index.js +154 -113
  626. package/build-module/components/more-menu/index.js.map +7 -1
  627. package/build-module/components/more-menu/tools-more-menu-group.js +9 -16
  628. package/build-module/components/more-menu/tools-more-menu-group.js.map +7 -1
  629. package/build-module/components/more-menu/view-more-menu-group.js +12 -17
  630. package/build-module/components/more-menu/view-more-menu-group.js.map +7 -1
  631. package/build-module/components/page-attributes/check.js +15 -35
  632. package/build-module/components/page-attributes/check.js.map +7 -1
  633. package/build-module/components/page-attributes/order.js +42 -58
  634. package/build-module/components/page-attributes/order.js.map +7 -1
  635. package/build-module/components/page-attributes/panel.js +18 -37
  636. package/build-module/components/page-attributes/panel.js.map +7 -1
  637. package/build-module/components/page-attributes/parent.js +198 -197
  638. package/build-module/components/page-attributes/parent.js.map +7 -1
  639. package/build-module/components/pattern-duplicate-modal/index.js +36 -42
  640. package/build-module/components/pattern-duplicate-modal/index.js.map +7 -1
  641. package/build-module/components/pattern-overrides-panel/index.js +16 -19
  642. package/build-module/components/pattern-overrides-panel/index.js.map +7 -1
  643. package/build-module/components/pattern-rename-modal/index.js +29 -41
  644. package/build-module/components/pattern-rename-modal/index.js.map +7 -1
  645. package/build-module/components/plugin-document-setting-panel/index.js +46 -108
  646. package/build-module/components/plugin-document-setting-panel/index.js.map +7 -1
  647. package/build-module/components/plugin-more-menu-item/index.js +18 -74
  648. package/build-module/components/plugin-more-menu-item/index.js.map +7 -1
  649. package/build-module/components/plugin-post-publish-panel/index.js +19 -54
  650. package/build-module/components/plugin-post-publish-panel/index.js.map +7 -1
  651. package/build-module/components/plugin-post-status-info/index.js +9 -68
  652. package/build-module/components/plugin-post-status-info/index.js.map +7 -1
  653. package/build-module/components/plugin-pre-publish-panel/index.js +19 -57
  654. package/build-module/components/plugin-pre-publish-panel/index.js.map +7 -1
  655. package/build-module/components/plugin-preview-menu-item/index.js +18 -53
  656. package/build-module/components/plugin-preview-menu-item/index.js.map +7 -1
  657. package/build-module/components/plugin-sidebar/index.js +16 -83
  658. package/build-module/components/plugin-sidebar/index.js.map +7 -1
  659. package/build-module/components/plugin-sidebar-more-menu-item/index.js +15 -64
  660. package/build-module/components/plugin-sidebar-more-menu-item/index.js.map +7 -1
  661. package/build-module/components/post-actions/actions.js +85 -94
  662. package/build-module/components/post-actions/actions.js.map +7 -1
  663. package/build-module/components/post-actions/index.js +104 -121
  664. package/build-module/components/post-actions/index.js.map +7 -1
  665. package/build-module/components/post-actions/set-as-homepage.js +104 -115
  666. package/build-module/components/post-actions/set-as-homepage.js.map +7 -1
  667. package/build-module/components/post-actions/set-as-posts-page.js +99 -112
  668. package/build-module/components/post-actions/set-as-posts-page.js.map +7 -1
  669. package/build-module/components/post-author/check.js +12 -33
  670. package/build-module/components/post-author/check.js.map +7 -1
  671. package/build-module/components/post-author/combobox.js +32 -47
  672. package/build-module/components/post-author/combobox.js.map +7 -1
  673. package/build-module/components/post-author/constants.js +11 -6
  674. package/build-module/components/post-author/constants.js.map +7 -1
  675. package/build-module/components/post-author/hook.js +48 -65
  676. package/build-module/components/post-author/hook.js.map +7 -1
  677. package/build-module/components/post-author/index.js +14 -24
  678. package/build-module/components/post-author/index.js.map +7 -1
  679. package/build-module/components/post-author/panel.js +73 -87
  680. package/build-module/components/post-author/panel.js.map +7 -1
  681. package/build-module/components/post-author/select.js +28 -36
  682. package/build-module/components/post-author/select.js.map +7 -1
  683. package/build-module/components/post-card-panel/index.js +107 -105
  684. package/build-module/components/post-card-panel/index.js.map +7 -1
  685. package/build-module/components/post-comments/index.js +45 -50
  686. package/build-module/components/post-comments/index.js.map +7 -1
  687. package/build-module/components/post-content-information/index.js +49 -61
  688. package/build-module/components/post-content-information/index.js.map +7 -1
  689. package/build-module/components/post-discussion/panel.js +90 -122
  690. package/build-module/components/post-discussion/panel.js.map +7 -1
  691. package/build-module/components/post-excerpt/check.js +9 -23
  692. package/build-module/components/post-excerpt/check.js.map +7 -1
  693. package/build-module/components/post-excerpt/index.js +57 -68
  694. package/build-module/components/post-excerpt/index.js.map +7 -1
  695. package/build-module/components/post-excerpt/panel.js +124 -134
  696. package/build-module/components/post-excerpt/panel.js.map +7 -1
  697. package/build-module/components/post-excerpt/plugin.js +10 -65
  698. package/build-module/components/post-excerpt/plugin.js.map +7 -1
  699. package/build-module/components/post-featured-image/check.js +10 -28
  700. package/build-module/components/post-featured-image/check.js.map +7 -1
  701. package/build-module/components/post-featured-image/index.js +203 -200
  702. package/build-module/components/post-featured-image/index.js.map +7 -1
  703. package/build-module/components/post-featured-image/panel.js +26 -52
  704. package/build-module/components/post-featured-image/panel.js.map +7 -1
  705. package/build-module/components/post-fields/index.js +36 -49
  706. package/build-module/components/post-fields/index.js.map +7 -1
  707. package/build-module/components/post-format/check.js +14 -29
  708. package/build-module/components/post-format/check.js.map +7 -1
  709. package/build-module/components/post-format/index.js +68 -107
  710. package/build-module/components/post-format/index.js.map +7 -1
  711. package/build-module/components/post-format/panel.js +60 -73
  712. package/build-module/components/post-format/panel.js.map +7 -1
  713. package/build-module/components/post-last-edited-panel/index.js +20 -24
  714. package/build-module/components/post-last-edited-panel/index.js.map +7 -1
  715. package/build-module/components/post-last-revision/check.js +13 -37
  716. package/build-module/components/post-last-revision/check.js.map +7 -1
  717. package/build-module/components/post-last-revision/index.js +43 -59
  718. package/build-module/components/post-last-revision/index.js.map +7 -1
  719. package/build-module/components/post-last-revision/panel.js +10 -25
  720. package/build-module/components/post-last-revision/panel.js.map +7 -1
  721. package/build-module/components/post-locked-modal/index.js +133 -137
  722. package/build-module/components/post-locked-modal/index.js.map +7 -1
  723. package/build-module/components/post-panel-row/index.js +21 -29
  724. package/build-module/components/post-panel-row/index.js.map +7 -1
  725. package/build-module/components/post-panel-section/index.js +10 -20
  726. package/build-module/components/post-panel-section/index.js.map +7 -1
  727. package/build-module/components/post-pending-status/check.js +12 -35
  728. package/build-module/components/post-pending-status/check.js.map +7 -1
  729. package/build-module/components/post-pending-status/index.js +27 -36
  730. package/build-module/components/post-pending-status/index.js.map +7 -1
  731. package/build-module/components/post-pingbacks/index.js +34 -39
  732. package/build-module/components/post-pingbacks/index.js.map +7 -1
  733. package/build-module/components/post-preview-button/index.js +71 -114
  734. package/build-module/components/post-preview-button/index.js.map +7 -1
  735. package/build-module/components/post-publish-button/index.js +93 -130
  736. package/build-module/components/post-publish-button/index.js.map +7 -1
  737. package/build-module/components/post-publish-button/label.js +20 -35
  738. package/build-module/components/post-publish-button/label.js.map +7 -1
  739. package/build-module/components/post-publish-button/post-publish-button-or-toggle.js +28 -56
  740. package/build-module/components/post-publish-button/post-publish-button-or-toggle.js.map +7 -1
  741. package/build-module/components/post-publish-panel/index.js +108 -126
  742. package/build-module/components/post-publish-panel/index.js.map +7 -1
  743. package/build-module/components/post-publish-panel/maybe-category-panel.js +40 -58
  744. package/build-module/components/post-publish-panel/maybe-category-panel.js.map +7 -1
  745. package/build-module/components/post-publish-panel/maybe-post-format-panel.js +55 -59
  746. package/build-module/components/post-publish-panel/maybe-post-format-panel.js.map +7 -1
  747. package/build-module/components/post-publish-panel/maybe-tags-panel.js +57 -73
  748. package/build-module/components/post-publish-panel/maybe-tags-panel.js.map +7 -1
  749. package/build-module/components/post-publish-panel/maybe-upload-media.js +158 -207
  750. package/build-module/components/post-publish-panel/maybe-upload-media.js.map +7 -1
  751. package/build-module/components/post-publish-panel/media-util.js +42 -69
  752. package/build-module/components/post-publish-panel/media-util.js.map +7 -1
  753. package/build-module/components/post-publish-panel/postpublish.js +109 -120
  754. package/build-module/components/post-publish-panel/postpublish.js.map +7 -1
  755. package/build-module/components/post-publish-panel/prepublish.js +108 -96
  756. package/build-module/components/post-publish-panel/prepublish.js.map +7 -1
  757. package/build-module/components/post-saved-state/index.js +87 -124
  758. package/build-module/components/post-saved-state/index.js.map +7 -1
  759. package/build-module/components/post-schedule/check.js +9 -25
  760. package/build-module/components/post-schedule/check.js.map +7 -1
  761. package/build-module/components/post-schedule/index.js +75 -88
  762. package/build-module/components/post-schedule/index.js.map +7 -1
  763. package/build-module/components/post-schedule/label.js +49 -73
  764. package/build-module/components/post-schedule/label.js.map +7 -1
  765. package/build-module/components/post-schedule/panel.js +63 -65
  766. package/build-module/components/post-schedule/panel.js.map +7 -1
  767. package/build-module/components/post-status/index.js +223 -194
  768. package/build-module/components/post-status/index.js.map +7 -1
  769. package/build-module/components/post-sticky/check.js +10 -29
  770. package/build-module/components/post-sticky/check.js.map +7 -1
  771. package/build-module/components/post-sticky/index.js +22 -36
  772. package/build-module/components/post-sticky/index.js.map +7 -1
  773. package/build-module/components/post-sticky/panel.js +12 -15
  774. package/build-module/components/post-sticky/panel.js.map +7 -1
  775. package/build-module/components/post-switch-to-draft-button/index.js +54 -70
  776. package/build-module/components/post-switch-to-draft-button/index.js.map +7 -1
  777. package/build-module/components/post-sync-status/index.js +17 -40
  778. package/build-module/components/post-sync-status/index.js.map +7 -1
  779. package/build-module/components/post-taxonomies/check.js +17 -28
  780. package/build-module/components/post-taxonomies/check.js.map +7 -1
  781. package/build-module/components/post-taxonomies/flat-term-selector.js +154 -177
  782. package/build-module/components/post-taxonomies/flat-term-selector.js.map +7 -1
  783. package/build-module/components/post-taxonomies/hierarchical-term-selector.js +232 -270
  784. package/build-module/components/post-taxonomies/hierarchical-term-selector.js.map +7 -1
  785. package/build-module/components/post-taxonomies/index.js +34 -49
  786. package/build-module/components/post-taxonomies/index.js.map +7 -1
  787. package/build-module/components/post-taxonomies/most-used-terms.js +54 -50
  788. package/build-module/components/post-taxonomies/most-used-terms.js.map +7 -1
  789. package/build-module/components/post-taxonomies/panel.js +39 -66
  790. package/build-module/components/post-taxonomies/panel.js.map +7 -1
  791. package/build-module/components/post-template/block-theme.js +134 -114
  792. package/build-module/components/post-template/block-theme.js.map +7 -1
  793. package/build-module/components/post-template/classic-theme.js +161 -177
  794. package/build-module/components/post-template/classic-theme.js.map +7 -1
  795. package/build-module/components/post-template/create-new-template-modal.js +126 -104
  796. package/build-module/components/post-template/create-new-template-modal.js.map +7 -1
  797. package/build-module/components/post-template/create-new-template.js +36 -39
  798. package/build-module/components/post-template/create-new-template.js.map +7 -1
  799. package/build-module/components/post-template/hooks.js +95 -80
  800. package/build-module/components/post-template/hooks.js.map +7 -1
  801. package/build-module/components/post-template/panel.js +25 -45
  802. package/build-module/components/post-template/panel.js.map +7 -1
  803. package/build-module/components/post-template/reset-default-template.js +33 -36
  804. package/build-module/components/post-template/reset-default-template.js.map +7 -1
  805. package/build-module/components/post-template/swap-template-button.js +86 -81
  806. package/build-module/components/post-template/swap-template-button.js.map +7 -1
  807. package/build-module/components/post-text-editor/index.js +49 -74
  808. package/build-module/components/post-text-editor/index.js.map +7 -1
  809. package/build-module/components/post-title/constants.js +7 -3
  810. package/build-module/components/post-title/constants.js.map +7 -1
  811. package/build-module/components/post-title/index.js +67 -111
  812. package/build-module/components/post-title/index.js.map +7 -1
  813. package/build-module/components/post-title/post-title-raw.js +43 -71
  814. package/build-module/components/post-title/post-title-raw.js.map +7 -1
  815. package/build-module/components/post-title/use-post-title-focus.js +15 -46
  816. package/build-module/components/post-title/use-post-title-focus.js.map +7 -1
  817. package/build-module/components/post-title/use-post-title.js +13 -33
  818. package/build-module/components/post-title/use-post-title.js.map +7 -1
  819. package/build-module/components/post-transform-panel/hooks.js +44 -58
  820. package/build-module/components/post-transform-panel/hooks.js.map +7 -1
  821. package/build-module/components/post-transform-panel/index.js +53 -69
  822. package/build-module/components/post-transform-panel/index.js.map +7 -1
  823. package/build-module/components/post-trash/check.js +14 -37
  824. package/build-module/components/post-trash/check.js.map +7 -1
  825. package/build-module/components/post-trash/index.js +49 -59
  826. package/build-module/components/post-trash/index.js.map +7 -1
  827. package/build-module/components/post-type-support-check/index.js +16 -42
  828. package/build-module/components/post-type-support-check/index.js.map +7 -1
  829. package/build-module/components/post-url/check.js +9 -24
  830. package/build-module/components/post-url/check.js.map +7 -1
  831. package/build-module/components/post-url/index.js +137 -146
  832. package/build-module/components/post-url/index.js.map +7 -1
  833. package/build-module/components/post-url/label.js +14 -26
  834. package/build-module/components/post-url/label.js.map +7 -1
  835. package/build-module/components/post-url/panel.js +80 -105
  836. package/build-module/components/post-url/panel.js.map +7 -1
  837. package/build-module/components/post-view-link/index.js +27 -39
  838. package/build-module/components/post-view-link/index.js.map +7 -1
  839. package/build-module/components/post-visibility/check.js +10 -29
  840. package/build-module/components/post-visibility/check.js.map +7 -1
  841. package/build-module/components/post-visibility/index.js +66 -78
  842. package/build-module/components/post-visibility/index.js.map +7 -1
  843. package/build-module/components/post-visibility/label.js +15 -27
  844. package/build-module/components/post-visibility/label.js.map +7 -1
  845. package/build-module/components/post-visibility/utils.js +22 -18
  846. package/build-module/components/post-visibility/utils.js.map +7 -1
  847. package/build-module/components/posts-per-page/index.js +85 -91
  848. package/build-module/components/posts-per-page/index.js.map +7 -1
  849. package/build-module/components/preferences-modal/enable-panel.js +30 -38
  850. package/build-module/components/preferences-modal/enable-panel.js.map +7 -1
  851. package/build-module/components/preferences-modal/enable-plugin-document-setting-panel.js +12 -25
  852. package/build-module/components/preferences-modal/enable-plugin-document-setting-panel.js.map +7 -1
  853. package/build-module/components/preferences-modal/enable-publish-sidebar.js +21 -27
  854. package/build-module/components/preferences-modal/enable-publish-sidebar.js.map +7 -1
  855. package/build-module/components/preferences-modal/index.js +365 -225
  856. package/build-module/components/preferences-modal/index.js.map +7 -1
  857. package/build-module/components/preview-dropdown/index.js +140 -141
  858. package/build-module/components/preview-dropdown/index.js.map +7 -1
  859. package/build-module/components/provider/disable-non-page-content-blocks.js +34 -72
  860. package/build-module/components/provider/disable-non-page-content-blocks.js.map +7 -1
  861. package/build-module/components/provider/index.js +257 -317
  862. package/build-module/components/provider/index.js.map +7 -1
  863. package/build-module/components/provider/navigation-block-editing-mode.js +14 -25
  864. package/build-module/components/provider/navigation-block-editing-mode.js.map +7 -1
  865. package/build-module/components/provider/use-auto-switch-editor-sidebars.js +28 -33
  866. package/build-module/components/provider/use-auto-switch-editor-sidebars.js.map +7 -1
  867. package/build-module/components/provider/use-block-editor-settings.js +223 -166
  868. package/build-module/components/provider/use-block-editor-settings.js.map +7 -1
  869. package/build-module/components/provider/use-hide-blocks-from-inserter.js +65 -42
  870. package/build-module/components/provider/use-hide-blocks-from-inserter.js.map +7 -1
  871. package/build-module/components/provider/use-post-content-blocks.js +31 -25
  872. package/build-module/components/provider/use-post-content-blocks.js.map +7 -1
  873. package/build-module/components/provider/with-registry-provider.js +34 -41
  874. package/build-module/components/provider/with-registry-provider.js.map +7 -1
  875. package/build-module/components/resizable-editor/index.js +70 -80
  876. package/build-module/components/resizable-editor/index.js.map +7 -1
  877. package/build-module/components/resizable-editor/resize-handle.js +27 -30
  878. package/build-module/components/resizable-editor/resize-handle.js.map +7 -1
  879. package/build-module/components/save-publish-panels/index.js +56 -62
  880. package/build-module/components/save-publish-panels/index.js.map +7 -1
  881. package/build-module/components/sidebar/constants.js +7 -4
  882. package/build-module/components/sidebar/constants.js.map +7 -1
  883. package/build-module/components/sidebar/header.js +38 -45
  884. package/build-module/components/sidebar/header.js.map +7 -1
  885. package/build-module/components/sidebar/index.js +136 -125
  886. package/build-module/components/sidebar/index.js.map +7 -1
  887. package/build-module/components/sidebar/post-summary.js +86 -87
  888. package/build-module/components/sidebar/post-summary.js.map +7 -1
  889. package/build-module/components/site-discussion/index.js +110 -107
  890. package/build-module/components/site-discussion/index.js.map +7 -1
  891. package/build-module/components/start-page-options/index.js +114 -137
  892. package/build-module/components/start-page-options/index.js.map +7 -1
  893. package/build-module/components/start-template-options/index.js +148 -150
  894. package/build-module/components/start-template-options/index.js.map +7 -1
  895. package/build-module/components/table-of-contents/index.js +50 -63
  896. package/build-module/components/table-of-contents/index.js.map +7 -1
  897. package/build-module/components/table-of-contents/panel.js +73 -88
  898. package/build-module/components/table-of-contents/panel.js.map +7 -1
  899. package/build-module/components/template-content-panel/index.js +57 -54
  900. package/build-module/components/template-content-panel/index.js.map +7 -1
  901. package/build-module/components/template-part-content-panel/index.js +35 -48
  902. package/build-module/components/template-part-content-panel/index.js.map +7 -1
  903. package/build-module/components/template-part-menu-items/convert-to-regular.js +26 -27
  904. package/build-module/components/template-part-menu-items/convert-to-regular.js.map +7 -1
  905. package/build-module/components/template-part-menu-items/convert-to-template-part.js +56 -61
  906. package/build-module/components/template-part-menu-items/convert-to-template-part.js.map +7 -1
  907. package/build-module/components/template-part-menu-items/index.js +38 -47
  908. package/build-module/components/template-part-menu-items/index.js.map +7 -1
  909. package/build-module/components/template-validation-notice/index.js +55 -41
  910. package/build-module/components/template-validation-notice/index.js.map +7 -1
  911. package/build-module/components/text-editor/index.js +38 -54
  912. package/build-module/components/text-editor/index.js.map +7 -1
  913. package/build-module/components/theme-support-check/index.js +13 -38
  914. package/build-module/components/theme-support-check/index.js.map +7 -1
  915. package/build-module/components/time-to-read/index.js +36 -48
  916. package/build-module/components/time-to-read/index.js.map +7 -1
  917. package/build-module/components/unsaved-changes-warning/index.js +16 -34
  918. package/build-module/components/unsaved-changes-warning/index.js.map +7 -1
  919. package/build-module/components/visual-editor/edit-template-blocks-notification.js +44 -63
  920. package/build-module/components/visual-editor/edit-template-blocks-notification.js.map +7 -1
  921. package/build-module/components/visual-editor/index.js +256 -225
  922. package/build-module/components/visual-editor/index.js.map +7 -1
  923. package/build-module/components/visual-editor/use-select-nearest-editable-block.js +58 -64
  924. package/build-module/components/visual-editor/use-select-nearest-editable-block.js.map +7 -1
  925. package/build-module/components/visual-editor/use-zoom-out-mode-exit.js +31 -43
  926. package/build-module/components/visual-editor/use-zoom-out-mode-exit.js.map +7 -1
  927. package/build-module/components/word-count/index.js +16 -32
  928. package/build-module/components/word-count/index.js.map +7 -1
  929. package/build-module/components/zoom-out-toggle/index.js +72 -66
  930. package/build-module/components/zoom-out-toggle/index.js.map +7 -1
  931. package/build-module/dataviews/api.js +26 -77
  932. package/build-module/dataviews/api.js.map +7 -1
  933. package/build-module/dataviews/fields/content-preview/content-preview-view.js +66 -85
  934. package/build-module/dataviews/fields/content-preview/content-preview-view.js.map +7 -1
  935. package/build-module/dataviews/fields/content-preview/index.js +10 -15
  936. package/build-module/dataviews/fields/content-preview/index.js.map +7 -1
  937. package/build-module/dataviews/store/private-actions.js +113 -43
  938. package/build-module/dataviews/store/private-actions.js.map +7 -1
  939. package/build-module/dataviews/store/private-selectors.js +11 -12
  940. package/build-module/dataviews/store/private-selectors.js.map +7 -1
  941. package/build-module/dataviews/store/reducer.js +32 -26
  942. package/build-module/dataviews/store/reducer.js.map +7 -1
  943. package/build-module/hooks/custom-sources-backwards-compatibility.js +70 -83
  944. package/build-module/hooks/custom-sources-backwards-compatibility.js.map +7 -1
  945. package/build-module/hooks/default-autocompleters.js +9 -15
  946. package/build-module/hooks/default-autocompleters.js.map +7 -1
  947. package/build-module/hooks/index.js +7 -9
  948. package/build-module/hooks/index.js.map +7 -1
  949. package/build-module/hooks/media-upload.js +8 -7
  950. package/build-module/hooks/media-upload.js.map +7 -1
  951. package/build-module/hooks/navigation-link-view-button.js +46 -63
  952. package/build-module/hooks/navigation-link-view-button.js.map +7 -1
  953. package/build-module/hooks/pattern-overrides.js +48 -67
  954. package/build-module/hooks/pattern-overrides.js.map +7 -1
  955. package/build-module/hooks/template-part-navigation-edit-button.js +97 -0
  956. package/build-module/hooks/template-part-navigation-edit-button.js.map +7 -0
  957. package/build-module/index.js +13 -15
  958. package/build-module/index.js.map +7 -1
  959. package/build-module/lock-unlock.js +8 -7
  960. package/build-module/lock-unlock.js.map +7 -1
  961. package/build-module/private-apis.js +31 -31
  962. package/build-module/private-apis.js.map +7 -1
  963. package/build-module/store/actions.js +424 -872
  964. package/build-module/store/actions.js.map +7 -1
  965. package/build-module/store/constants.js +36 -27
  966. package/build-module/store/constants.js.map +7 -1
  967. package/build-module/store/defaults.js +8 -28
  968. package/build-module/store/defaults.js.map +7 -1
  969. package/build-module/store/index.js +15 -30
  970. package/build-module/store/index.js.map +7 -1
  971. package/build-module/store/local-autosave.js +18 -24
  972. package/build-module/store/local-autosave.js.map +7 -1
  973. package/build-module/store/private-actions.js +242 -257
  974. package/build-module/store/private-actions.js.map +7 -1
  975. package/build-module/store/private-selectors.js +157 -174
  976. package/build-module/store/private-selectors.js.map +7 -1
  977. package/build-module/store/reducer.js +89 -267
  978. package/build-module/store/reducer.js.map +7 -1
  979. package/build-module/store/selectors.js +712 -1433
  980. package/build-module/store/selectors.js.map +7 -1
  981. package/build-module/store/utils/is-template-revertable.js +6 -15
  982. package/build-module/store/utils/is-template-revertable.js.map +7 -1
  983. package/build-module/store/utils/notice-builder.js +52 -91
  984. package/build-module/store/utils/notice-builder.js.map +7 -1
  985. package/build-module/utils/get-item-title.js +10 -19
  986. package/build-module/utils/get-item-title.js.map +7 -1
  987. package/build-module/utils/get-template-info.js +14 -38
  988. package/build-module/utils/get-template-info.js.map +7 -1
  989. package/build-module/utils/get-template-part-icon.js +14 -16
  990. package/build-module/utils/get-template-part-icon.js.map +7 -1
  991. package/build-module/utils/index.js +9 -8
  992. package/build-module/utils/index.js.map +7 -1
  993. package/build-module/utils/media-sideload/index.js +8 -14
  994. package/build-module/utils/media-sideload/index.js.map +7 -1
  995. package/build-module/utils/media-upload/index.js +26 -56
  996. package/build-module/utils/media-upload/index.js.map +7 -1
  997. package/build-module/utils/pageTypeBadge.js +16 -28
  998. package/build-module/utils/pageTypeBadge.js.map +7 -1
  999. package/build-module/utils/search-templates.js +12 -41
  1000. package/build-module/utils/search-templates.js.map +7 -1
  1001. package/build-module/utils/terms.js +32 -55
  1002. package/build-module/utils/terms.js.map +7 -1
  1003. package/build-module/utils/url.js +11 -28
  1004. package/build-module/utils/url.js.map +7 -1
  1005. package/build-style/style-rtl.css +327 -136
  1006. package/build-style/style.css +327 -136
  1007. package/build-types/bindings/entity.d.ts +16 -0
  1008. package/build-types/bindings/entity.d.ts.map +1 -0
  1009. package/build-types/bindings/post-data.d.ts +16 -0
  1010. package/build-types/bindings/post-meta.d.ts +13 -0
  1011. package/build-types/components/{preferences-modal/block-visibility.d.ts → block-visibility/index.d.ts} +1 -1
  1012. package/build-types/components/block-visibility/index.d.ts.map +1 -0
  1013. package/build-types/components/collab-sidebar/add-comment.d.ts +6 -14
  1014. package/build-types/components/collab-sidebar/add-comment.d.ts.map +1 -1
  1015. package/build-types/components/collab-sidebar/comment-form.d.ts +9 -18
  1016. package/build-types/components/collab-sidebar/comment-form.d.ts.map +1 -1
  1017. package/build-types/components/collab-sidebar/comment-menu-item.d.ts +5 -0
  1018. package/build-types/components/collab-sidebar/comment-menu-item.d.ts.map +1 -0
  1019. package/build-types/components/collab-sidebar/comments.d.ts +10 -1
  1020. package/build-types/components/collab-sidebar/comments.d.ts.map +1 -1
  1021. package/build-types/components/collab-sidebar/hooks.d.ts +33 -0
  1022. package/build-types/components/collab-sidebar/hooks.d.ts.map +1 -1
  1023. package/build-types/components/collab-sidebar/index.d.ts.map +1 -1
  1024. package/build-types/components/collab-sidebar/utils.d.ts +20 -0
  1025. package/build-types/components/collab-sidebar/utils.d.ts.map +1 -1
  1026. package/build-types/components/document-tools/index.d.ts.map +1 -1
  1027. package/build-types/components/header/index.d.ts.map +1 -1
  1028. package/build-types/components/post-excerpt/panel.d.ts.map +1 -1
  1029. package/build-types/components/post-template/block-theme.d.ts.map +1 -1
  1030. package/build-types/components/post-template/hooks.d.ts.map +1 -1
  1031. package/build-types/components/provider/disable-non-page-content-blocks.d.ts.map +1 -1
  1032. package/build-types/components/provider/use-hide-blocks-from-inserter.d.ts.map +1 -1
  1033. package/build-types/components/visual-editor/index.d.ts.map +1 -1
  1034. package/build-types/hooks/template-part-navigation-edit-button.d.ts +2 -0
  1035. package/build-types/hooks/template-part-navigation-edit-button.d.ts.map +1 -0
  1036. package/build-types/store/actions.d.ts.map +1 -1
  1037. package/package.json +59 -39
  1038. package/src/bindings/api.js +2 -2
  1039. package/src/bindings/entity.js +89 -0
  1040. package/src/bindings/post-data.js +23 -0
  1041. package/src/bindings/post-meta.js +19 -0
  1042. package/src/components/autocompleters/style.scss +2 -0
  1043. package/src/components/block-settings-menu/style.scss +2 -0
  1044. package/src/components/{preferences-modal/block-visibility.js → block-visibility/index.js} +37 -5
  1045. package/src/components/block-visibility/style.scss +25 -0
  1046. package/src/components/blog-title/style.scss +2 -0
  1047. package/src/components/collab-sidebar/add-comment.js +18 -17
  1048. package/src/components/collab-sidebar/comment-author-info.js +2 -2
  1049. package/src/components/collab-sidebar/comment-form.js +15 -17
  1050. package/src/components/collab-sidebar/comment-indicator-toolbar.js +2 -2
  1051. package/src/components/collab-sidebar/{comment-button.js → comment-menu-item.js} +4 -4
  1052. package/src/components/collab-sidebar/comments.js +413 -183
  1053. package/src/components/collab-sidebar/hooks.js +343 -22
  1054. package/src/components/collab-sidebar/index.js +94 -190
  1055. package/src/components/collab-sidebar/style.scss +44 -26
  1056. package/src/components/collab-sidebar/utils.js +55 -0
  1057. package/src/components/collapsible-block-toolbar/style.scss +5 -1
  1058. package/src/components/commands/index.js +2 -2
  1059. package/src/components/document-bar/style.scss +5 -0
  1060. package/src/components/document-outline/style.scss +3 -0
  1061. package/src/components/document-tools/index.js +1 -20
  1062. package/src/components/document-tools/style.scss +4 -0
  1063. package/src/components/editor-help/style.scss +3 -0
  1064. package/src/components/editor-interface/style.scss +2 -0
  1065. package/src/components/editor-notices/style.scss +3 -0
  1066. package/src/components/entities-saved-states/style.scss +3 -0
  1067. package/src/components/error-boundary/style.scss +3 -0
  1068. package/src/components/header/index.js +3 -8
  1069. package/src/components/header/style.scss +6 -0
  1070. package/src/components/inserter-sidebar/style.scss +2 -0
  1071. package/src/components/keyboard-shortcut-help-modal/style.scss +2 -0
  1072. package/src/components/list-view-sidebar/style.scss +4 -1
  1073. package/src/components/page-attributes/style.scss +2 -0
  1074. package/src/components/post-actions/style.scss +2 -0
  1075. package/src/components/post-author/style.scss +2 -0
  1076. package/src/components/post-card-panel/style.scss +4 -0
  1077. package/src/components/post-content-information/style.scss +2 -0
  1078. package/src/components/post-discussion/style.scss +2 -0
  1079. package/src/components/post-excerpt/panel.js +12 -6
  1080. package/src/components/post-excerpt/style.scss +2 -0
  1081. package/src/components/post-featured-image/style.scss +7 -0
  1082. package/src/components/post-format/style.scss +2 -0
  1083. package/src/components/post-last-edited-panel/style.scss +2 -0
  1084. package/src/components/post-last-revision/style.scss +3 -0
  1085. package/src/components/post-locked-modal/style.scss +2 -0
  1086. package/src/components/post-panel-row/style.scss +2 -0
  1087. package/src/components/post-panel-section/style.scss +2 -0
  1088. package/src/components/post-publish-button/post-publish-button-or-toggle.js +1 -1
  1089. package/src/components/post-publish-panel/style.scss +5 -0
  1090. package/src/components/post-saved-state/style.scss +4 -0
  1091. package/src/components/post-schedule/style.scss +2 -0
  1092. package/src/components/post-status/style.scss +3 -0
  1093. package/src/components/post-sticky/style.scss +3 -0
  1094. package/src/components/post-sync-status/style.scss +2 -0
  1095. package/src/components/post-taxonomies/style.scss +2 -0
  1096. package/src/components/post-template/block-theme.js +45 -3
  1097. package/src/components/post-template/hooks.js +48 -21
  1098. package/src/components/post-template/style.scss +5 -0
  1099. package/src/components/post-text-editor/style.scss +4 -0
  1100. package/src/components/post-title/style.scss +2 -0
  1101. package/src/components/post-url/style.scss +2 -0
  1102. package/src/components/posts-per-page/style.scss +2 -0
  1103. package/src/components/preferences-modal/index.js +1 -1
  1104. package/src/components/provider/disable-non-page-content-blocks.js +7 -13
  1105. package/src/components/provider/use-hide-blocks-from-inserter.js +37 -6
  1106. package/src/components/resizable-editor/style.scss +4 -0
  1107. package/src/components/save-publish-panels/style.scss +4 -0
  1108. package/src/components/sidebar/style.scss +3 -0
  1109. package/src/components/site-discussion/style.scss +2 -1
  1110. package/src/components/start-page-options/style.scss +5 -0
  1111. package/src/components/start-template-options/style.scss +5 -0
  1112. package/src/components/table-of-contents/style.scss +5 -0
  1113. package/src/components/text-editor/style.scss +6 -0
  1114. package/src/components/visual-editor/index.js +11 -21
  1115. package/src/components/visual-editor/style.scss +3 -1
  1116. package/src/dataviews/fields/content-preview/style.scss +2 -0
  1117. package/src/hooks/index.js +1 -0
  1118. package/src/hooks/template-part-navigation-edit-button.js +145 -0
  1119. package/src/store/actions.js +6 -1
  1120. package/src/style.scss +57 -56
  1121. package/tsconfig.tsbuildinfo +1 -1
  1122. package/build/bindings/term-data.js +0 -171
  1123. package/build/bindings/term-data.js.map +0 -1
  1124. package/build/components/block-settings-menu/content-only-settings-menu.native.js +0 -11
  1125. package/build/components/block-settings-menu/content-only-settings-menu.native.js.map +0 -1
  1126. package/build/components/collab-sidebar/comment-button.js +0 -42
  1127. package/build/components/collab-sidebar/comment-button.js.map +0 -1
  1128. package/build/components/commands/index.native.js +0 -9
  1129. package/build/components/commands/index.native.js.map +0 -1
  1130. package/build/components/deprecated.native.js +0 -121
  1131. package/build/components/deprecated.native.js.map +0 -1
  1132. package/build/components/editor-help/add-blocks.native.js +0 -41
  1133. package/build/components/editor-help/add-blocks.native.js.map +0 -1
  1134. package/build/components/editor-help/customize-blocks.native.js +0 -41
  1135. package/build/components/editor-help/customize-blocks.native.js.map +0 -1
  1136. package/build/components/editor-help/help-detail-navigation-screen.native.js +0 -69
  1137. package/build/components/editor-help/help-detail-navigation-screen.native.js.map +0 -1
  1138. package/build/components/editor-help/help-get-support-button.native.js +0 -41
  1139. package/build/components/editor-help/help-get-support-button.native.js.map +0 -1
  1140. package/build/components/editor-help/help-section-title.native.js +0 -37
  1141. package/build/components/editor-help/help-section-title.native.js.map +0 -1
  1142. package/build/components/editor-help/help-topic-row.native.js +0 -42
  1143. package/build/components/editor-help/help-topic-row.native.js.map +0 -1
  1144. package/build/components/editor-help/icon-move-blocks.native.js +0 -19
  1145. package/build/components/editor-help/icon-move-blocks.native.js.map +0 -1
  1146. package/build/components/editor-help/index.native.js +0 -173
  1147. package/build/components/editor-help/index.native.js.map +0 -1
  1148. package/build/components/editor-help/intro-to-blocks.native.js +0 -70
  1149. package/build/components/editor-help/intro-to-blocks.native.js.map +0 -1
  1150. package/build/components/editor-help/move-blocks.native.js +0 -52
  1151. package/build/components/editor-help/move-blocks.native.js.map +0 -1
  1152. package/build/components/editor-help/remove-blocks.native.js +0 -39
  1153. package/build/components/editor-help/remove-blocks.native.js.map +0 -1
  1154. package/build/components/editor-help/view-sections.native.js +0 -80
  1155. package/build/components/editor-help/view-sections.native.js.map +0 -1
  1156. package/build/components/error-boundary/index.native.js +0 -143
  1157. package/build/components/error-boundary/index.native.js.map +0 -1
  1158. package/build/components/index.native.js +0 -85
  1159. package/build/components/index.native.js.map +0 -1
  1160. package/build/components/offline-status/index.native.js +0 -83
  1161. package/build/components/offline-status/index.native.js.map +0 -1
  1162. package/build/components/post-title/index.native.js +0 -251
  1163. package/build/components/post-title/index.native.js.map +0 -1
  1164. package/build/components/preferences-modal/block-visibility.js +0 -88
  1165. package/build/components/preferences-modal/block-visibility.js.map +0 -1
  1166. package/build/components/provider/index.native.js +0 -426
  1167. package/build/components/provider/index.native.js.map +0 -1
  1168. package/build/components/provider/use-block-editor-settings.native.js +0 -46
  1169. package/build/components/provider/use-block-editor-settings.native.js.map +0 -1
  1170. package/build/components/template-part-menu-items/index.native.js +0 -10
  1171. package/build/components/template-part-menu-items/index.native.js.map +0 -1
  1172. package/build/hooks/index.native.js +0 -2
  1173. package/build/hooks/index.native.js.map +0 -1
  1174. package/build/index.native.js +0 -56
  1175. package/build/index.native.js.map +0 -1
  1176. package/build/private-apis.native.js +0 -44
  1177. package/build/private-apis.native.js.map +0 -1
  1178. package/build/store/actions.native.js +0 -51
  1179. package/build/store/actions.native.js.map +0 -1
  1180. package/build/store/reducer.native.js +0 -105
  1181. package/build/store/reducer.native.js.map +0 -1
  1182. package/build/store/selectors.native.js +0 -70
  1183. package/build/store/selectors.native.js.map +0 -1
  1184. package/build/utils/index.native.js +0 -14
  1185. package/build/utils/index.native.js.map +0 -1
  1186. package/build/utils/media-sideload/index.native.js +0 -8
  1187. package/build/utils/media-sideload/index.native.js.map +0 -1
  1188. package/build/utils/media-upload/index.native.js +0 -8
  1189. package/build/utils/media-upload/index.native.js.map +0 -1
  1190. package/build-module/bindings/term-data.js +0 -165
  1191. package/build-module/bindings/term-data.js.map +0 -1
  1192. package/build-module/components/block-settings-menu/content-only-settings-menu.native.js +0 -5
  1193. package/build-module/components/block-settings-menu/content-only-settings-menu.native.js.map +0 -1
  1194. package/build-module/components/collab-sidebar/comment-button.js +0 -35
  1195. package/build-module/components/collab-sidebar/comment-button.js.map +0 -1
  1196. package/build-module/components/commands/index.native.js +0 -3
  1197. package/build-module/components/commands/index.native.js.map +0 -1
  1198. package/build-module/components/deprecated.native.js +0 -7
  1199. package/build-module/components/deprecated.native.js.map +0 -1
  1200. package/build-module/components/editor-help/add-blocks.native.js +0 -33
  1201. package/build-module/components/editor-help/add-blocks.native.js.map +0 -1
  1202. package/build-module/components/editor-help/customize-blocks.native.js +0 -33
  1203. package/build-module/components/editor-help/customize-blocks.native.js.map +0 -1
  1204. package/build-module/components/editor-help/help-detail-navigation-screen.native.js +0 -61
  1205. package/build-module/components/editor-help/help-detail-navigation-screen.native.js.map +0 -1
  1206. package/build-module/components/editor-help/help-get-support-button.native.js +0 -33
  1207. package/build-module/components/editor-help/help-get-support-button.native.js.map +0 -1
  1208. package/build-module/components/editor-help/help-section-title.native.js +0 -29
  1209. package/build-module/components/editor-help/help-section-title.native.js.map +0 -1
  1210. package/build-module/components/editor-help/help-topic-row.native.js +0 -35
  1211. package/build-module/components/editor-help/help-topic-row.native.js.map +0 -1
  1212. package/build-module/components/editor-help/icon-move-blocks.native.js +0 -13
  1213. package/build-module/components/editor-help/icon-move-blocks.native.js.map +0 -1
  1214. package/build-module/components/editor-help/index.native.js +0 -165
  1215. package/build-module/components/editor-help/index.native.js.map +0 -1
  1216. package/build-module/components/editor-help/intro-to-blocks.native.js +0 -62
  1217. package/build-module/components/editor-help/intro-to-blocks.native.js.map +0 -1
  1218. package/build-module/components/editor-help/move-blocks.native.js +0 -44
  1219. package/build-module/components/editor-help/move-blocks.native.js.map +0 -1
  1220. package/build-module/components/editor-help/remove-blocks.native.js +0 -31
  1221. package/build-module/components/editor-help/remove-blocks.native.js.map +0 -1
  1222. package/build-module/components/editor-help/view-sections.native.js +0 -69
  1223. package/build-module/components/editor-help/view-sections.native.js.map +0 -1
  1224. package/build-module/components/error-boundary/index.native.js +0 -135
  1225. package/build-module/components/error-boundary/index.native.js.map +0 -1
  1226. package/build-module/components/index.native.js +0 -15
  1227. package/build-module/components/index.native.js.map +0 -1
  1228. package/build-module/components/offline-status/index.native.js +0 -77
  1229. package/build-module/components/offline-status/index.native.js.map +0 -1
  1230. package/build-module/components/post-title/index.native.js +0 -243
  1231. package/build-module/components/post-title/index.native.js.map +0 -1
  1232. package/build-module/components/preferences-modal/block-visibility.js +0 -81
  1233. package/build-module/components/preferences-modal/block-visibility.js.map +0 -1
  1234. package/build-module/components/provider/index.native.js +0 -416
  1235. package/build-module/components/provider/index.native.js.map +0 -1
  1236. package/build-module/components/provider/use-block-editor-settings.native.js +0 -38
  1237. package/build-module/components/provider/use-block-editor-settings.native.js.map +0 -1
  1238. package/build-module/components/template-part-menu-items/index.native.js +0 -4
  1239. package/build-module/components/template-part-menu-items/index.native.js.map +0 -1
  1240. package/build-module/hooks/index.native.js +0 -2
  1241. package/build-module/hooks/index.native.js.map +0 -1
  1242. package/build-module/index.native.js +0 -16
  1243. package/build-module/index.native.js.map +0 -1
  1244. package/build-module/private-apis.native.js +0 -34
  1245. package/build-module/private-apis.native.js.map +0 -1
  1246. package/build-module/store/actions.native.js +0 -27
  1247. package/build-module/store/actions.native.js.map +0 -1
  1248. package/build-module/store/reducer.native.js +0 -81
  1249. package/build-module/store/reducer.native.js.map +0 -1
  1250. package/build-module/store/selectors.native.js +0 -49
  1251. package/build-module/store/selectors.native.js.map +0 -1
  1252. package/build-module/utils/index.native.js +0 -6
  1253. package/build-module/utils/index.native.js.map +0 -1
  1254. package/build-module/utils/media-sideload/index.native.js +0 -2
  1255. package/build-module/utils/media-sideload/index.native.js.map +0 -1
  1256. package/build-module/utils/media-upload/index.native.js +0 -2
  1257. package/build-module/utils/media-upload/index.native.js.map +0 -1
  1258. package/build-types/bindings/term-data.d.ts +0 -25
  1259. package/build-types/bindings/term-data.d.ts.map +0 -1
  1260. package/build-types/components/collab-sidebar/comment-button.d.ts +0 -5
  1261. package/build-types/components/collab-sidebar/comment-button.d.ts.map +0 -1
  1262. package/build-types/components/preferences-modal/block-visibility.d.ts.map +0 -1
  1263. package/src/bindings/term-data.js +0 -159
@@ -1 +1,7 @@
1
- {"version":3,"names":["v4","uuid","select","dispatch","store","coreDataStore","uploadMedia","editorStore","noop","mediaUpload","additionalData","allowedTypes","filesList","maxUploadFileSize","onError","onFileChange","onSuccess","multiple","receiveEntityRecords","getCurrentPost","getEditorSettings","lockPostAutosaving","unlockPostAutosaving","lockPostSaving","unlockPostSaving","wpAllowedMimeTypes","allowedMimeTypes","lockKey","imageIsUploading","currentPost","currentPostId","id","wp_id","setSaveLock","postData","post","clearSaveLock","file","entityFiles","filter","_file","length","invalidateCache","undefined","message"],"sources":["@wordpress/editor/src/utils/media-upload/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { v4 as uuid } from 'uuid';\n\n/**\n * WordPress dependencies\n */\nimport { select, dispatch } from '@wordpress/data';\nimport { store as coreDataStore } from '@wordpress/core-data';\nimport { uploadMedia } from '@wordpress/media-utils';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nconst noop = () => {};\n\n/**\n * Upload a media file when the file upload button is activated.\n * Wrapper around uploadMedia() that injects the current post ID.\n *\n * @param {Object} $0 Parameters object passed to the function.\n * @param {?Object} $0.additionalData Additional data to include in the request.\n * @param {string} $0.allowedTypes Array with the types of media that can be uploaded, if unset all types are allowed.\n * @param {Array} $0.filesList List of files.\n * @param {?number} $0.maxUploadFileSize Maximum upload size in bytes allowed for the site.\n * @param {Function} $0.onError Function called when an error happens.\n * @param {Function} $0.onFileChange Function called each time a file or a temporary representation of the file is available.\n * @param {Function} $0.onSuccess Function called after the final representation of the file is available.\n * @param {boolean} $0.multiple Whether to allow multiple files to be uploaded.\n */\nexport default function mediaUpload( {\n\tadditionalData = {},\n\tallowedTypes,\n\tfilesList,\n\tmaxUploadFileSize,\n\tonError = noop,\n\tonFileChange,\n\tonSuccess,\n\tmultiple = true,\n} ) {\n\tconst { receiveEntityRecords } = dispatch( coreDataStore );\n\tconst { getCurrentPost, getEditorSettings } = select( editorStore );\n\tconst {\n\t\tlockPostAutosaving,\n\t\tunlockPostAutosaving,\n\t\tlockPostSaving,\n\t\tunlockPostSaving,\n\t} = dispatch( editorStore );\n\n\tconst wpAllowedMimeTypes = getEditorSettings().allowedMimeTypes;\n\tconst lockKey = `image-upload-${ uuid() }`;\n\tlet imageIsUploading = false;\n\tmaxUploadFileSize =\n\t\tmaxUploadFileSize || getEditorSettings().maxUploadFileSize;\n\tconst currentPost = getCurrentPost();\n\t// Templates and template parts' numerical ID is stored in `wp_id`.\n\tconst currentPostId =\n\t\ttypeof currentPost?.id === 'number'\n\t\t\t? currentPost.id\n\t\t\t: currentPost?.wp_id;\n\tconst setSaveLock = () => {\n\t\tlockPostSaving( lockKey );\n\t\tlockPostAutosaving( lockKey );\n\t\timageIsUploading = true;\n\t};\n\n\tconst postData = currentPostId ? { post: currentPostId } : {};\n\tconst clearSaveLock = () => {\n\t\tunlockPostSaving( lockKey );\n\t\tunlockPostAutosaving( lockKey );\n\t\timageIsUploading = false;\n\t};\n\n\tuploadMedia( {\n\t\tallowedTypes,\n\t\tfilesList,\n\t\tonFileChange: ( file ) => {\n\t\t\tif ( ! imageIsUploading ) {\n\t\t\t\tsetSaveLock();\n\t\t\t} else {\n\t\t\t\tclearSaveLock();\n\t\t\t}\n\t\t\tonFileChange?.( file );\n\n\t\t\t// Files are initially received by `onFileChange` as a blob.\n\t\t\t// After that the function is called a second time with the file as an entity.\n\t\t\t// For core-data, we only care about receiving/invalidating entities.\n\t\t\tconst entityFiles = file.filter( ( _file ) => _file?.id );\n\t\t\tif ( entityFiles?.length ) {\n\t\t\t\tconst invalidateCache = true;\n\t\t\t\treceiveEntityRecords(\n\t\t\t\t\t'postType',\n\t\t\t\t\t'attachment',\n\t\t\t\t\tentityFiles,\n\t\t\t\t\tundefined,\n\t\t\t\t\tinvalidateCache\n\t\t\t\t);\n\t\t\t}\n\t\t},\n\t\tonSuccess,\n\t\tadditionalData: {\n\t\t\t...postData,\n\t\t\t...additionalData,\n\t\t},\n\t\tmaxUploadFileSize,\n\t\tonError: ( { message } ) => {\n\t\t\tclearSaveLock();\n\t\t\tonError( message );\n\t\t},\n\t\twpAllowedMimeTypes,\n\t\tmultiple,\n\t} );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,IAAIC,IAAI,QAAQ,MAAM;;AAEjC;AACA;AACA;AACA,SAASC,MAAM,EAAEC,QAAQ,QAAQ,iBAAiB;AAClD,SAASC,KAAK,IAAIC,aAAa,QAAQ,sBAAsB;AAC7D,SAASC,WAAW,QAAQ,wBAAwB;;AAEpD;AACA;AACA;AACA,SAASF,KAAK,IAAIG,WAAW,QAAQ,aAAa;AAElD,MAAMC,IAAI,GAAGA,CAAA,KAAM,CAAC,CAAC;;AAErB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAASC,WAAWA,CAAE;EACpCC,cAAc,GAAG,CAAC,CAAC;EACnBC,YAAY;EACZC,SAAS;EACTC,iBAAiB;EACjBC,OAAO,GAAGN,IAAI;EACdO,YAAY;EACZC,SAAS;EACTC,QAAQ,GAAG;AACZ,CAAC,EAAG;EACH,MAAM;IAAEC;EAAqB,CAAC,GAAGf,QAAQ,CAAEE,aAAc,CAAC;EAC1D,MAAM;IAAEc,cAAc;IAAEC;EAAkB,CAAC,GAAGlB,MAAM,CAAEK,WAAY,CAAC;EACnE,MAAM;IACLc,kBAAkB;IAClBC,oBAAoB;IACpBC,cAAc;IACdC;EACD,CAAC,GAAGrB,QAAQ,CAAEI,WAAY,CAAC;EAE3B,MAAMkB,kBAAkB,GAAGL,iBAAiB,CAAC,CAAC,CAACM,gBAAgB;EAC/D,MAAMC,OAAO,GAAG,gBAAiB1B,IAAI,CAAC,CAAC,EAAG;EAC1C,IAAI2B,gBAAgB,GAAG,KAAK;EAC5Bf,iBAAiB,GAChBA,iBAAiB,IAAIO,iBAAiB,CAAC,CAAC,CAACP,iBAAiB;EAC3D,MAAMgB,WAAW,GAAGV,cAAc,CAAC,CAAC;EACpC;EACA,MAAMW,aAAa,GAClB,OAAOD,WAAW,EAAEE,EAAE,KAAK,QAAQ,GAChCF,WAAW,CAACE,EAAE,GACdF,WAAW,EAAEG,KAAK;EACtB,MAAMC,WAAW,GAAGA,CAAA,KAAM;IACzBV,cAAc,CAAEI,OAAQ,CAAC;IACzBN,kBAAkB,CAAEM,OAAQ,CAAC;IAC7BC,gBAAgB,GAAG,IAAI;EACxB,CAAC;EAED,MAAMM,QAAQ,GAAGJ,aAAa,GAAG;IAAEK,IAAI,EAAEL;EAAc,CAAC,GAAG,CAAC,CAAC;EAC7D,MAAMM,aAAa,GAAGA,CAAA,KAAM;IAC3BZ,gBAAgB,CAAEG,OAAQ,CAAC;IAC3BL,oBAAoB,CAAEK,OAAQ,CAAC;IAC/BC,gBAAgB,GAAG,KAAK;EACzB,CAAC;EAEDtB,WAAW,CAAE;IACZK,YAAY;IACZC,SAAS;IACTG,YAAY,EAAIsB,IAAI,IAAM;MACzB,IAAK,CAAET,gBAAgB,EAAG;QACzBK,WAAW,CAAC,CAAC;MACd,CAAC,MAAM;QACNG,aAAa,CAAC,CAAC;MAChB;MACArB,YAAY,GAAIsB,IAAK,CAAC;;MAEtB;MACA;MACA;MACA,MAAMC,WAAW,GAAGD,IAAI,CAACE,MAAM,CAAIC,KAAK,IAAMA,KAAK,EAAET,EAAG,CAAC;MACzD,IAAKO,WAAW,EAAEG,MAAM,EAAG;QAC1B,MAAMC,eAAe,GAAG,IAAI;QAC5BxB,oBAAoB,CACnB,UAAU,EACV,YAAY,EACZoB,WAAW,EACXK,SAAS,EACTD,eACD,CAAC;MACF;IACD,CAAC;IACD1B,SAAS;IACTN,cAAc,EAAE;MACf,GAAGwB,QAAQ;MACX,GAAGxB;IACJ,CAAC;IACDG,iBAAiB;IACjBC,OAAO,EAAEA,CAAE;MAAE8B;IAAQ,CAAC,KAAM;MAC3BR,aAAa,CAAC,CAAC;MACftB,OAAO,CAAE8B,OAAQ,CAAC;IACnB,CAAC;IACDnB,kBAAkB;IAClBR;EACD,CAAE,CAAC;AACJ","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/utils/media-upload/index.js"],
4
+ "sourcesContent": ["/**\n * External dependencies\n */\nimport { v4 as uuid } from 'uuid';\n\n/**\n * WordPress dependencies\n */\nimport { select, dispatch } from '@wordpress/data';\nimport { store as coreDataStore } from '@wordpress/core-data';\nimport { uploadMedia } from '@wordpress/media-utils';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nconst noop = () => {};\n\n/**\n * Upload a media file when the file upload button is activated.\n * Wrapper around uploadMedia() that injects the current post ID.\n *\n * @param {Object} $0 Parameters object passed to the function.\n * @param {?Object} $0.additionalData Additional data to include in the request.\n * @param {string} $0.allowedTypes Array with the types of media that can be uploaded, if unset all types are allowed.\n * @param {Array} $0.filesList List of files.\n * @param {?number} $0.maxUploadFileSize Maximum upload size in bytes allowed for the site.\n * @param {Function} $0.onError Function called when an error happens.\n * @param {Function} $0.onFileChange Function called each time a file or a temporary representation of the file is available.\n * @param {Function} $0.onSuccess Function called after the final representation of the file is available.\n * @param {boolean} $0.multiple Whether to allow multiple files to be uploaded.\n */\nexport default function mediaUpload( {\n\tadditionalData = {},\n\tallowedTypes,\n\tfilesList,\n\tmaxUploadFileSize,\n\tonError = noop,\n\tonFileChange,\n\tonSuccess,\n\tmultiple = true,\n} ) {\n\tconst { receiveEntityRecords } = dispatch( coreDataStore );\n\tconst { getCurrentPost, getEditorSettings } = select( editorStore );\n\tconst {\n\t\tlockPostAutosaving,\n\t\tunlockPostAutosaving,\n\t\tlockPostSaving,\n\t\tunlockPostSaving,\n\t} = dispatch( editorStore );\n\n\tconst wpAllowedMimeTypes = getEditorSettings().allowedMimeTypes;\n\tconst lockKey = `image-upload-${ uuid() }`;\n\tlet imageIsUploading = false;\n\tmaxUploadFileSize =\n\t\tmaxUploadFileSize || getEditorSettings().maxUploadFileSize;\n\tconst currentPost = getCurrentPost();\n\t// Templates and template parts' numerical ID is stored in `wp_id`.\n\tconst currentPostId =\n\t\ttypeof currentPost?.id === 'number'\n\t\t\t? currentPost.id\n\t\t\t: currentPost?.wp_id;\n\tconst setSaveLock = () => {\n\t\tlockPostSaving( lockKey );\n\t\tlockPostAutosaving( lockKey );\n\t\timageIsUploading = true;\n\t};\n\n\tconst postData = currentPostId ? { post: currentPostId } : {};\n\tconst clearSaveLock = () => {\n\t\tunlockPostSaving( lockKey );\n\t\tunlockPostAutosaving( lockKey );\n\t\timageIsUploading = false;\n\t};\n\n\tuploadMedia( {\n\t\tallowedTypes,\n\t\tfilesList,\n\t\tonFileChange: ( file ) => {\n\t\t\tif ( ! imageIsUploading ) {\n\t\t\t\tsetSaveLock();\n\t\t\t} else {\n\t\t\t\tclearSaveLock();\n\t\t\t}\n\t\t\tonFileChange?.( file );\n\n\t\t\t// Files are initially received by `onFileChange` as a blob.\n\t\t\t// After that the function is called a second time with the file as an entity.\n\t\t\t// For core-data, we only care about receiving/invalidating entities.\n\t\t\tconst entityFiles = file.filter( ( _file ) => _file?.id );\n\t\t\tif ( entityFiles?.length ) {\n\t\t\t\tconst invalidateCache = true;\n\t\t\t\treceiveEntityRecords(\n\t\t\t\t\t'postType',\n\t\t\t\t\t'attachment',\n\t\t\t\t\tentityFiles,\n\t\t\t\t\tundefined,\n\t\t\t\t\tinvalidateCache\n\t\t\t\t);\n\t\t\t}\n\t\t},\n\t\tonSuccess,\n\t\tadditionalData: {\n\t\t\t...postData,\n\t\t\t...additionalData,\n\t\t},\n\t\tmaxUploadFileSize,\n\t\tonError: ( { message } ) => {\n\t\t\tclearSaveLock();\n\t\t\tonError( message );\n\t\t},\n\t\twpAllowedMimeTypes,\n\t\tmultiple,\n\t} );\n}\n"],
5
+ "mappings": "AAGA,SAAS,MAAM,YAAY;AAK3B,SAAS,QAAQ,gBAAgB;AACjC,SAAS,SAAS,qBAAqB;AACvC,SAAS,mBAAmB;AAK5B,SAAS,SAAS,mBAAmB;AAErC,MAAM,OAAO,MAAM;AAAC;AAgBL,SAAR,YAA8B;AAAA,EACpC,iBAAiB,CAAC;AAAA,EAClB;AAAA,EACA;AAAA,EACA;AAAA,EACA,UAAU;AAAA,EACV;AAAA,EACA;AAAA,EACA,WAAW;AACZ,GAAI;AACH,QAAM,EAAE,qBAAqB,IAAI,SAAU,aAAc;AACzD,QAAM,EAAE,gBAAgB,kBAAkB,IAAI,OAAQ,WAAY;AAClE,QAAM;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD,IAAI,SAAU,WAAY;AAE1B,QAAM,qBAAqB,kBAAkB,EAAE;AAC/C,QAAM,UAAU,gBAAiB,KAAK,CAAE;AACxC,MAAI,mBAAmB;AACvB,sBACC,qBAAqB,kBAAkB,EAAE;AAC1C,QAAM,cAAc,eAAe;AAEnC,QAAM,gBACL,OAAO,aAAa,OAAO,WACxB,YAAY,KACZ,aAAa;AACjB,QAAM,cAAc,MAAM;AACzB,mBAAgB,OAAQ;AACxB,uBAAoB,OAAQ;AAC5B,uBAAmB;AAAA,EACpB;AAEA,QAAM,WAAW,gBAAgB,EAAE,MAAM,cAAc,IAAI,CAAC;AAC5D,QAAM,gBAAgB,MAAM;AAC3B,qBAAkB,OAAQ;AAC1B,yBAAsB,OAAQ;AAC9B,uBAAmB;AAAA,EACpB;AAEA,cAAa;AAAA,IACZ;AAAA,IACA;AAAA,IACA,cAAc,CAAE,SAAU;AACzB,UAAK,CAAE,kBAAmB;AACzB,oBAAY;AAAA,MACb,OAAO;AACN,sBAAc;AAAA,MACf;AACA,qBAAgB,IAAK;AAKrB,YAAM,cAAc,KAAK,OAAQ,CAAE,UAAW,OAAO,EAAG;AACxD,UAAK,aAAa,QAAS;AAC1B,cAAM,kBAAkB;AACxB;AAAA,UACC;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QACD;AAAA,MACD;AAAA,IACD;AAAA,IACA;AAAA,IACA,gBAAgB;AAAA,MACf,GAAG;AAAA,MACH,GAAG;AAAA,IACJ;AAAA,IACA;AAAA,IACA,SAAS,CAAE,EAAE,QAAQ,MAAO;AAC3B,oBAAc;AACd,cAAS,OAAQ;AAAA,IAClB;AAAA,IACA;AAAA,IACA;AAAA,EACD,CAAE;AACH;",
6
+ "names": []
7
+ }
@@ -1,28 +1,13 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
- import { __ } from '@wordpress/i18n';
5
- import { useSelect } from '@wordpress/data';
6
- import { store as coreStore } from '@wordpress/core-data';
7
-
8
- /**
9
- * Custom hook to get the page type badge for the current post on edit site view.
10
- *
11
- * @param {number|string} postId postId of the current post being edited.
12
- */
13
- export default function usePageTypeBadge(postId) {
14
- const {
15
- isFrontPage,
16
- isPostsPage
17
- } = useSelect(select => {
18
- const {
19
- canUser,
20
- getEditedEntityRecord
21
- } = select(coreStore);
22
- const siteSettings = canUser('read', {
23
- kind: 'root',
24
- name: 'site'
25
- }) ? getEditedEntityRecord('root', 'site') : undefined;
1
+ import { __ } from "@wordpress/i18n";
2
+ import { useSelect } from "@wordpress/data";
3
+ import { store as coreStore } from "@wordpress/core-data";
4
+ function usePageTypeBadge(postId) {
5
+ const { isFrontPage, isPostsPage } = useSelect((select) => {
6
+ const { canUser, getEditedEntityRecord } = select(coreStore);
7
+ const siteSettings = canUser("read", {
8
+ kind: "root",
9
+ name: "site"
10
+ }) ? getEditedEntityRecord("root", "site") : void 0;
26
11
  const _postId = parseInt(postId, 10);
27
12
  return {
28
13
  isFrontPage: siteSettings?.page_on_front === _postId,
@@ -30,10 +15,13 @@ export default function usePageTypeBadge(postId) {
30
15
  };
31
16
  });
32
17
  if (isFrontPage) {
33
- return __('Homepage');
18
+ return __("Homepage");
34
19
  } else if (isPostsPage) {
35
- return __('Posts Page');
20
+ return __("Posts Page");
36
21
  }
37
22
  return false;
38
23
  }
39
- //# sourceMappingURL=pageTypeBadge.js.map
24
+ export {
25
+ usePageTypeBadge as default
26
+ };
27
+ //# sourceMappingURL=pageTypeBadge.js.map
@@ -1 +1,7 @@
1
- {"version":3,"names":["__","useSelect","store","coreStore","usePageTypeBadge","postId","isFrontPage","isPostsPage","select","canUser","getEditedEntityRecord","siteSettings","kind","name","undefined","_postId","parseInt","page_on_front","page_for_posts"],"sources":["@wordpress/editor/src/utils/pageTypeBadge.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Custom hook to get the page type badge for the current post on edit site view.\n *\n * @param {number|string} postId postId of the current post being edited.\n */\nexport default function usePageTypeBadge( postId ) {\n\tconst { isFrontPage, isPostsPage } = useSelect( ( select ) => {\n\t\tconst { canUser, getEditedEntityRecord } = select( coreStore );\n\t\tconst siteSettings = canUser( 'read', {\n\t\t\tkind: 'root',\n\t\t\tname: 'site',\n\t\t} )\n\t\t\t? getEditedEntityRecord( 'root', 'site' )\n\t\t\t: undefined;\n\n\t\tconst _postId = parseInt( postId, 10 );\n\n\t\treturn {\n\t\t\tisFrontPage: siteSettings?.page_on_front === _postId,\n\t\t\tisPostsPage: siteSettings?.page_for_posts === _postId,\n\t\t};\n\t} );\n\n\tif ( isFrontPage ) {\n\t\treturn __( 'Homepage' );\n\t} else if ( isPostsPage ) {\n\t\treturn __( 'Posts Page' );\n\t}\n\n\treturn false;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,KAAK,IAAIC,SAAS,QAAQ,sBAAsB;;AAEzD;AACA;AACA;AACA;AACA;AACA,eAAe,SAASC,gBAAgBA,CAAEC,MAAM,EAAG;EAClD,MAAM;IAAEC,WAAW;IAAEC;EAAY,CAAC,GAAGN,SAAS,CAAIO,MAAM,IAAM;IAC7D,MAAM;MAAEC,OAAO;MAAEC;IAAsB,CAAC,GAAGF,MAAM,CAAEL,SAAU,CAAC;IAC9D,MAAMQ,YAAY,GAAGF,OAAO,CAAE,MAAM,EAAE;MACrCG,IAAI,EAAE,MAAM;MACZC,IAAI,EAAE;IACP,CAAE,CAAC,GACAH,qBAAqB,CAAE,MAAM,EAAE,MAAO,CAAC,GACvCI,SAAS;IAEZ,MAAMC,OAAO,GAAGC,QAAQ,CAAEX,MAAM,EAAE,EAAG,CAAC;IAEtC,OAAO;MACNC,WAAW,EAAEK,YAAY,EAAEM,aAAa,KAAKF,OAAO;MACpDR,WAAW,EAAEI,YAAY,EAAEO,cAAc,KAAKH;IAC/C,CAAC;EACF,CAAE,CAAC;EAEH,IAAKT,WAAW,EAAG;IAClB,OAAON,EAAE,CAAE,UAAW,CAAC;EACxB,CAAC,MAAM,IAAKO,WAAW,EAAG;IACzB,OAAOP,EAAE,CAAE,YAAa,CAAC;EAC1B;EAEA,OAAO,KAAK;AACb","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/utils/pageTypeBadge.js"],
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Custom hook to get the page type badge for the current post on edit site view.\n *\n * @param {number|string} postId postId of the current post being edited.\n */\nexport default function usePageTypeBadge( postId ) {\n\tconst { isFrontPage, isPostsPage } = useSelect( ( select ) => {\n\t\tconst { canUser, getEditedEntityRecord } = select( coreStore );\n\t\tconst siteSettings = canUser( 'read', {\n\t\t\tkind: 'root',\n\t\t\tname: 'site',\n\t\t} )\n\t\t\t? getEditedEntityRecord( 'root', 'site' )\n\t\t\t: undefined;\n\n\t\tconst _postId = parseInt( postId, 10 );\n\n\t\treturn {\n\t\t\tisFrontPage: siteSettings?.page_on_front === _postId,\n\t\t\tisPostsPage: siteSettings?.page_for_posts === _postId,\n\t\t};\n\t} );\n\n\tif ( isFrontPage ) {\n\t\treturn __( 'Homepage' );\n\t} else if ( isPostsPage ) {\n\t\treturn __( 'Posts Page' );\n\t}\n\n\treturn false;\n}\n"],
5
+ "mappings": "AAGA,SAAS,UAAU;AACnB,SAAS,iBAAiB;AAC1B,SAAS,SAAS,iBAAiB;AAOpB,SAAR,iBAAmC,QAAS;AAClD,QAAM,EAAE,aAAa,YAAY,IAAI,UAAW,CAAE,WAAY;AAC7D,UAAM,EAAE,SAAS,sBAAsB,IAAI,OAAQ,SAAU;AAC7D,UAAM,eAAe,QAAS,QAAQ;AAAA,MACrC,MAAM;AAAA,MACN,MAAM;AAAA,IACP,CAAE,IACC,sBAAuB,QAAQ,MAAO,IACtC;AAEH,UAAM,UAAU,SAAU,QAAQ,EAAG;AAErC,WAAO;AAAA,MACN,aAAa,cAAc,kBAAkB;AAAA,MAC7C,aAAa,cAAc,mBAAmB;AAAA,IAC/C;AAAA,EACD,CAAE;AAEF,MAAK,aAAc;AAClB,WAAO,GAAI,UAAW;AAAA,EACvB,WAAY,aAAc;AACzB,WAAO,GAAI,YAAa;AAAA,EACzB;AAEA,SAAO;AACR;",
6
+ "names": []
7
+ }
@@ -1,32 +1,9 @@
1
- /**
2
- * External dependencies
3
- */
4
- import removeAccents from 'remove-accents';
5
-
6
- /**
7
- * Sanitizes the search input string.
8
- *
9
- * @param {string} input The search input to normalize.
10
- *
11
- * @return {string} The normalized search input.
12
- */
13
- function normalizeSearchInput(input = '') {
14
- // Disregard diacritics.
1
+ import removeAccents from "remove-accents";
2
+ function normalizeSearchInput(input = "") {
15
3
  input = removeAccents(input);
16
-
17
- // Trim & Lowercase.
18
4
  input = input.trim().toLowerCase();
19
5
  return input;
20
6
  }
21
-
22
- /**
23
- * Get the search rank for a given template and a specific search term.
24
- *
25
- * @param {Object} template Template to rank
26
- * @param {string} searchValue Search term
27
- *
28
- * @return {number} A template search rank
29
- */
30
7
  function getTemplateSearchRank(template, searchValue) {
31
8
  const normalizedSearchValue = normalizeSearchInput(searchValue);
32
9
  const normalizedTitle = normalizeSearchInput(template.title);
@@ -36,33 +13,27 @@ function getTemplateSearchRank(template, searchValue) {
36
13
  } else if (normalizedTitle.startsWith(normalizedSearchValue)) {
37
14
  rank += 20;
38
15
  } else {
39
- const searchTerms = normalizedSearchValue.split(' ');
40
- const hasMatchedTerms = searchTerms.every(searchTerm => normalizedTitle.includes(searchTerm));
41
-
42
- // Prefer template with every search word in the title.
16
+ const searchTerms = normalizedSearchValue.split(" ");
17
+ const hasMatchedTerms = searchTerms.every(
18
+ (searchTerm) => normalizedTitle.includes(searchTerm)
19
+ );
43
20
  if (hasMatchedTerms) {
44
21
  rank += 10;
45
22
  }
46
23
  }
47
24
  return rank;
48
25
  }
49
-
50
- /**
51
- * Filters a template list given a search term.
52
- *
53
- * @param {Array} templates Item list
54
- * @param {string} searchValue Search input.
55
- *
56
- * @return {Array} Filtered template list.
57
- */
58
- export function searchTemplates(templates = [], searchValue = '') {
26
+ function searchTemplates(templates = [], searchValue = "") {
59
27
  if (!searchValue) {
60
28
  return templates;
61
29
  }
62
- const rankedTemplates = templates.map(template => {
30
+ const rankedTemplates = templates.map((template) => {
63
31
  return [template, getTemplateSearchRank(template, searchValue)];
64
32
  }).filter(([, rank]) => rank > 0);
65
33
  rankedTemplates.sort(([, rank1], [, rank2]) => rank2 - rank1);
66
34
  return rankedTemplates.map(([template]) => template);
67
35
  }
68
- //# sourceMappingURL=search-templates.js.map
36
+ export {
37
+ searchTemplates
38
+ };
39
+ //# sourceMappingURL=search-templates.js.map
@@ -1 +1,7 @@
1
- {"version":3,"names":["removeAccents","normalizeSearchInput","input","trim","toLowerCase","getTemplateSearchRank","template","searchValue","normalizedSearchValue","normalizedTitle","title","rank","startsWith","searchTerms","split","hasMatchedTerms","every","searchTerm","includes","searchTemplates","templates","rankedTemplates","map","filter","sort","rank1","rank2"],"sources":["@wordpress/editor/src/utils/search-templates.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport removeAccents from 'remove-accents';\n\n/**\n * Sanitizes the search input string.\n *\n * @param {string} input The search input to normalize.\n *\n * @return {string} The normalized search input.\n */\nfunction normalizeSearchInput( input = '' ) {\n\t// Disregard diacritics.\n\tinput = removeAccents( input );\n\n\t// Trim & Lowercase.\n\tinput = input.trim().toLowerCase();\n\n\treturn input;\n}\n\n/**\n * Get the search rank for a given template and a specific search term.\n *\n * @param {Object} template Template to rank\n * @param {string} searchValue Search term\n *\n * @return {number} A template search rank\n */\nfunction getTemplateSearchRank( template, searchValue ) {\n\tconst normalizedSearchValue = normalizeSearchInput( searchValue );\n\tconst normalizedTitle = normalizeSearchInput( template.title );\n\n\tlet rank = 0;\n\n\tif ( normalizedSearchValue === normalizedTitle ) {\n\t\trank += 30;\n\t} else if ( normalizedTitle.startsWith( normalizedSearchValue ) ) {\n\t\trank += 20;\n\t} else {\n\t\tconst searchTerms = normalizedSearchValue.split( ' ' );\n\t\tconst hasMatchedTerms = searchTerms.every( ( searchTerm ) =>\n\t\t\tnormalizedTitle.includes( searchTerm )\n\t\t);\n\n\t\t// Prefer template with every search word in the title.\n\t\tif ( hasMatchedTerms ) {\n\t\t\trank += 10;\n\t\t}\n\t}\n\n\treturn rank;\n}\n\n/**\n * Filters a template list given a search term.\n *\n * @param {Array} templates Item list\n * @param {string} searchValue Search input.\n *\n * @return {Array} Filtered template list.\n */\nexport function searchTemplates( templates = [], searchValue = '' ) {\n\tif ( ! searchValue ) {\n\t\treturn templates;\n\t}\n\n\tconst rankedTemplates = templates\n\t\t.map( ( template ) => {\n\t\t\treturn [ template, getTemplateSearchRank( template, searchValue ) ];\n\t\t} )\n\t\t.filter( ( [ , rank ] ) => rank > 0 );\n\n\trankedTemplates.sort( ( [ , rank1 ], [ , rank2 ] ) => rank2 - rank1 );\n\treturn rankedTemplates.map( ( [ template ] ) => template );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,aAAa,MAAM,gBAAgB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,oBAAoBA,CAAEC,KAAK,GAAG,EAAE,EAAG;EAC3C;EACAA,KAAK,GAAGF,aAAa,CAAEE,KAAM,CAAC;;EAE9B;EACAA,KAAK,GAAGA,KAAK,CAACC,IAAI,CAAC,CAAC,CAACC,WAAW,CAAC,CAAC;EAElC,OAAOF,KAAK;AACb;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASG,qBAAqBA,CAAEC,QAAQ,EAAEC,WAAW,EAAG;EACvD,MAAMC,qBAAqB,GAAGP,oBAAoB,CAAEM,WAAY,CAAC;EACjE,MAAME,eAAe,GAAGR,oBAAoB,CAAEK,QAAQ,CAACI,KAAM,CAAC;EAE9D,IAAIC,IAAI,GAAG,CAAC;EAEZ,IAAKH,qBAAqB,KAAKC,eAAe,EAAG;IAChDE,IAAI,IAAI,EAAE;EACX,CAAC,MAAM,IAAKF,eAAe,CAACG,UAAU,CAAEJ,qBAAsB,CAAC,EAAG;IACjEG,IAAI,IAAI,EAAE;EACX,CAAC,MAAM;IACN,MAAME,WAAW,GAAGL,qBAAqB,CAACM,KAAK,CAAE,GAAI,CAAC;IACtD,MAAMC,eAAe,GAAGF,WAAW,CAACG,KAAK,CAAIC,UAAU,IACtDR,eAAe,CAACS,QAAQ,CAAED,UAAW,CACtC,CAAC;;IAED;IACA,IAAKF,eAAe,EAAG;MACtBJ,IAAI,IAAI,EAAE;IACX;EACD;EAEA,OAAOA,IAAI;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASQ,eAAeA,CAAEC,SAAS,GAAG,EAAE,EAAEb,WAAW,GAAG,EAAE,EAAG;EACnE,IAAK,CAAEA,WAAW,EAAG;IACpB,OAAOa,SAAS;EACjB;EAEA,MAAMC,eAAe,GAAGD,SAAS,CAC/BE,GAAG,CAAIhB,QAAQ,IAAM;IACrB,OAAO,CAAEA,QAAQ,EAAED,qBAAqB,CAAEC,QAAQ,EAAEC,WAAY,CAAC,CAAE;EACpE,CAAE,CAAC,CACFgB,MAAM,CAAE,CAAE,GAAIZ,IAAI,CAAE,KAAMA,IAAI,GAAG,CAAE,CAAC;EAEtCU,eAAe,CAACG,IAAI,CAAE,CAAE,GAAIC,KAAK,CAAE,EAAE,GAAIC,KAAK,CAAE,KAAMA,KAAK,GAAGD,KAAM,CAAC;EACrE,OAAOJ,eAAe,CAACC,GAAG,CAAE,CAAE,CAAEhB,QAAQ,CAAE,KAAMA,QAAS,CAAC;AAC3D","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/utils/search-templates.js"],
4
+ "sourcesContent": ["/**\n * External dependencies\n */\nimport removeAccents from 'remove-accents';\n\n/**\n * Sanitizes the search input string.\n *\n * @param {string} input The search input to normalize.\n *\n * @return {string} The normalized search input.\n */\nfunction normalizeSearchInput( input = '' ) {\n\t// Disregard diacritics.\n\tinput = removeAccents( input );\n\n\t// Trim & Lowercase.\n\tinput = input.trim().toLowerCase();\n\n\treturn input;\n}\n\n/**\n * Get the search rank for a given template and a specific search term.\n *\n * @param {Object} template Template to rank\n * @param {string} searchValue Search term\n *\n * @return {number} A template search rank\n */\nfunction getTemplateSearchRank( template, searchValue ) {\n\tconst normalizedSearchValue = normalizeSearchInput( searchValue );\n\tconst normalizedTitle = normalizeSearchInput( template.title );\n\n\tlet rank = 0;\n\n\tif ( normalizedSearchValue === normalizedTitle ) {\n\t\trank += 30;\n\t} else if ( normalizedTitle.startsWith( normalizedSearchValue ) ) {\n\t\trank += 20;\n\t} else {\n\t\tconst searchTerms = normalizedSearchValue.split( ' ' );\n\t\tconst hasMatchedTerms = searchTerms.every( ( searchTerm ) =>\n\t\t\tnormalizedTitle.includes( searchTerm )\n\t\t);\n\n\t\t// Prefer template with every search word in the title.\n\t\tif ( hasMatchedTerms ) {\n\t\t\trank += 10;\n\t\t}\n\t}\n\n\treturn rank;\n}\n\n/**\n * Filters a template list given a search term.\n *\n * @param {Array} templates Item list\n * @param {string} searchValue Search input.\n *\n * @return {Array} Filtered template list.\n */\nexport function searchTemplates( templates = [], searchValue = '' ) {\n\tif ( ! searchValue ) {\n\t\treturn templates;\n\t}\n\n\tconst rankedTemplates = templates\n\t\t.map( ( template ) => {\n\t\t\treturn [ template, getTemplateSearchRank( template, searchValue ) ];\n\t\t} )\n\t\t.filter( ( [ , rank ] ) => rank > 0 );\n\n\trankedTemplates.sort( ( [ , rank1 ], [ , rank2 ] ) => rank2 - rank1 );\n\treturn rankedTemplates.map( ( [ template ] ) => template );\n}\n"],
5
+ "mappings": "AAGA,OAAO,mBAAmB;AAS1B,SAAS,qBAAsB,QAAQ,IAAK;AAE3C,UAAQ,cAAe,KAAM;AAG7B,UAAQ,MAAM,KAAK,EAAE,YAAY;AAEjC,SAAO;AACR;AAUA,SAAS,sBAAuB,UAAU,aAAc;AACvD,QAAM,wBAAwB,qBAAsB,WAAY;AAChE,QAAM,kBAAkB,qBAAsB,SAAS,KAAM;AAE7D,MAAI,OAAO;AAEX,MAAK,0BAA0B,iBAAkB;AAChD,YAAQ;AAAA,EACT,WAAY,gBAAgB,WAAY,qBAAsB,GAAI;AACjE,YAAQ;AAAA,EACT,OAAO;AACN,UAAM,cAAc,sBAAsB,MAAO,GAAI;AACrD,UAAM,kBAAkB,YAAY;AAAA,MAAO,CAAE,eAC5C,gBAAgB,SAAU,UAAW;AAAA,IACtC;AAGA,QAAK,iBAAkB;AACtB,cAAQ;AAAA,IACT;AAAA,EACD;AAEA,SAAO;AACR;AAUO,SAAS,gBAAiB,YAAY,CAAC,GAAG,cAAc,IAAK;AACnE,MAAK,CAAE,aAAc;AACpB,WAAO;AAAA,EACR;AAEA,QAAM,kBAAkB,UACtB,IAAK,CAAE,aAAc;AACrB,WAAO,CAAE,UAAU,sBAAuB,UAAU,WAAY,CAAE;AAAA,EACnE,CAAE,EACD,OAAQ,CAAE,CAAE,EAAE,IAAK,MAAO,OAAO,CAAE;AAErC,kBAAgB,KAAM,CAAE,CAAE,EAAE,KAAM,GAAG,CAAE,EAAE,KAAM,MAAO,QAAQ,KAAM;AACpE,SAAO,gBAAgB,IAAK,CAAE,CAAE,QAAS,MAAO,QAAS;AAC1D;",
6
+ "names": []
7
+ }
@@ -1,42 +1,30 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
- import { decodeEntities } from '@wordpress/html-entities';
5
-
6
- /**
7
- * Returns terms in a tree form.
8
- *
9
- * @param {Array} flatTerms Array of terms in flat format.
10
- *
11
- * @return {Array} Array of terms in tree format.
12
- */
13
- export function buildTermsTree(flatTerms) {
14
- const flatTermsWithParentAndChildren = flatTerms.map(term => {
1
+ import { decodeEntities } from "@wordpress/html-entities";
2
+ function buildTermsTree(flatTerms) {
3
+ const flatTermsWithParentAndChildren = flatTerms.map((term) => {
15
4
  return {
16
5
  children: [],
17
- parent: undefined,
6
+ parent: void 0,
18
7
  ...term
19
8
  };
20
9
  });
21
-
22
- // All terms should have a `parent` because we're about to index them by it.
23
- if (flatTermsWithParentAndChildren.some(({
24
- parent
25
- }) => parent === undefined)) {
10
+ if (flatTermsWithParentAndChildren.some(
11
+ ({ parent }) => parent === void 0
12
+ )) {
26
13
  return flatTermsWithParentAndChildren;
27
14
  }
28
- const termsByParent = flatTermsWithParentAndChildren.reduce((acc, term) => {
29
- const {
30
- parent
31
- } = term;
32
- if (!acc[parent]) {
33
- acc[parent] = [];
34
- }
35
- acc[parent].push(term);
36
- return acc;
37
- }, {});
38
- const fillWithChildren = terms => {
39
- return terms.map(term => {
15
+ const termsByParent = flatTermsWithParentAndChildren.reduce(
16
+ (acc, term) => {
17
+ const { parent } = term;
18
+ if (!acc[parent]) {
19
+ acc[parent] = [];
20
+ }
21
+ acc[parent].push(term);
22
+ return acc;
23
+ },
24
+ {}
25
+ );
26
+ const fillWithChildren = (terms) => {
27
+ return terms.map((term) => {
40
28
  const children = termsByParent[term.id];
41
29
  return {
42
30
  ...term,
@@ -44,35 +32,24 @@ export function buildTermsTree(flatTerms) {
44
32
  };
45
33
  });
46
34
  };
47
- return fillWithChildren(termsByParent['0'] || []);
35
+ return fillWithChildren(termsByParent["0"] || []);
48
36
  }
49
- export const unescapeString = arg => {
37
+ const unescapeString = (arg) => {
50
38
  return decodeEntities(arg);
51
39
  };
52
-
53
- /**
54
- * Returns a term object with name unescaped.
55
- *
56
- * @param {Object} term The term object to unescape.
57
- *
58
- * @return {Object} Term object with name property unescaped.
59
- */
60
- export const unescapeTerm = term => {
40
+ const unescapeTerm = (term) => {
61
41
  return {
62
42
  ...term,
63
43
  name: unescapeString(term.name)
64
44
  };
65
45
  };
66
-
67
- /**
68
- * Returns an array of term objects with names unescaped.
69
- * The unescape of each term is performed using the unescapeTerm function.
70
- *
71
- * @param {Object[]} terms Array of term objects to unescape.
72
- *
73
- * @return {Object[]} Array of term objects unescaped.
74
- */
75
- export const unescapeTerms = terms => {
76
- return (terms !== null && terms !== void 0 ? terms : []).map(unescapeTerm);
46
+ const unescapeTerms = (terms) => {
47
+ return (terms ?? []).map(unescapeTerm);
77
48
  };
78
- //# sourceMappingURL=terms.js.map
49
+ export {
50
+ buildTermsTree,
51
+ unescapeString,
52
+ unescapeTerm,
53
+ unescapeTerms
54
+ };
55
+ //# sourceMappingURL=terms.js.map
@@ -1 +1,7 @@
1
- {"version":3,"names":["decodeEntities","buildTermsTree","flatTerms","flatTermsWithParentAndChildren","map","term","children","parent","undefined","some","termsByParent","reduce","acc","push","fillWithChildren","terms","id","length","unescapeString","arg","unescapeTerm","name","unescapeTerms"],"sources":["@wordpress/editor/src/utils/terms.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Returns terms in a tree form.\n *\n * @param {Array} flatTerms Array of terms in flat format.\n *\n * @return {Array} Array of terms in tree format.\n */\nexport function buildTermsTree( flatTerms ) {\n\tconst flatTermsWithParentAndChildren = flatTerms.map( ( term ) => {\n\t\treturn {\n\t\t\tchildren: [],\n\t\t\tparent: undefined,\n\t\t\t...term,\n\t\t};\n\t} );\n\n\t// All terms should have a `parent` because we're about to index them by it.\n\tif (\n\t\tflatTermsWithParentAndChildren.some(\n\t\t\t( { parent } ) => parent === undefined\n\t\t)\n\t) {\n\t\treturn flatTermsWithParentAndChildren;\n\t}\n\n\tconst termsByParent = flatTermsWithParentAndChildren.reduce(\n\t\t( acc, term ) => {\n\t\t\tconst { parent } = term;\n\t\t\tif ( ! acc[ parent ] ) {\n\t\t\t\tacc[ parent ] = [];\n\t\t\t}\n\t\t\tacc[ parent ].push( term );\n\t\t\treturn acc;\n\t\t},\n\t\t{}\n\t);\n\n\tconst fillWithChildren = ( terms ) => {\n\t\treturn terms.map( ( term ) => {\n\t\t\tconst children = termsByParent[ term.id ];\n\t\t\treturn {\n\t\t\t\t...term,\n\t\t\t\tchildren:\n\t\t\t\t\tchildren && children.length\n\t\t\t\t\t\t? fillWithChildren( children )\n\t\t\t\t\t\t: [],\n\t\t\t};\n\t\t} );\n\t};\n\n\treturn fillWithChildren( termsByParent[ '0' ] || [] );\n}\n\nexport const unescapeString = ( arg ) => {\n\treturn decodeEntities( arg );\n};\n\n/**\n * Returns a term object with name unescaped.\n *\n * @param {Object} term The term object to unescape.\n *\n * @return {Object} Term object with name property unescaped.\n */\nexport const unescapeTerm = ( term ) => {\n\treturn {\n\t\t...term,\n\t\tname: unescapeString( term.name ),\n\t};\n};\n\n/**\n * Returns an array of term objects with names unescaped.\n * The unescape of each term is performed using the unescapeTerm function.\n *\n * @param {Object[]} terms Array of term objects to unescape.\n *\n * @return {Object[]} Array of term objects unescaped.\n */\nexport const unescapeTerms = ( terms ) => {\n\treturn ( terms ?? [] ).map( unescapeTerm );\n};\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,cAAc,QAAQ,0BAA0B;;AAEzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,cAAcA,CAAEC,SAAS,EAAG;EAC3C,MAAMC,8BAA8B,GAAGD,SAAS,CAACE,GAAG,CAAIC,IAAI,IAAM;IACjE,OAAO;MACNC,QAAQ,EAAE,EAAE;MACZC,MAAM,EAAEC,SAAS;MACjB,GAAGH;IACJ,CAAC;EACF,CAAE,CAAC;;EAEH;EACA,IACCF,8BAA8B,CAACM,IAAI,CAClC,CAAE;IAAEF;EAAO,CAAC,KAAMA,MAAM,KAAKC,SAC9B,CAAC,EACA;IACD,OAAOL,8BAA8B;EACtC;EAEA,MAAMO,aAAa,GAAGP,8BAA8B,CAACQ,MAAM,CAC1D,CAAEC,GAAG,EAAEP,IAAI,KAAM;IAChB,MAAM;MAAEE;IAAO,CAAC,GAAGF,IAAI;IACvB,IAAK,CAAEO,GAAG,CAAEL,MAAM,CAAE,EAAG;MACtBK,GAAG,CAAEL,MAAM,CAAE,GAAG,EAAE;IACnB;IACAK,GAAG,CAAEL,MAAM,CAAE,CAACM,IAAI,CAAER,IAAK,CAAC;IAC1B,OAAOO,GAAG;EACX,CAAC,EACD,CAAC,CACF,CAAC;EAED,MAAME,gBAAgB,GAAKC,KAAK,IAAM;IACrC,OAAOA,KAAK,CAACX,GAAG,CAAIC,IAAI,IAAM;MAC7B,MAAMC,QAAQ,GAAGI,aAAa,CAAEL,IAAI,CAACW,EAAE,CAAE;MACzC,OAAO;QACN,GAAGX,IAAI;QACPC,QAAQ,EACPA,QAAQ,IAAIA,QAAQ,CAACW,MAAM,GACxBH,gBAAgB,CAAER,QAAS,CAAC,GAC5B;MACL,CAAC;IACF,CAAE,CAAC;EACJ,CAAC;EAED,OAAOQ,gBAAgB,CAAEJ,aAAa,CAAE,GAAG,CAAE,IAAI,EAAG,CAAC;AACtD;AAEA,OAAO,MAAMQ,cAAc,GAAKC,GAAG,IAAM;EACxC,OAAOnB,cAAc,CAAEmB,GAAI,CAAC;AAC7B,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,YAAY,GAAKf,IAAI,IAAM;EACvC,OAAO;IACN,GAAGA,IAAI;IACPgB,IAAI,EAAEH,cAAc,CAAEb,IAAI,CAACgB,IAAK;EACjC,CAAC;AACF,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,aAAa,GAAKP,KAAK,IAAM;EACzC,OAAO,CAAEA,KAAK,aAALA,KAAK,cAALA,KAAK,GAAI,EAAE,EAAGX,GAAG,CAAEgB,YAAa,CAAC;AAC3C,CAAC","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/utils/terms.js"],
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Returns terms in a tree form.\n *\n * @param {Array} flatTerms Array of terms in flat format.\n *\n * @return {Array} Array of terms in tree format.\n */\nexport function buildTermsTree( flatTerms ) {\n\tconst flatTermsWithParentAndChildren = flatTerms.map( ( term ) => {\n\t\treturn {\n\t\t\tchildren: [],\n\t\t\tparent: undefined,\n\t\t\t...term,\n\t\t};\n\t} );\n\n\t// All terms should have a `parent` because we're about to index them by it.\n\tif (\n\t\tflatTermsWithParentAndChildren.some(\n\t\t\t( { parent } ) => parent === undefined\n\t\t)\n\t) {\n\t\treturn flatTermsWithParentAndChildren;\n\t}\n\n\tconst termsByParent = flatTermsWithParentAndChildren.reduce(\n\t\t( acc, term ) => {\n\t\t\tconst { parent } = term;\n\t\t\tif ( ! acc[ parent ] ) {\n\t\t\t\tacc[ parent ] = [];\n\t\t\t}\n\t\t\tacc[ parent ].push( term );\n\t\t\treturn acc;\n\t\t},\n\t\t{}\n\t);\n\n\tconst fillWithChildren = ( terms ) => {\n\t\treturn terms.map( ( term ) => {\n\t\t\tconst children = termsByParent[ term.id ];\n\t\t\treturn {\n\t\t\t\t...term,\n\t\t\t\tchildren:\n\t\t\t\t\tchildren && children.length\n\t\t\t\t\t\t? fillWithChildren( children )\n\t\t\t\t\t\t: [],\n\t\t\t};\n\t\t} );\n\t};\n\n\treturn fillWithChildren( termsByParent[ '0' ] || [] );\n}\n\nexport const unescapeString = ( arg ) => {\n\treturn decodeEntities( arg );\n};\n\n/**\n * Returns a term object with name unescaped.\n *\n * @param {Object} term The term object to unescape.\n *\n * @return {Object} Term object with name property unescaped.\n */\nexport const unescapeTerm = ( term ) => {\n\treturn {\n\t\t...term,\n\t\tname: unescapeString( term.name ),\n\t};\n};\n\n/**\n * Returns an array of term objects with names unescaped.\n * The unescape of each term is performed using the unescapeTerm function.\n *\n * @param {Object[]} terms Array of term objects to unescape.\n *\n * @return {Object[]} Array of term objects unescaped.\n */\nexport const unescapeTerms = ( terms ) => {\n\treturn ( terms ?? [] ).map( unescapeTerm );\n};\n"],
5
+ "mappings": "AAGA,SAAS,sBAAsB;AASxB,SAAS,eAAgB,WAAY;AAC3C,QAAM,iCAAiC,UAAU,IAAK,CAAE,SAAU;AACjE,WAAO;AAAA,MACN,UAAU,CAAC;AAAA,MACX,QAAQ;AAAA,MACR,GAAG;AAAA,IACJ;AAAA,EACD,CAAE;AAGF,MACC,+BAA+B;AAAA,IAC9B,CAAE,EAAE,OAAO,MAAO,WAAW;AAAA,EAC9B,GACC;AACD,WAAO;AAAA,EACR;AAEA,QAAM,gBAAgB,+BAA+B;AAAA,IACpD,CAAE,KAAK,SAAU;AAChB,YAAM,EAAE,OAAO,IAAI;AACnB,UAAK,CAAE,IAAK,MAAO,GAAI;AACtB,YAAK,MAAO,IAAI,CAAC;AAAA,MAClB;AACA,UAAK,MAAO,EAAE,KAAM,IAAK;AACzB,aAAO;AAAA,IACR;AAAA,IACA,CAAC;AAAA,EACF;AAEA,QAAM,mBAAmB,CAAE,UAAW;AACrC,WAAO,MAAM,IAAK,CAAE,SAAU;AAC7B,YAAM,WAAW,cAAe,KAAK,EAAG;AACxC,aAAO;AAAA,QACN,GAAG;AAAA,QACH,UACC,YAAY,SAAS,SAClB,iBAAkB,QAAS,IAC3B,CAAC;AAAA,MACN;AAAA,IACD,CAAE;AAAA,EACH;AAEA,SAAO,iBAAkB,cAAe,GAAI,KAAK,CAAC,CAAE;AACrD;AAEO,MAAM,iBAAiB,CAAE,QAAS;AACxC,SAAO,eAAgB,GAAI;AAC5B;AASO,MAAM,eAAe,CAAE,SAAU;AACvC,SAAO;AAAA,IACN,GAAG;AAAA,IACH,MAAM,eAAgB,KAAK,IAAK;AAAA,EACjC;AACD;AAUO,MAAM,gBAAgB,CAAE,UAAW;AACzC,UAAS,SAAS,CAAC,GAAI,IAAK,YAAa;AAC1C;",
6
+ "names": []
7
+ }
@@ -1,31 +1,14 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
- import { cleanForSlug as urlCleanForSlug } from '@wordpress/url';
5
- import deprecated from '@wordpress/deprecated';
6
-
7
- /**
8
- * Performs some basic cleanup of a string for use as a post slug
9
- *
10
- * This replicates some of what sanitize_title() does in WordPress core, but
11
- * is only designed to approximate what the slug will be.
12
- *
13
- * Converts Latin-1 Supplement and Latin Extended-A letters to basic Latin letters.
14
- * Removes combining diacritical marks. Converts whitespace, periods,
15
- * and forward slashes to hyphens. Removes any remaining non-word characters
16
- * except hyphens and underscores. Converts remaining string to lowercase.
17
- * It does not account for octets, HTML entities, or other encoded characters.
18
- *
19
- * @param {string} string Title or slug to be processed
20
- *
21
- * @return {string} Processed string
22
- */
23
- export function cleanForSlug(string) {
24
- deprecated('wp.editor.cleanForSlug', {
25
- since: '12.7',
26
- plugin: 'Gutenberg',
27
- alternative: 'wp.url.cleanForSlug'
1
+ import { cleanForSlug as urlCleanForSlug } from "@wordpress/url";
2
+ import deprecated from "@wordpress/deprecated";
3
+ function cleanForSlug(string) {
4
+ deprecated("wp.editor.cleanForSlug", {
5
+ since: "12.7",
6
+ plugin: "Gutenberg",
7
+ alternative: "wp.url.cleanForSlug"
28
8
  });
29
9
  return urlCleanForSlug(string);
30
10
  }
31
- //# sourceMappingURL=url.js.map
11
+ export {
12
+ cleanForSlug
13
+ };
14
+ //# sourceMappingURL=url.js.map
@@ -1 +1,7 @@
1
- {"version":3,"names":["cleanForSlug","urlCleanForSlug","deprecated","string","since","plugin","alternative"],"sources":["@wordpress/editor/src/utils/url.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { cleanForSlug as urlCleanForSlug } from '@wordpress/url';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Performs some basic cleanup of a string for use as a post slug\n *\n * This replicates some of what sanitize_title() does in WordPress core, but\n * is only designed to approximate what the slug will be.\n *\n * Converts Latin-1 Supplement and Latin Extended-A letters to basic Latin letters.\n * Removes combining diacritical marks. Converts whitespace, periods,\n * and forward slashes to hyphens. Removes any remaining non-word characters\n * except hyphens and underscores. Converts remaining string to lowercase.\n * It does not account for octets, HTML entities, or other encoded characters.\n *\n * @param {string} string Title or slug to be processed\n *\n * @return {string} Processed string\n */\nexport function cleanForSlug( string ) {\n\tdeprecated( 'wp.editor.cleanForSlug', {\n\t\tsince: '12.7',\n\t\tplugin: 'Gutenberg',\n\t\talternative: 'wp.url.cleanForSlug',\n\t} );\n\treturn urlCleanForSlug( string );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,YAAY,IAAIC,eAAe,QAAQ,gBAAgB;AAChE,OAAOC,UAAU,MAAM,uBAAuB;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASF,YAAYA,CAAEG,MAAM,EAAG;EACtCD,UAAU,CAAE,wBAAwB,EAAE;IACrCE,KAAK,EAAE,MAAM;IACbC,MAAM,EAAE,WAAW;IACnBC,WAAW,EAAE;EACd,CAAE,CAAC;EACH,OAAOL,eAAe,CAAEE,MAAO,CAAC;AACjC","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/utils/url.js"],
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { cleanForSlug as urlCleanForSlug } from '@wordpress/url';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Performs some basic cleanup of a string for use as a post slug\n *\n * This replicates some of what sanitize_title() does in WordPress core, but\n * is only designed to approximate what the slug will be.\n *\n * Converts Latin-1 Supplement and Latin Extended-A letters to basic Latin letters.\n * Removes combining diacritical marks. Converts whitespace, periods,\n * and forward slashes to hyphens. Removes any remaining non-word characters\n * except hyphens and underscores. Converts remaining string to lowercase.\n * It does not account for octets, HTML entities, or other encoded characters.\n *\n * @param {string} string Title or slug to be processed\n *\n * @return {string} Processed string\n */\nexport function cleanForSlug( string ) {\n\tdeprecated( 'wp.editor.cleanForSlug', {\n\t\tsince: '12.7',\n\t\tplugin: 'Gutenberg',\n\t\talternative: 'wp.url.cleanForSlug',\n\t} );\n\treturn urlCleanForSlug( string );\n}\n"],
5
+ "mappings": "AAGA,SAAS,gBAAgB,uBAAuB;AAChD,OAAO,gBAAgB;AAkBhB,SAAS,aAAc,QAAS;AACtC,aAAY,0BAA0B;AAAA,IACrC,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,aAAa;AAAA,EACd,CAAE;AACF,SAAO,gBAAiB,MAAO;AAChC;",
6
+ "names": []
7
+ }