@wordpress/editor 14.1.0 → 14.3.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 (772) hide show
  1. package/CHANGELOG.md +16 -12
  2. package/README.md +28 -7
  3. package/build/bindings/pattern-overrides.js +8 -5
  4. package/build/bindings/pattern-overrides.js.map +1 -1
  5. package/build/bindings/post-meta.js +4 -0
  6. package/build/bindings/post-meta.js.map +1 -1
  7. package/build/components/create-template-part-modal/index.js +2 -0
  8. package/build/components/create-template-part-modal/index.js.map +1 -1
  9. package/build/components/document-bar/index.js +11 -4
  10. package/build/components/document-bar/index.js.map +1 -1
  11. package/build/components/editor-interface/index.js +6 -3
  12. package/build/components/editor-interface/index.js.map +1 -1
  13. package/build/components/entities-saved-states/entity-record-item.js +4 -12
  14. package/build/components/entities-saved-states/entity-record-item.js.map +1 -1
  15. package/build/components/entities-saved-states/index.js +1 -1
  16. package/build/components/entities-saved-states/index.js.map +1 -1
  17. package/build/components/global-keyboard-shortcuts/index.js +1 -1
  18. package/build/components/global-keyboard-shortcuts/index.js.map +1 -1
  19. package/build/components/global-styles-provider/index.js +6 -65
  20. package/build/components/global-styles-provider/index.js.map +1 -1
  21. package/build/components/header/index.js +6 -2
  22. package/build/components/header/index.js.map +1 -1
  23. package/build/components/index.js +10 -2
  24. package/build/components/index.js.map +1 -1
  25. package/build/components/inserter-sidebar/index.js +10 -21
  26. package/build/components/inserter-sidebar/index.js.map +1 -1
  27. package/build/components/list-view-sidebar/index.js +19 -47
  28. package/build/components/list-view-sidebar/index.js.map +1 -1
  29. package/build/components/page-attributes/parent.js +2 -1
  30. package/build/components/page-attributes/parent.js.map +1 -1
  31. package/build/components/post-actions/actions.js +371 -452
  32. package/build/components/post-actions/actions.js.map +1 -1
  33. package/build/components/post-actions/index.js +7 -2
  34. package/build/components/post-actions/index.js.map +1 -1
  35. package/build/components/post-excerpt/index.js +2 -1
  36. package/build/components/post-excerpt/index.js.map +1 -1
  37. package/build/components/post-excerpt/panel.js +3 -2
  38. package/build/components/post-excerpt/panel.js.map +1 -1
  39. package/build/components/post-preview-button/index.js +1 -1
  40. package/build/components/post-preview-button/index.js.map +1 -1
  41. package/build/components/post-publish-panel/index.js +1 -1
  42. package/build/components/post-publish-panel/index.js.map +1 -1
  43. package/build/components/post-saved-state/index.js +11 -1
  44. package/build/components/post-saved-state/index.js.map +1 -1
  45. package/build/components/post-schedule/index.js +3 -0
  46. package/build/components/post-schedule/index.js.map +1 -1
  47. package/build/components/post-slug/check.js +8 -1
  48. package/build/components/post-slug/check.js.map +1 -1
  49. package/build/components/post-slug/index.js +6 -0
  50. package/build/components/post-slug/index.js.map +1 -1
  51. package/build/components/post-status/index.js +4 -2
  52. package/build/components/post-status/index.js.map +1 -1
  53. package/build/components/post-sticky/index.js +9 -13
  54. package/build/components/post-sticky/index.js.map +1 -1
  55. package/build/components/post-template/create-new-template-modal.js +2 -0
  56. package/build/components/post-template/create-new-template-modal.js.map +1 -1
  57. package/build/components/post-title/index.js +5 -13
  58. package/build/components/post-title/index.js.map +1 -1
  59. package/build/components/preview-dropdown/index.js +1 -1
  60. package/build/components/preview-dropdown/index.js.map +1 -1
  61. package/build/components/provider/index.native.js +0 -4
  62. package/build/components/provider/index.native.js.map +1 -1
  63. package/build/components/provider/use-block-editor-settings.js +7 -4
  64. package/build/components/provider/use-block-editor-settings.js.map +1 -1
  65. package/build/components/save-publish-panels/index.js +30 -16
  66. package/build/components/save-publish-panels/index.js.map +1 -1
  67. package/build/components/sidebar/index.js +4 -1
  68. package/build/components/sidebar/index.js.map +1 -1
  69. package/build/components/sidebar/post-summary.js +2 -4
  70. package/build/components/sidebar/post-summary.js.map +1 -1
  71. package/build/components/template-content-panel/index.js +29 -4
  72. package/build/components/template-content-panel/index.js.map +1 -1
  73. package/build/components/template-part-content-panel/index.js +70 -0
  74. package/build/components/template-part-content-panel/index.js.map +1 -0
  75. package/build/components/visual-editor/index.js +1 -1
  76. package/build/components/visual-editor/index.js.map +1 -1
  77. package/build/dataviews/actions/delete-post.js +96 -0
  78. package/build/dataviews/actions/delete-post.js.map +1 -0
  79. package/build/{components/post-actions/export-pattern-action.js → dataviews/actions/export-pattern.js} +11 -20
  80. package/build/dataviews/actions/export-pattern.js.map +1 -0
  81. package/build/dataviews/actions/index.js +32 -0
  82. package/build/dataviews/actions/index.js.map +1 -0
  83. package/build/dataviews/actions/reset-post.js +111 -0
  84. package/build/dataviews/actions/reset-post.js.map +1 -0
  85. package/build/dataviews/actions/utils.js +50 -0
  86. package/build/dataviews/actions/utils.js.map +1 -0
  87. package/build/dataviews/store/private-actions.js.map +1 -1
  88. package/build/dataviews/store/private-selectors.js +6 -6
  89. package/build/dataviews/store/private-selectors.js.map +1 -1
  90. package/build/dataviews/store/reducer.js +6 -2
  91. package/build/dataviews/store/reducer.js.map +1 -1
  92. package/build/dataviews/types.js +6 -0
  93. package/build/dataviews/types.js.map +1 -0
  94. package/build/hooks/pattern-overrides.js +3 -3
  95. package/build/hooks/pattern-overrides.js.map +1 -1
  96. package/build/lock-unlock.js +1 -1
  97. package/build/lock-unlock.js.map +1 -1
  98. package/build/private-apis.js +2 -0
  99. package/build/private-apis.js.map +1 -1
  100. package/build/private-apis.native.js +0 -2
  101. package/build/private-apis.native.js.map +1 -1
  102. package/build/store/constants.js.map +1 -1
  103. package/build/store/private-actions.js +9 -5
  104. package/build/store/private-actions.js.map +1 -1
  105. package/build/store/private-selectors.js +0 -18
  106. package/build/store/private-selectors.js.map +1 -1
  107. package/build/store/utils/is-template-revertable.js +6 -8
  108. package/build/store/utils/is-template-revertable.js.map +1 -1
  109. package/build-module/bindings/pattern-overrides.js +8 -5
  110. package/build-module/bindings/pattern-overrides.js.map +1 -1
  111. package/build-module/bindings/post-meta.js +4 -0
  112. package/build-module/bindings/post-meta.js.map +1 -1
  113. package/build-module/components/create-template-part-modal/index.js +2 -0
  114. package/build-module/components/create-template-part-modal/index.js.map +1 -1
  115. package/build-module/components/document-bar/index.js +11 -4
  116. package/build-module/components/document-bar/index.js.map +1 -1
  117. package/build-module/components/editor-interface/index.js +6 -3
  118. package/build-module/components/editor-interface/index.js.map +1 -1
  119. package/build-module/components/entities-saved-states/entity-record-item.js +6 -14
  120. package/build-module/components/entities-saved-states/entity-record-item.js.map +1 -1
  121. package/build-module/components/entities-saved-states/index.js +1 -1
  122. package/build-module/components/entities-saved-states/index.js.map +1 -1
  123. package/build-module/components/global-keyboard-shortcuts/index.js +1 -1
  124. package/build-module/components/global-keyboard-shortcuts/index.js.map +1 -1
  125. package/build-module/components/global-styles-provider/index.js +7 -66
  126. package/build-module/components/global-styles-provider/index.js.map +1 -1
  127. package/build-module/components/header/index.js +6 -2
  128. package/build-module/components/header/index.js.map +1 -1
  129. package/build-module/components/index.js +11 -2
  130. package/build-module/components/index.js.map +1 -1
  131. package/build-module/components/inserter-sidebar/index.js +11 -22
  132. package/build-module/components/inserter-sidebar/index.js.map +1 -1
  133. package/build-module/components/list-view-sidebar/index.js +20 -49
  134. package/build-module/components/list-view-sidebar/index.js.map +1 -1
  135. package/build-module/components/page-attributes/parent.js +2 -1
  136. package/build-module/components/page-attributes/parent.js.map +1 -1
  137. package/build-module/components/post-actions/actions.js +370 -450
  138. package/build-module/components/post-actions/actions.js.map +1 -1
  139. package/build-module/components/post-actions/index.js +7 -2
  140. package/build-module/components/post-actions/index.js.map +1 -1
  141. package/build-module/components/post-excerpt/index.js +2 -1
  142. package/build-module/components/post-excerpt/index.js.map +1 -1
  143. package/build-module/components/post-excerpt/panel.js +3 -2
  144. package/build-module/components/post-excerpt/panel.js.map +1 -1
  145. package/build-module/components/post-preview-button/index.js +1 -1
  146. package/build-module/components/post-preview-button/index.js.map +1 -1
  147. package/build-module/components/post-publish-panel/index.js +1 -1
  148. package/build-module/components/post-publish-panel/index.js.map +1 -1
  149. package/build-module/components/post-saved-state/index.js +11 -1
  150. package/build-module/components/post-saved-state/index.js.map +1 -1
  151. package/build-module/components/post-schedule/index.js +3 -0
  152. package/build-module/components/post-schedule/index.js.map +1 -1
  153. package/build-module/components/post-slug/check.js +9 -0
  154. package/build-module/components/post-slug/check.js.map +1 -1
  155. package/build-module/components/post-slug/index.js +6 -0
  156. package/build-module/components/post-slug/index.js.map +1 -1
  157. package/build-module/components/post-status/index.js +3 -2
  158. package/build-module/components/post-status/index.js.map +1 -1
  159. package/build-module/components/post-sticky/index.js +10 -14
  160. package/build-module/components/post-sticky/index.js.map +1 -1
  161. package/build-module/components/post-template/create-new-template-modal.js +2 -0
  162. package/build-module/components/post-template/create-new-template-modal.js.map +1 -1
  163. package/build-module/components/post-title/index.js +5 -13
  164. package/build-module/components/post-title/index.js.map +1 -1
  165. package/build-module/components/preview-dropdown/index.js +1 -1
  166. package/build-module/components/preview-dropdown/index.js.map +1 -1
  167. package/build-module/components/provider/index.native.js +0 -4
  168. package/build-module/components/provider/index.native.js.map +1 -1
  169. package/build-module/components/provider/use-block-editor-settings.js +7 -4
  170. package/build-module/components/provider/use-block-editor-settings.js.map +1 -1
  171. package/build-module/components/save-publish-panels/index.js +30 -16
  172. package/build-module/components/save-publish-panels/index.js.map +1 -1
  173. package/build-module/components/sidebar/index.js +4 -1
  174. package/build-module/components/sidebar/index.js.map +1 -1
  175. package/build-module/components/sidebar/post-summary.js +2 -4
  176. package/build-module/components/sidebar/post-summary.js.map +1 -1
  177. package/build-module/components/template-content-panel/index.js +30 -5
  178. package/build-module/components/template-content-panel/index.js.map +1 -1
  179. package/build-module/components/template-part-content-panel/index.js +63 -0
  180. package/build-module/components/template-part-content-panel/index.js.map +1 -0
  181. package/build-module/components/visual-editor/index.js +1 -1
  182. package/build-module/components/visual-editor/index.js.map +1 -1
  183. package/build-module/dataviews/actions/delete-post.js +87 -0
  184. package/build-module/dataviews/actions/delete-post.js.map +1 -0
  185. package/build-module/{components/post-actions/export-pattern-action.js → dataviews/actions/export-pattern.js} +10 -19
  186. package/build-module/dataviews/actions/export-pattern.js.map +1 -0
  187. package/build-module/dataviews/actions/index.js +24 -0
  188. package/build-module/dataviews/actions/index.js.map +1 -0
  189. package/build-module/dataviews/actions/reset-post.js +104 -0
  190. package/build-module/dataviews/actions/reset-post.js.map +1 -0
  191. package/build-module/dataviews/actions/utils.js +41 -0
  192. package/build-module/dataviews/actions/utils.js.map +1 -0
  193. package/build-module/dataviews/store/private-actions.js.map +1 -1
  194. package/build-module/dataviews/store/private-selectors.js +5 -5
  195. package/build-module/dataviews/store/private-selectors.js.map +1 -1
  196. package/build-module/dataviews/store/reducer.js +6 -2
  197. package/build-module/dataviews/store/reducer.js.map +1 -1
  198. package/build-module/dataviews/types.js +2 -0
  199. package/build-module/dataviews/types.js.map +1 -0
  200. package/build-module/hooks/pattern-overrides.js +4 -2
  201. package/build-module/hooks/pattern-overrides.js.map +1 -1
  202. package/build-module/lock-unlock.js +1 -1
  203. package/build-module/lock-unlock.js.map +1 -1
  204. package/build-module/private-apis.js +2 -0
  205. package/build-module/private-apis.js.map +1 -1
  206. package/build-module/private-apis.native.js +0 -2
  207. package/build-module/private-apis.native.js.map +1 -1
  208. package/build-module/store/constants.js.map +1 -1
  209. package/build-module/store/private-actions.js +9 -5
  210. package/build-module/store/private-actions.js.map +1 -1
  211. package/build-module/store/private-selectors.js +0 -17
  212. package/build-module/store/private-selectors.js.map +1 -1
  213. package/build-module/store/utils/is-template-revertable.js +6 -8
  214. package/build-module/store/utils/is-template-revertable.js.map +1 -1
  215. package/build-style/style-rtl.css +26 -76
  216. package/build-style/style.css +26 -76
  217. package/build-types/bindings/index.d.ts +2 -0
  218. package/build-types/bindings/index.d.ts.map +1 -0
  219. package/build-types/bindings/pattern-overrides.d.ts +18 -0
  220. package/build-types/bindings/pattern-overrides.d.ts.map +1 -0
  221. package/build-types/bindings/post-meta.d.ts +25 -0
  222. package/build-types/bindings/post-meta.d.ts.map +1 -0
  223. package/build-types/components/autocompleters/index.d.ts +2 -0
  224. package/build-types/components/autocompleters/index.d.ts.map +1 -0
  225. package/build-types/components/autocompleters/user.d.ts +6 -0
  226. package/build-types/components/autocompleters/user.d.ts.map +1 -0
  227. package/build-types/components/autosave-monitor/index.d.ts +15 -0
  228. package/build-types/components/autosave-monitor/index.d.ts.map +1 -0
  229. package/build-types/components/block-manager/category.d.ts +6 -0
  230. package/build-types/components/block-manager/category.d.ts.map +1 -0
  231. package/build-types/components/block-manager/checklist.d.ts +7 -0
  232. package/build-types/components/block-manager/checklist.d.ts.map +1 -0
  233. package/build-types/components/block-manager/index.d.ts +3 -0
  234. package/build-types/components/block-manager/index.d.ts.map +1 -0
  235. package/build-types/components/block-removal-warnings/index.d.ts +2 -0
  236. package/build-types/components/block-removal-warnings/index.d.ts.map +1 -0
  237. package/build-types/components/block-settings-menu/content-only-settings-menu.d.ts +2 -0
  238. package/build-types/components/block-settings-menu/content-only-settings-menu.d.ts.map +1 -0
  239. package/build-types/components/block-settings-menu/plugin-block-settings-menu-item.d.ts +65 -0
  240. package/build-types/components/block-settings-menu/plugin-block-settings-menu-item.d.ts.map +1 -0
  241. package/build-types/components/blog-title/index.d.ts +2 -0
  242. package/build-types/components/blog-title/index.d.ts.map +1 -0
  243. package/build-types/components/character-count/index.d.ts +7 -0
  244. package/build-types/components/character-count/index.d.ts.map +1 -0
  245. package/build-types/components/collapsible-block-toolbar/index.d.ts +6 -0
  246. package/build-types/components/collapsible-block-toolbar/index.d.ts.map +1 -0
  247. package/build-types/components/commands/index.d.ts +2 -0
  248. package/build-types/components/commands/index.d.ts.map +1 -0
  249. package/build-types/components/create-template-part-modal/index.d.ts +14 -0
  250. package/build-types/components/create-template-part-modal/index.d.ts.map +1 -0
  251. package/build-types/components/create-template-part-modal/utils.d.ts +4 -0
  252. package/build-types/components/create-template-part-modal/utils.d.ts.map +1 -0
  253. package/build-types/components/deprecated.d.ts +182 -0
  254. package/build-types/components/deprecated.d.ts.map +1 -0
  255. package/build-types/components/document-bar/index.d.ts +22 -0
  256. package/build-types/components/document-bar/index.d.ts.map +1 -0
  257. package/build-types/components/document-outline/check.d.ts +12 -0
  258. package/build-types/components/document-outline/check.d.ts.map +1 -0
  259. package/build-types/components/document-outline/index.d.ts +16 -0
  260. package/build-types/components/document-outline/index.d.ts.map +1 -0
  261. package/build-types/components/document-outline/item.d.ts +9 -0
  262. package/build-types/components/document-outline/item.d.ts.map +1 -0
  263. package/build-types/components/document-tools/index.d.ts +6 -0
  264. package/build-types/components/document-tools/index.d.ts.map +1 -0
  265. package/build-types/components/editor/index.d.ts +14 -0
  266. package/build-types/components/editor/index.d.ts.map +1 -0
  267. package/build-types/components/editor-history/redo.d.ts +4 -0
  268. package/build-types/components/editor-history/redo.d.ts.map +1 -0
  269. package/build-types/components/editor-history/undo.d.ts +4 -0
  270. package/build-types/components/editor-history/undo.d.ts.map +1 -0
  271. package/build-types/components/editor-interface/content-slot-fill.d.ts +3 -0
  272. package/build-types/components/editor-interface/content-slot-fill.d.ts.map +1 -0
  273. package/build-types/components/editor-interface/index.d.ts +17 -0
  274. package/build-types/components/editor-interface/index.d.ts.map +1 -0
  275. package/build-types/components/editor-notices/index.d.ts +13 -0
  276. package/build-types/components/editor-notices/index.d.ts.map +1 -0
  277. package/build-types/components/editor-snackbars/index.d.ts +7 -0
  278. package/build-types/components/editor-snackbars/index.d.ts.map +1 -0
  279. package/build-types/components/entities-saved-states/entity-record-item.d.ts +6 -0
  280. package/build-types/components/entities-saved-states/entity-record-item.d.ts.map +1 -0
  281. package/build-types/components/entities-saved-states/entity-type-list.d.ts +6 -0
  282. package/build-types/components/entities-saved-states/entity-type-list.d.ts.map +1 -0
  283. package/build-types/components/entities-saved-states/hooks/use-is-dirty.d.ts +2 -0
  284. package/build-types/components/entities-saved-states/hooks/use-is-dirty.d.ts.map +1 -0
  285. package/build-types/components/entities-saved-states/index.d.ts +43 -0
  286. package/build-types/components/entities-saved-states/index.d.ts.map +1 -0
  287. package/build-types/components/error-boundary/index.d.ts +14 -0
  288. package/build-types/components/error-boundary/index.d.ts.map +1 -0
  289. package/build-types/components/global-keyboard-shortcuts/index.d.ts +9 -0
  290. package/build-types/components/global-keyboard-shortcuts/index.d.ts.map +1 -0
  291. package/build-types/components/global-keyboard-shortcuts/register-shortcuts.d.ts +8 -0
  292. package/build-types/components/global-keyboard-shortcuts/register-shortcuts.d.ts.map +1 -0
  293. package/build-types/components/global-styles-provider/index.d.ts +20 -0
  294. package/build-types/components/global-styles-provider/index.d.ts.map +1 -0
  295. package/build-types/components/header/back-button.d.ts +6 -0
  296. package/build-types/components/header/back-button.d.ts.map +1 -0
  297. package/build-types/components/header/index.d.ts +10 -0
  298. package/build-types/components/header/index.d.ts.map +1 -0
  299. package/build-types/components/index.d.ts +108 -0
  300. package/build-types/components/index.d.ts.map +1 -0
  301. package/build-types/components/inserter-sidebar/index.d.ts +2 -0
  302. package/build-types/components/inserter-sidebar/index.d.ts.map +1 -0
  303. package/build-types/components/keyboard-shortcut-help-modal/config.d.ts +26 -0
  304. package/build-types/components/keyboard-shortcut-help-modal/config.d.ts.map +1 -0
  305. package/build-types/components/keyboard-shortcut-help-modal/dynamic-shortcut.d.ts +5 -0
  306. package/build-types/components/keyboard-shortcut-help-modal/dynamic-shortcut.d.ts.map +1 -0
  307. package/build-types/components/keyboard-shortcut-help-modal/index.d.ts +3 -0
  308. package/build-types/components/keyboard-shortcut-help-modal/index.d.ts.map +1 -0
  309. package/build-types/components/keyboard-shortcut-help-modal/shortcut.d.ts +8 -0
  310. package/build-types/components/keyboard-shortcut-help-modal/shortcut.d.ts.map +1 -0
  311. package/build-types/components/list-view-sidebar/index.d.ts +2 -0
  312. package/build-types/components/list-view-sidebar/index.d.ts.map +1 -0
  313. package/build-types/components/list-view-sidebar/list-view-outline.d.ts +2 -0
  314. package/build-types/components/list-view-sidebar/list-view-outline.d.ts.map +1 -0
  315. package/build-types/components/local-autosave-monitor/index.d.ts +3 -0
  316. package/build-types/components/local-autosave-monitor/index.d.ts.map +1 -0
  317. package/build-types/components/media-categories/index.d.ts +7 -0
  318. package/build-types/components/media-categories/index.d.ts.map +1 -0
  319. package/build-types/components/mode-switcher/index.d.ts +3 -0
  320. package/build-types/components/mode-switcher/index.d.ts.map +1 -0
  321. package/build-types/components/more-menu/copy-content-menu-item.d.ts +2 -0
  322. package/build-types/components/more-menu/copy-content-menu-item.d.ts.map +1 -0
  323. package/build-types/components/more-menu/index.d.ts +2 -0
  324. package/build-types/components/more-menu/index.d.ts.map +1 -0
  325. package/build-types/components/more-menu/tools-more-menu-group.d.ts +6 -0
  326. package/build-types/components/more-menu/tools-more-menu-group.d.ts.map +1 -0
  327. package/build-types/components/more-menu/view-more-menu-group.d.ts +6 -0
  328. package/build-types/components/more-menu/view-more-menu-group.d.ts.map +1 -0
  329. package/build-types/components/page-attributes/check.d.ts +13 -0
  330. package/build-types/components/page-attributes/check.d.ts.map +1 -0
  331. package/build-types/components/page-attributes/order.d.ts +9 -0
  332. package/build-types/components/page-attributes/order.d.ts.map +1 -0
  333. package/build-types/components/page-attributes/panel.d.ts +7 -0
  334. package/build-types/components/page-attributes/panel.d.ts.map +1 -0
  335. package/build-types/components/page-attributes/parent.d.ts +11 -0
  336. package/build-types/components/page-attributes/parent.d.ts.map +1 -0
  337. package/build-types/components/pattern-duplicate-modal/index.d.ts +3 -0
  338. package/build-types/components/pattern-duplicate-modal/index.d.ts.map +1 -0
  339. package/build-types/components/pattern-overrides-panel/index.d.ts +2 -0
  340. package/build-types/components/pattern-overrides-panel/index.d.ts.map +1 -0
  341. package/build-types/components/pattern-rename-modal/index.d.ts +3 -0
  342. package/build-types/components/pattern-rename-modal/index.d.ts.map +1 -0
  343. package/build-types/components/plugin-document-setting-panel/index.d.ts +69 -0
  344. package/build-types/components/plugin-document-setting-panel/index.d.ts.map +1 -0
  345. package/build-types/components/plugin-more-menu-item/index.d.ts +3 -0
  346. package/build-types/components/plugin-more-menu-item/index.d.ts.map +1 -0
  347. package/build-types/components/plugin-post-publish-panel/index.d.ts +47 -0
  348. package/build-types/components/plugin-post-publish-panel/index.d.ts.map +1 -0
  349. package/build-types/components/plugin-post-status-info/index.d.ts +57 -0
  350. package/build-types/components/plugin-post-status-info/index.d.ts.map +1 -0
  351. package/build-types/components/plugin-pre-publish-panel/index.d.ts +50 -0
  352. package/build-types/components/plugin-pre-publish-panel/index.d.ts.map +1 -0
  353. package/build-types/components/plugin-sidebar/index.d.ts +73 -0
  354. package/build-types/components/plugin-sidebar/index.d.ts.map +1 -0
  355. package/build-types/components/plugin-sidebar-more-menu-item/index.d.ts +52 -0
  356. package/build-types/components/plugin-sidebar-more-menu-item/index.d.ts.map +1 -0
  357. package/build-types/components/post-actions/actions.d.ts +31 -0
  358. package/build-types/components/post-actions/actions.d.ts.map +1 -0
  359. package/build-types/components/post-actions/index.d.ts +5 -0
  360. package/build-types/components/post-actions/index.d.ts.map +1 -0
  361. package/build-types/components/post-author/check.d.ts +13 -0
  362. package/build-types/components/post-author/check.d.ts.map +1 -0
  363. package/build-types/components/post-author/combobox.d.ts +2 -0
  364. package/build-types/components/post-author/combobox.d.ts.map +1 -0
  365. package/build-types/components/post-author/constants.d.ts +9 -0
  366. package/build-types/components/post-author/constants.d.ts.map +1 -0
  367. package/build-types/components/post-author/hook.d.ts +6 -0
  368. package/build-types/components/post-author/hook.d.ts.map +1 -0
  369. package/build-types/components/post-author/index.d.ts +8 -0
  370. package/build-types/components/post-author/index.d.ts.map +1 -0
  371. package/build-types/components/post-author/panel.d.ts +8 -0
  372. package/build-types/components/post-author/panel.d.ts.map +1 -0
  373. package/build-types/components/post-author/select.d.ts +2 -0
  374. package/build-types/components/post-author/select.d.ts.map +1 -0
  375. package/build-types/components/post-card-panel/index.d.ts +4 -0
  376. package/build-types/components/post-card-panel/index.d.ts.map +1 -0
  377. package/build-types/components/post-comments/index.d.ts +3 -0
  378. package/build-types/components/post-comments/index.d.ts.map +1 -0
  379. package/build-types/components/post-content-information/index.d.ts +2 -0
  380. package/build-types/components/post-content-information/index.d.ts.map +1 -0
  381. package/build-types/components/post-discussion/panel.d.ts +10 -0
  382. package/build-types/components/post-discussion/panel.d.ts.map +1 -0
  383. package/build-types/components/post-excerpt/check.d.ts +13 -0
  384. package/build-types/components/post-excerpt/check.d.ts.map +1 -0
  385. package/build-types/components/post-excerpt/index.d.ts +15 -0
  386. package/build-types/components/post-excerpt/index.d.ts.map +1 -0
  387. package/build-types/components/post-excerpt/panel.d.ts +8 -0
  388. package/build-types/components/post-excerpt/panel.d.ts.map +1 -0
  389. package/build-types/components/post-excerpt/plugin.d.ts +53 -0
  390. package/build-types/components/post-excerpt/plugin.d.ts.map +1 -0
  391. package/build-types/components/post-featured-image/check.d.ts +14 -0
  392. package/build-types/components/post-featured-image/check.d.ts.map +1 -0
  393. package/build-types/components/post-featured-image/index.d.ts +3 -0
  394. package/build-types/components/post-featured-image/index.d.ts.map +1 -0
  395. package/build-types/components/post-featured-image/panel.d.ts +13 -0
  396. package/build-types/components/post-featured-image/panel.d.ts.map +1 -0
  397. package/build-types/components/post-format/check.d.ts +5 -0
  398. package/build-types/components/post-format/check.d.ts.map +1 -0
  399. package/build-types/components/post-format/index.d.ts +16 -0
  400. package/build-types/components/post-format/index.d.ts.map +1 -0
  401. package/build-types/components/post-format/panel.d.ts +8 -0
  402. package/build-types/components/post-format/panel.d.ts.map +1 -0
  403. package/build-types/components/post-last-edited-panel/index.d.ts +2 -0
  404. package/build-types/components/post-last-edited-panel/index.d.ts.map +1 -0
  405. package/build-types/components/post-last-revision/check.d.ts +13 -0
  406. package/build-types/components/post-last-revision/check.d.ts.map +1 -0
  407. package/build-types/components/post-last-revision/index.d.ts +9 -0
  408. package/build-types/components/post-last-revision/index.d.ts.map +1 -0
  409. package/build-types/components/post-last-revision/panel.d.ts +8 -0
  410. package/build-types/components/post-last-revision/panel.d.ts.map +1 -0
  411. package/build-types/components/post-locked-modal/index.d.ts +8 -0
  412. package/build-types/components/post-locked-modal/index.d.ts.map +1 -0
  413. package/build-types/components/post-panel-row/index.d.ts +3 -0
  414. package/build-types/components/post-panel-row/index.d.ts.map +1 -0
  415. package/build-types/components/post-panel-section/index.d.ts +6 -0
  416. package/build-types/components/post-panel-section/index.d.ts.map +1 -0
  417. package/build-types/components/post-pending-status/check.d.ts +15 -0
  418. package/build-types/components/post-pending-status/check.d.ts.map +1 -0
  419. package/build-types/components/post-pending-status/index.d.ts +8 -0
  420. package/build-types/components/post-pending-status/index.d.ts.map +1 -0
  421. package/build-types/components/post-pingbacks/index.d.ts +3 -0
  422. package/build-types/components/post-pingbacks/index.d.ts.map +1 -0
  423. package/build-types/components/post-preview-button/index.d.ts +23 -0
  424. package/build-types/components/post-preview-button/index.d.ts.map +1 -0
  425. package/build-types/components/post-publish-button/index.d.ts +17 -0
  426. package/build-types/components/post-publish-button/index.d.ts.map +1 -0
  427. package/build-types/components/post-publish-button/label.d.ts +7 -0
  428. package/build-types/components/post-publish-button/label.d.ts.map +1 -0
  429. package/build-types/components/post-publish-button/post-publish-button-or-toggle.d.ts +17 -0
  430. package/build-types/components/post-publish-button/post-publish-button-or-toggle.d.ts.map +1 -0
  431. package/build-types/components/post-publish-panel/index.d.ts +10 -0
  432. package/build-types/components/post-publish-panel/index.d.ts.map +1 -0
  433. package/build-types/components/post-publish-panel/maybe-category-panel.d.ts +3 -0
  434. package/build-types/components/post-publish-panel/maybe-category-panel.d.ts.map +1 -0
  435. package/build-types/components/post-publish-panel/maybe-post-format-panel.d.ts +2 -0
  436. package/build-types/components/post-publish-panel/maybe-post-format-panel.d.ts.map +1 -0
  437. package/build-types/components/post-publish-panel/maybe-tags-panel.d.ts +3 -0
  438. package/build-types/components/post-publish-panel/maybe-tags-panel.d.ts.map +1 -0
  439. package/build-types/components/post-publish-panel/maybe-upload-media.d.ts +2 -0
  440. package/build-types/components/post-publish-panel/maybe-upload-media.d.ts.map +1 -0
  441. package/build-types/components/post-publish-panel/postpublish.d.ts +3 -0
  442. package/build-types/components/post-publish-panel/postpublish.d.ts.map +1 -0
  443. package/build-types/components/post-publish-panel/prepublish.d.ts +5 -0
  444. package/build-types/components/post-publish-panel/prepublish.d.ts.map +1 -0
  445. package/build-types/components/post-saved-state/index.d.ts +13 -0
  446. package/build-types/components/post-saved-state/index.d.ts.map +1 -0
  447. package/build-types/components/post-schedule/check.d.ts +12 -0
  448. package/build-types/components/post-schedule/check.d.ts.map +1 -0
  449. package/build-types/components/post-schedule/index.d.ts +17 -0
  450. package/build-types/components/post-schedule/index.d.ts.map +1 -0
  451. package/build-types/components/post-schedule/label.d.ts +25 -0
  452. package/build-types/components/post-schedule/label.d.ts.map +1 -0
  453. package/build-types/components/post-schedule/panel.d.ts +7 -0
  454. package/build-types/components/post-schedule/panel.d.ts.map +1 -0
  455. package/build-types/components/post-slug/check.d.ts +12 -0
  456. package/build-types/components/post-slug/check.d.ts.map +1 -0
  457. package/build-types/components/post-slug/index.d.ts +7 -0
  458. package/build-types/components/post-slug/index.d.ts.map +1 -0
  459. package/build-types/components/post-slug/panel.d.ts +3 -0
  460. package/build-types/components/post-slug/panel.d.ts.map +1 -0
  461. package/build-types/components/post-status/index.d.ts +6 -0
  462. package/build-types/components/post-status/index.d.ts.map +1 -0
  463. package/build-types/components/post-sticky/check.d.ts +12 -0
  464. package/build-types/components/post-sticky/check.d.ts.map +1 -0
  465. package/build-types/components/post-sticky/index.d.ts +7 -0
  466. package/build-types/components/post-sticky/index.d.ts.map +1 -0
  467. package/build-types/components/post-sticky/panel.d.ts +3 -0
  468. package/build-types/components/post-sticky/panel.d.ts.map +1 -0
  469. package/build-types/components/post-switch-to-draft-button/index.d.ts +7 -0
  470. package/build-types/components/post-switch-to-draft-button/index.d.ts.map +1 -0
  471. package/build-types/components/post-sync-status/index.d.ts +7 -0
  472. package/build-types/components/post-sync-status/index.d.ts.map +1 -0
  473. package/build-types/components/post-taxonomies/check.d.ts +12 -0
  474. package/build-types/components/post-taxonomies/check.d.ts.map +1 -0
  475. package/build-types/components/post-taxonomies/flat-term-selector.d.ts +64 -0
  476. package/build-types/components/post-taxonomies/flat-term-selector.d.ts.map +1 -0
  477. package/build-types/components/post-taxonomies/hierarchical-term-selector.d.ts +102 -0
  478. package/build-types/components/post-taxonomies/hierarchical-term-selector.d.ts.map +1 -0
  479. package/build-types/components/post-taxonomies/index.d.ts +5 -0
  480. package/build-types/components/post-taxonomies/index.d.ts.map +1 -0
  481. package/build-types/components/post-taxonomies/most-used-terms.d.ts +5 -0
  482. package/build-types/components/post-taxonomies/most-used-terms.d.ts.map +1 -0
  483. package/build-types/components/post-taxonomies/panel.d.ts +3 -0
  484. package/build-types/components/post-taxonomies/panel.d.ts.map +1 -0
  485. package/build-types/components/post-template/block-theme.d.ts +4 -0
  486. package/build-types/components/post-template/block-theme.d.ts.map +1 -0
  487. package/build-types/components/post-template/classic-theme.d.ts +3 -0
  488. package/build-types/components/post-template/classic-theme.d.ts.map +1 -0
  489. package/build-types/components/post-template/create-new-template-modal.d.ts +4 -0
  490. package/build-types/components/post-template/create-new-template-modal.d.ts.map +1 -0
  491. package/build-types/components/post-template/create-new-template.d.ts +4 -0
  492. package/build-types/components/post-template/create-new-template.d.ts.map +1 -0
  493. package/build-types/components/post-template/hooks.d.ts +8 -0
  494. package/build-types/components/post-template/hooks.d.ts.map +1 -0
  495. package/build-types/components/post-template/panel.d.ts +7 -0
  496. package/build-types/components/post-template/panel.d.ts.map +1 -0
  497. package/build-types/components/post-template/reset-default-template.d.ts +4 -0
  498. package/build-types/components/post-template/reset-default-template.d.ts.map +1 -0
  499. package/build-types/components/post-template/swap-template-button.d.ts +4 -0
  500. package/build-types/components/post-template/swap-template-button.d.ts.map +1 -0
  501. package/build-types/components/post-text-editor/index.d.ts +7 -0
  502. package/build-types/components/post-text-editor/index.d.ts.map +1 -0
  503. package/build-types/components/post-title/constants.d.ts +3 -0
  504. package/build-types/components/post-title/constants.d.ts.map +1 -0
  505. package/build-types/components/post-title/index.d.ts +3 -0
  506. package/build-types/components/post-title/index.d.ts.map +1 -0
  507. package/build-types/components/post-title/post-title-raw.d.ts +3 -0
  508. package/build-types/components/post-title/post-title-raw.d.ts.map +1 -0
  509. package/build-types/components/post-title/use-post-title-focus.d.ts +9 -0
  510. package/build-types/components/post-title/use-post-title-focus.d.ts.map +1 -0
  511. package/build-types/components/post-title/use-post-title.d.ts +7 -0
  512. package/build-types/components/post-title/use-post-title.d.ts.map +1 -0
  513. package/build-types/components/post-transform-panel/hooks.d.ts +2 -0
  514. package/build-types/components/post-transform-panel/hooks.d.ts.map +1 -0
  515. package/build-types/components/post-transform-panel/index.d.ts +2 -0
  516. package/build-types/components/post-transform-panel/index.d.ts.map +1 -0
  517. package/build-types/components/post-trash/check.d.ts +12 -0
  518. package/build-types/components/post-trash/check.d.ts.map +1 -0
  519. package/build-types/components/post-trash/index.d.ts +7 -0
  520. package/build-types/components/post-trash/index.d.ts.map +1 -0
  521. package/build-types/components/post-type-support-check/index.d.ts +18 -0
  522. package/build-types/components/post-type-support-check/index.d.ts.map +1 -0
  523. package/build-types/components/post-url/check.d.ts +12 -0
  524. package/build-types/components/post-url/check.d.ts.map +1 -0
  525. package/build-types/components/post-url/index.d.ts +14 -0
  526. package/build-types/components/post-url/index.d.ts.map +1 -0
  527. package/build-types/components/post-url/label.d.ts +13 -0
  528. package/build-types/components/post-url/label.d.ts.map +1 -0
  529. package/build-types/components/post-url/panel.d.ts +7 -0
  530. package/build-types/components/post-url/panel.d.ts.map +1 -0
  531. package/build-types/components/post-view-link/index.d.ts +2 -0
  532. package/build-types/components/post-view-link/index.d.ts.map +1 -0
  533. package/build-types/components/post-visibility/check.d.ts +13 -0
  534. package/build-types/components/post-visibility/check.d.ts.map +1 -0
  535. package/build-types/components/post-visibility/index.d.ts +11 -0
  536. package/build-types/components/post-visibility/index.d.ts.map +1 -0
  537. package/build-types/components/post-visibility/label.d.ts +13 -0
  538. package/build-types/components/post-visibility/label.d.ts.map +1 -0
  539. package/build-types/components/post-visibility/utils.d.ts +21 -0
  540. package/build-types/components/post-visibility/utils.d.ts.map +1 -0
  541. package/build-types/components/posts-per-page/index.d.ts +2 -0
  542. package/build-types/components/posts-per-page/index.d.ts.map +1 -0
  543. package/build-types/components/preferences-modal/enable-panel.d.ts +3 -0
  544. package/build-types/components/preferences-modal/enable-panel.d.ts.map +1 -0
  545. package/build-types/components/preferences-modal/enable-plugin-document-setting-panel.d.ts +14 -0
  546. package/build-types/components/preferences-modal/enable-plugin-document-setting-panel.d.ts.map +1 -0
  547. package/build-types/components/preferences-modal/enable-publish-sidebar.d.ts +3 -0
  548. package/build-types/components/preferences-modal/enable-publish-sidebar.d.ts.map +1 -0
  549. package/build-types/components/preferences-modal/index.d.ts +4 -0
  550. package/build-types/components/preferences-modal/index.d.ts.map +1 -0
  551. package/build-types/components/preview-dropdown/index.d.ts +5 -0
  552. package/build-types/components/preview-dropdown/index.d.ts.map +1 -0
  553. package/build-types/components/provider/disable-non-page-content-blocks.d.ts +6 -0
  554. package/build-types/components/provider/disable-non-page-content-blocks.d.ts.map +1 -0
  555. package/build-types/components/provider/index.d.ts +65 -0
  556. package/build-types/components/provider/index.d.ts.map +1 -0
  557. package/build-types/components/provider/navigation-block-editing-mode.d.ts +9 -0
  558. package/build-types/components/provider/navigation-block-editing-mode.d.ts.map +1 -0
  559. package/build-types/components/provider/use-auto-switch-editor-sidebars.d.ts +7 -0
  560. package/build-types/components/provider/use-auto-switch-editor-sidebars.d.ts.map +1 -0
  561. package/build-types/components/provider/use-block-editor-settings.d.ts +13 -0
  562. package/build-types/components/provider/use-block-editor-settings.d.ts.map +1 -0
  563. package/build-types/components/provider/use-hide-blocks-from-inserter.d.ts +9 -0
  564. package/build-types/components/provider/use-hide-blocks-from-inserter.d.ts.map +1 -0
  565. package/build-types/components/provider/with-registry-provider.d.ts +3 -0
  566. package/build-types/components/provider/with-registry-provider.d.ts.map +1 -0
  567. package/build-types/components/resizable-editor/index.d.ts +8 -0
  568. package/build-types/components/resizable-editor/index.d.ts.map +1 -0
  569. package/build-types/components/resizable-editor/resize-handle.d.ts +5 -0
  570. package/build-types/components/resizable-editor/resize-handle.d.ts.map +1 -0
  571. package/build-types/components/save-publish-panels/index.d.ts +11 -0
  572. package/build-types/components/save-publish-panels/index.d.ts.map +1 -0
  573. package/build-types/components/sidebar/constants.d.ts +5 -0
  574. package/build-types/components/sidebar/constants.d.ts.map +1 -0
  575. package/build-types/components/sidebar/header.d.ts +3 -0
  576. package/build-types/components/sidebar/header.d.ts.map +1 -0
  577. package/build-types/components/sidebar/index.d.ts +6 -0
  578. package/build-types/components/sidebar/index.d.ts.map +1 -0
  579. package/build-types/components/sidebar/post-summary.d.ts +4 -0
  580. package/build-types/components/sidebar/post-summary.d.ts.map +1 -0
  581. package/build-types/components/site-discussion/index.d.ts +2 -0
  582. package/build-types/components/site-discussion/index.d.ts.map +1 -0
  583. package/build-types/components/start-page-options/index.d.ts +2 -0
  584. package/build-types/components/start-page-options/index.d.ts.map +1 -0
  585. package/build-types/components/start-template-options/index.d.ts +2 -0
  586. package/build-types/components/start-template-options/index.d.ts.map +1 -0
  587. package/build-types/components/table-of-contents/index.d.ts +7 -0
  588. package/build-types/components/table-of-contents/index.d.ts.map +1 -0
  589. package/build-types/components/table-of-contents/panel.d.ts +6 -0
  590. package/build-types/components/table-of-contents/panel.d.ts.map +1 -0
  591. package/build-types/components/template-content-panel/index.d.ts +4 -0
  592. package/build-types/components/template-content-panel/index.d.ts.map +1 -0
  593. package/build-types/components/template-part-content-panel/index.d.ts +2 -0
  594. package/build-types/components/template-part-content-panel/index.d.ts.map +1 -0
  595. package/build-types/components/template-part-menu-items/convert-to-regular.d.ts +5 -0
  596. package/build-types/components/template-part-menu-items/convert-to-regular.d.ts.map +1 -0
  597. package/build-types/components/template-part-menu-items/convert-to-template-part.d.ts +5 -0
  598. package/build-types/components/template-part-menu-items/convert-to-template-part.d.ts.map +1 -0
  599. package/build-types/components/template-part-menu-items/index.d.ts +2 -0
  600. package/build-types/components/template-part-menu-items/index.d.ts.map +1 -0
  601. package/build-types/components/template-validation-notice/index.d.ts +2 -0
  602. package/build-types/components/template-validation-notice/index.d.ts.map +1 -0
  603. package/build-types/components/text-editor/index.d.ts +4 -0
  604. package/build-types/components/text-editor/index.d.ts.map +1 -0
  605. package/build-types/components/theme-support-check/index.d.ts +14 -0
  606. package/build-types/components/theme-support-check/index.d.ts.map +1 -0
  607. package/build-types/components/time-to-read/index.d.ts +7 -0
  608. package/build-types/components/time-to-read/index.d.ts.map +1 -0
  609. package/build-types/components/unsaved-changes-warning/index.d.ts +8 -0
  610. package/build-types/components/unsaved-changes-warning/index.d.ts.map +1 -0
  611. package/build-types/components/visual-editor/edit-template-blocks-notification.d.ts +18 -0
  612. package/build-types/components/visual-editor/edit-template-blocks-notification.d.ts.map +1 -0
  613. package/build-types/components/visual-editor/index.d.ts +10 -0
  614. package/build-types/components/visual-editor/index.d.ts.map +1 -0
  615. package/build-types/components/word-count/index.d.ts +7 -0
  616. package/build-types/components/word-count/index.d.ts.map +1 -0
  617. package/build-types/dataviews/actions/delete-post.d.ts +5 -0
  618. package/build-types/dataviews/actions/delete-post.d.ts.map +1 -0
  619. package/build-types/dataviews/actions/export-pattern.d.ts +8 -0
  620. package/build-types/dataviews/actions/export-pattern.d.ts.map +1 -0
  621. package/build-types/dataviews/actions/index.d.ts +2 -0
  622. package/build-types/dataviews/actions/index.d.ts.map +1 -0
  623. package/build-types/dataviews/actions/reset-post.d.ts +5 -0
  624. package/build-types/dataviews/actions/reset-post.d.ts.map +1 -0
  625. package/build-types/dataviews/actions/utils.d.ts +11 -0
  626. package/build-types/dataviews/actions/utils.d.ts.map +1 -0
  627. package/build-types/dataviews/api.d.ts +27 -0
  628. package/build-types/dataviews/api.d.ts.map +1 -0
  629. package/build-types/dataviews/store/private-actions.d.ts +2 -2
  630. package/build-types/dataviews/store/private-actions.d.ts.map +1 -1
  631. package/build-types/dataviews/store/private-selectors.d.ts +2 -5
  632. package/build-types/dataviews/store/private-selectors.d.ts.map +1 -1
  633. package/build-types/dataviews/store/reducer.d.ts +5 -1
  634. package/build-types/dataviews/store/reducer.d.ts.map +1 -1
  635. package/build-types/dataviews/types.d.ts +34 -0
  636. package/build-types/dataviews/types.d.ts.map +1 -0
  637. package/build-types/hooks/custom-sources-backwards-compatibility.d.ts +10 -0
  638. package/build-types/hooks/custom-sources-backwards-compatibility.d.ts.map +1 -0
  639. package/build-types/hooks/default-autocompleters.d.ts +2 -0
  640. package/build-types/hooks/default-autocompleters.d.ts.map +1 -0
  641. package/build-types/hooks/index.d.ts +2 -0
  642. package/build-types/hooks/index.d.ts.map +1 -0
  643. package/build-types/hooks/media-upload.d.ts +2 -0
  644. package/build-types/hooks/media-upload.d.ts.map +1 -0
  645. package/build-types/hooks/pattern-overrides.d.ts +2 -0
  646. package/build-types/hooks/pattern-overrides.d.ts.map +1 -0
  647. package/build-types/hooks/use-select-nearest-editable-block.d.ts +4 -0
  648. package/build-types/hooks/use-select-nearest-editable-block.d.ts.map +1 -0
  649. package/build-types/index.d.ts +6 -0
  650. package/build-types/index.d.ts.map +1 -0
  651. package/build-types/lock-unlock.d.ts +3 -0
  652. package/build-types/lock-unlock.d.ts.map +1 -0
  653. package/build-types/private-apis.d.ts +2 -0
  654. package/build-types/private-apis.d.ts.map +1 -0
  655. package/build-types/store/actions.d.ts +367 -0
  656. package/build-types/store/actions.d.ts.map +1 -0
  657. package/build-types/store/constants.d.ts +31 -0
  658. package/build-types/store/constants.d.ts.map +1 -0
  659. package/build-types/store/defaults.d.ts +21 -0
  660. package/build-types/store/defaults.d.ts.map +1 -0
  661. package/build-types/store/index.d.ts +17 -0
  662. package/build-types/store/index.d.ts.map +1 -0
  663. package/build-types/store/local-autosave.d.ts +4 -0
  664. package/build-types/store/local-autosave.d.ts.map +1 -0
  665. package/build-types/store/private-actions.d.ts +37 -0
  666. package/build-types/store/private-actions.d.ts.map +1 -0
  667. package/build-types/store/private-selectors.d.ts +24 -0
  668. package/build-types/store/private-selectors.d.ts.map +1 -0
  669. package/build-types/store/reducer.d.ts +228 -0
  670. package/build-types/store/reducer.d.ts.map +1 -0
  671. package/build-types/store/selectors.d.ts +854 -0
  672. package/build-types/store/selectors.d.ts.map +1 -0
  673. package/build-types/store/utils/get-filtered-template-parts.d.ts +3 -0
  674. package/build-types/store/utils/get-filtered-template-parts.d.ts.map +1 -0
  675. package/build-types/store/utils/is-template-revertable.d.ts +8 -0
  676. package/build-types/store/utils/is-template-revertable.d.ts.map +1 -0
  677. package/build-types/store/utils/notice-builder.d.ts +27 -0
  678. package/build-types/store/utils/notice-builder.d.ts.map +1 -0
  679. package/build-types/utils/get-template-part-icon.d.ts +9 -0
  680. package/build-types/utils/get-template-part-icon.d.ts.map +1 -0
  681. package/build-types/utils/index.d.ts +5 -0
  682. package/build-types/utils/index.d.ts.map +1 -0
  683. package/build-types/utils/media-upload/index.d.ts +21 -0
  684. package/build-types/utils/media-upload/index.d.ts.map +1 -0
  685. package/build-types/utils/set-nested-value.d.ts +20 -0
  686. package/build-types/utils/set-nested-value.d.ts.map +1 -0
  687. package/build-types/utils/terms.d.ts +12 -0
  688. package/build-types/utils/terms.d.ts.map +1 -0
  689. package/build-types/utils/url.d.ts +18 -0
  690. package/build-types/utils/url.d.ts.map +1 -0
  691. package/package.json +36 -35
  692. package/src/bindings/pattern-overrides.js +9 -10
  693. package/src/bindings/post-meta.js +5 -0
  694. package/src/components/create-template-part-modal/index.js +2 -0
  695. package/src/components/create-template-part-modal/style.scss +0 -6
  696. package/src/components/document-bar/index.js +11 -4
  697. package/src/components/editor-interface/index.js +19 -8
  698. package/src/components/entities-saved-states/entity-record-item.js +4 -14
  699. package/src/components/entities-saved-states/index.js +1 -1
  700. package/src/components/entities-saved-states/style.scss +0 -13
  701. package/src/components/global-keyboard-shortcuts/index.js +1 -1
  702. package/src/components/global-styles-provider/index.js +7 -90
  703. package/src/components/header/index.js +2 -1
  704. package/src/components/index.js +11 -2
  705. package/src/components/inserter-sidebar/index.js +4 -24
  706. package/src/components/list-view-sidebar/index.js +34 -62
  707. package/src/components/list-view-sidebar/style.scss +0 -34
  708. package/src/components/page-attributes/parent.js +6 -3
  709. package/src/components/post-actions/actions.js +495 -621
  710. package/src/components/post-actions/index.js +4 -2
  711. package/src/components/post-card-panel/style.scss +1 -0
  712. package/src/components/post-excerpt/index.js +4 -1
  713. package/src/components/post-excerpt/panel.js +3 -2
  714. package/src/components/post-featured-image/style.scss +15 -0
  715. package/src/components/post-panel-row/style.scss +1 -0
  716. package/src/components/post-preview-button/index.js +1 -1
  717. package/src/components/post-publish-panel/index.js +1 -1
  718. package/src/components/post-publish-panel/style.scss +1 -1
  719. package/src/components/post-saved-state/index.js +11 -1
  720. package/src/components/post-schedule/index.js +5 -0
  721. package/src/components/post-slug/check.js +8 -0
  722. package/src/components/post-slug/index.js +5 -0
  723. package/src/components/post-status/index.js +3 -1
  724. package/src/components/post-sticky/index.js +10 -13
  725. package/src/components/post-sticky/style.scss +3 -2
  726. package/src/components/post-taxonomies/README.md +1 -1
  727. package/src/components/post-template/create-new-template-modal.js +2 -0
  728. package/src/components/post-title/index.js +5 -12
  729. package/src/components/post-url/style.scss +4 -0
  730. package/src/components/preview-dropdown/index.js +1 -1
  731. package/src/components/provider/index.native.js +3 -11
  732. package/src/components/provider/use-block-editor-settings.js +10 -5
  733. package/src/components/save-publish-panels/index.js +33 -23
  734. package/src/components/sidebar/index.js +3 -3
  735. package/src/components/sidebar/post-summary.js +0 -4
  736. package/src/components/template-content-panel/index.js +29 -5
  737. package/src/components/template-part-content-panel/index.js +62 -0
  738. package/src/components/visual-editor/index.js +1 -1
  739. package/src/components/visual-editor/style.scss +3 -1
  740. package/src/dataviews/actions/delete-post.tsx +107 -0
  741. package/src/{components/post-actions/export-pattern-action.js → dataviews/actions/export-pattern.tsx} +19 -19
  742. package/src/dataviews/actions/index.ts +25 -0
  743. package/src/dataviews/actions/reset-post.tsx +144 -0
  744. package/src/dataviews/actions/utils.ts +54 -0
  745. package/src/dataviews/store/private-actions.ts +2 -2
  746. package/src/dataviews/store/private-selectors.ts +13 -6
  747. package/src/dataviews/store/reducer.ts +12 -5
  748. package/src/dataviews/types.ts +33 -0
  749. package/src/hooks/pattern-overrides.js +6 -4
  750. package/src/lock-unlock.js +1 -1
  751. package/src/private-apis.js +2 -0
  752. package/src/private-apis.native.js +0 -2
  753. package/src/store/private-actions.js +49 -21
  754. package/src/store/private-selectors.js +0 -25
  755. package/src/store/utils/is-template-revertable.js +8 -8
  756. package/src/style.scss +0 -1
  757. package/tsconfig.json +3 -2
  758. package/tsconfig.tsbuildinfo +1 -1
  759. package/build/components/post-actions/export-pattern-action.js.map +0 -1
  760. package/build/components/post-actions/export-pattern-action.native.js +0 -11
  761. package/build/components/post-actions/export-pattern-action.native.js.map +0 -1
  762. package/build/components/template-areas/index.js +0 -84
  763. package/build/components/template-areas/index.js.map +0 -1
  764. package/build-module/components/post-actions/export-pattern-action.js.map +0 -1
  765. package/build-module/components/post-actions/export-pattern-action.native.js +0 -5
  766. package/build-module/components/post-actions/export-pattern-action.native.js.map +0 -1
  767. package/build-module/components/template-areas/index.js +0 -78
  768. package/build-module/components/template-areas/index.js.map +0 -1
  769. package/src/components/post-actions/export-pattern-action.native.js +0 -4
  770. package/src/components/template-areas/index.js +0 -94
  771. package/src/components/template-areas/style.scss +0 -22
  772. /package/src/store/{constants.js → constants.ts} +0 -0
@@ -0,0 +1,96 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _icons = require("@wordpress/icons");
8
+ var _data = require("@wordpress/data");
9
+ var _i18n = require("@wordpress/i18n");
10
+ var _element = require("@wordpress/element");
11
+ var _components = require("@wordpress/components");
12
+ var _patterns = require("@wordpress/patterns");
13
+ var _utils = require("./utils");
14
+ var _store = require("../../store");
15
+ var _lockUnlock = require("../../lock-unlock");
16
+ var _jsxRuntime = require("react/jsx-runtime");
17
+ /**
18
+ * WordPress dependencies
19
+ */
20
+
21
+ // @ts-ignore
22
+
23
+ /**
24
+ * Internal dependencies
25
+ */
26
+
27
+ // @ts-ignore
28
+
29
+ const {
30
+ PATTERN_TYPES
31
+ } = (0, _lockUnlock.unlock)(_patterns.privateApis);
32
+
33
+ // This action is used for templates, patterns and template parts.
34
+ // Every other post type uses the similar `trashPostAction` which
35
+ // moves the post to trash.
36
+ const deletePostAction = {
37
+ id: 'delete-post',
38
+ label: (0, _i18n.__)('Delete'),
39
+ isPrimary: true,
40
+ icon: _icons.trash,
41
+ isEligible(post) {
42
+ if ((0, _utils.isTemplateOrTemplatePart)(post)) {
43
+ return (0, _utils.isTemplateRemovable)(post);
44
+ }
45
+ // We can only remove user patterns.
46
+ return post.type === PATTERN_TYPES.user;
47
+ },
48
+ supportsBulk: true,
49
+ hideModalHeader: true,
50
+ RenderModal: ({
51
+ items,
52
+ closeModal,
53
+ onActionPerformed
54
+ }) => {
55
+ const [isBusy, setIsBusy] = (0, _element.useState)(false);
56
+ const {
57
+ removeTemplates
58
+ } = (0, _lockUnlock.unlock)((0, _data.useDispatch)(_store.store));
59
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.__experimentalVStack, {
60
+ spacing: "5",
61
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.__experimentalText, {
62
+ children: items.length > 1 ? (0, _i18n.sprintf)(
63
+ // translators: %d: number of items to delete.
64
+ (0, _i18n._n)('Delete %d item?', 'Delete %d items?', items.length), items.length) : (0, _i18n.sprintf)(
65
+ // translators: %s: The template or template part's titles
66
+ (0, _i18n.__)('Delete "%s"?'), (0, _utils.getItemTitle)(items[0]))
67
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.__experimentalHStack, {
68
+ justify: "right",
69
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
70
+ variant: "tertiary",
71
+ onClick: closeModal,
72
+ disabled: isBusy,
73
+ accessibleWhenDisabled: true,
74
+ children: (0, _i18n.__)('Cancel')
75
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
76
+ variant: "primary",
77
+ onClick: async () => {
78
+ setIsBusy(true);
79
+ await removeTemplates(items, {
80
+ allowUndo: false
81
+ });
82
+ onActionPerformed?.(items);
83
+ setIsBusy(false);
84
+ closeModal?.();
85
+ },
86
+ isBusy: isBusy,
87
+ disabled: isBusy,
88
+ accessibleWhenDisabled: true,
89
+ children: (0, _i18n.__)('Delete')
90
+ })]
91
+ })]
92
+ });
93
+ }
94
+ };
95
+ var _default = exports.default = deletePostAction;
96
+ //# sourceMappingURL=delete-post.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_icons","require","_data","_i18n","_element","_components","_patterns","_utils","_store","_lockUnlock","_jsxRuntime","PATTERN_TYPES","unlock","patternsPrivateApis","deletePostAction","id","label","__","isPrimary","icon","trash","isEligible","post","isTemplateOrTemplatePart","isTemplateRemovable","type","user","supportsBulk","hideModalHeader","RenderModal","items","closeModal","onActionPerformed","isBusy","setIsBusy","useState","removeTemplates","useDispatch","editorStore","jsxs","__experimentalVStack","spacing","children","jsx","__experimentalText","length","sprintf","_n","getItemTitle","__experimentalHStack","justify","Button","variant","onClick","disabled","accessibleWhenDisabled","allowUndo","_default","exports","default"],"sources":["@wordpress/editor/src/dataviews/actions/delete-post.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { trash } from '@wordpress/icons';\nimport { useDispatch } from '@wordpress/data';\nimport { __, _n, sprintf } from '@wordpress/i18n';\nimport { useState } from '@wordpress/element';\nimport {\n\tButton,\n\t__experimentalText as Text,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\n// @ts-ignore\nimport { privateApis as patternsPrivateApis } from '@wordpress/patterns';\nimport type { Action } from '@wordpress/dataviews';\nimport type { StoreDescriptor } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport {\n\tisTemplateRemovable,\n\tgetItemTitle,\n\tisTemplateOrTemplatePart,\n} from './utils';\n// @ts-ignore\nimport { store as editorStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\nimport type { Post } from '../types';\n\nconst { PATTERN_TYPES } = unlock( patternsPrivateApis );\n\n// This action is used for templates, patterns and template parts.\n// Every other post type uses the similar `trashPostAction` which\n// moves the post to trash.\nconst deletePostAction: Action< Post > = {\n\tid: 'delete-post',\n\tlabel: __( 'Delete' ),\n\tisPrimary: true,\n\ticon: trash,\n\tisEligible( post ) {\n\t\tif ( isTemplateOrTemplatePart( post ) ) {\n\t\t\treturn isTemplateRemovable( post );\n\t\t}\n\t\t// We can only remove user patterns.\n\t\treturn post.type === PATTERN_TYPES.user;\n\t},\n\tsupportsBulk: true,\n\thideModalHeader: true,\n\tRenderModal: ( { items, closeModal, onActionPerformed } ) => {\n\t\tconst [ isBusy, setIsBusy ] = useState( false );\n\t\tconst { removeTemplates } = unlock(\n\t\t\tuseDispatch( editorStore as StoreDescriptor )\n\t\t);\n\t\treturn (\n\t\t\t<VStack spacing=\"5\">\n\t\t\t\t<Text>\n\t\t\t\t\t{ items.length > 1\n\t\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t\t// translators: %d: number of items to delete.\n\t\t\t\t\t\t\t\t_n(\n\t\t\t\t\t\t\t\t\t'Delete %d item?',\n\t\t\t\t\t\t\t\t\t'Delete %d items?',\n\t\t\t\t\t\t\t\t\titems.length\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\titems.length\n\t\t\t\t\t\t )\n\t\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t\t// translators: %s: The template or template part's titles\n\t\t\t\t\t\t\t\t__( 'Delete \"%s\"?' ),\n\t\t\t\t\t\t\t\tgetItemTitle( items[ 0 ] )\n\t\t\t\t\t\t ) }\n\t\t\t\t</Text>\n\t\t\t\t<HStack justify=\"right\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\tonClick={ closeModal }\n\t\t\t\t\t\tdisabled={ isBusy }\n\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\tonClick={ async () => {\n\t\t\t\t\t\t\tsetIsBusy( true );\n\t\t\t\t\t\t\tawait removeTemplates( items, {\n\t\t\t\t\t\t\t\tallowUndo: false,\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\tonActionPerformed?.( items );\n\t\t\t\t\t\t\tsetIsBusy( false );\n\t\t\t\t\t\t\tcloseModal?.();\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tisBusy={ isBusy }\n\t\t\t\t\t\tdisabled={ isBusy }\n\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Delete' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t</HStack>\n\t\t\t</VStack>\n\t\t);\n\t},\n};\n\nexport default deletePostAction;\n"],"mappings":"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","ignoreList":[]}
@@ -3,13 +3,12 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.exportPatternAsJSONAction = void 0;
6
+ exports.default = void 0;
7
7
  var _changeCase = require("change-case");
8
8
  var _clientZip = require("client-zip");
9
9
  var _blob = require("@wordpress/blob");
10
10
  var _i18n = require("@wordpress/i18n");
11
- var _patterns = require("@wordpress/patterns");
12
- var _lockUnlock = require("../../lock-unlock");
11
+ var _utils = require("./utils");
13
12
  /**
14
13
  * External dependencies
15
14
  */
@@ -22,35 +21,26 @@ var _lockUnlock = require("../../lock-unlock");
22
21
  * Internal dependencies
23
22
  */
24
23
 
25
- // Patterns.
26
- const {
27
- PATTERN_TYPES
28
- } = (0, _lockUnlock.unlock)(_patterns.privateApis);
29
24
  function getJsonFromItem(item) {
30
25
  return JSON.stringify({
31
26
  __file: item.type,
32
- title: item.title || item.name,
33
- content: item.patternPost.content.raw,
34
- syncStatus: item.patternPost.wp_pattern_sync_status
27
+ title: (0, _utils.getItemTitle)(item),
28
+ content: typeof item.content === 'string' ? item.content : item.content?.raw,
29
+ syncStatus: item.wp_pattern_sync_status
35
30
  }, null, 2);
36
31
  }
37
- const exportPatternAsJSONAction = exports.exportPatternAsJSONAction = {
32
+ const exportPattern = {
38
33
  id: 'export-pattern',
39
34
  label: (0, _i18n.__)('Export as JSON'),
40
35
  supportsBulk: true,
41
- isEligible: item => {
42
- if (!item.type) {
43
- return false;
44
- }
45
- return item.type === PATTERN_TYPES.user;
46
- },
36
+ isEligible: item => item.type === 'wp_block',
47
37
  callback: async items => {
48
38
  if (items.length === 1) {
49
- return (0, _blob.downloadBlob)(`${(0, _changeCase.paramCase)(items[0].title || items[0].name)}.json`, getJsonFromItem(items[0]), 'application/json');
39
+ return (0, _blob.downloadBlob)(`${(0, _changeCase.paramCase)((0, _utils.getItemTitle)(items[0]) || items[0].slug)}.json`, getJsonFromItem(items[0]), 'application/json');
50
40
  }
51
41
  const nameCount = {};
52
42
  const filesToZip = items.map(item => {
53
- const name = (0, _changeCase.paramCase)(item.title || item.name);
43
+ const name = (0, _changeCase.paramCase)((0, _utils.getItemTitle)(item) || item.slug);
54
44
  nameCount[name] = (nameCount[name] || 0) + 1;
55
45
  return {
56
46
  name: `${name + (nameCount[name] > 1 ? '-' + (nameCount[name] - 1) : '')}.json`,
@@ -61,4 +51,5 @@ const exportPatternAsJSONAction = exports.exportPatternAsJSONAction = {
61
51
  return (0, _blob.downloadBlob)((0, _i18n.__)('patterns-export') + '.zip', await (0, _clientZip.downloadZip)(filesToZip).blob(), 'application/zip');
62
52
  }
63
53
  };
64
- //# sourceMappingURL=export-pattern-action.js.map
54
+ var _default = exports.default = exportPattern;
55
+ //# sourceMappingURL=export-pattern.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_changeCase","require","_clientZip","_blob","_i18n","_utils","getJsonFromItem","item","JSON","stringify","__file","type","title","getItemTitle","content","raw","syncStatus","wp_pattern_sync_status","exportPattern","id","label","__","supportsBulk","isEligible","callback","items","length","downloadBlob","kebabCase","slug","nameCount","filesToZip","map","name","lastModified","Date","input","downloadZip","blob","_default","exports","default"],"sources":["@wordpress/editor/src/dataviews/actions/export-pattern.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport { paramCase as kebabCase } from 'change-case';\nimport { downloadZip } from 'client-zip';\n\n/**\n * WordPress dependencies\n */\nimport { downloadBlob } from '@wordpress/blob';\nimport { __ } from '@wordpress/i18n';\nimport type { Action } from '@wordpress/dataviews';\n\n/**\n * Internal dependencies\n */\nimport type { Pattern } from '../types';\nimport { getItemTitle } from './utils';\n\nfunction getJsonFromItem( item: Pattern ) {\n\treturn JSON.stringify(\n\t\t{\n\t\t\t__file: item.type,\n\t\t\ttitle: getItemTitle( item ),\n\t\t\tcontent:\n\t\t\t\ttypeof item.content === 'string'\n\t\t\t\t\t? item.content\n\t\t\t\t\t: item.content?.raw,\n\t\t\tsyncStatus: item.wp_pattern_sync_status,\n\t\t},\n\t\tnull,\n\t\t2\n\t);\n}\n\nconst exportPattern: Action< Pattern > = {\n\tid: 'export-pattern',\n\tlabel: __( 'Export as JSON' ),\n\tsupportsBulk: true,\n\tisEligible: ( item ) => item.type === 'wp_block',\n\tcallback: async ( items ) => {\n\t\tif ( items.length === 1 ) {\n\t\t\treturn downloadBlob(\n\t\t\t\t`${ kebabCase(\n\t\t\t\t\tgetItemTitle( items[ 0 ] ) || items[ 0 ].slug\n\t\t\t\t) }.json`,\n\t\t\t\tgetJsonFromItem( items[ 0 ] ),\n\t\t\t\t'application/json'\n\t\t\t);\n\t\t}\n\t\tconst nameCount: Record< string, number > = {};\n\t\tconst filesToZip = items.map( ( item ) => {\n\t\t\tconst name = kebabCase( getItemTitle( item ) || item.slug );\n\t\t\tnameCount[ name ] = ( nameCount[ name ] || 0 ) + 1;\n\t\t\treturn {\n\t\t\t\tname: `${\n\t\t\t\t\tname +\n\t\t\t\t\t( nameCount[ name ] > 1\n\t\t\t\t\t\t? '-' + ( nameCount[ name ] - 1 )\n\t\t\t\t\t\t: '' )\n\t\t\t\t}.json`,\n\t\t\t\tlastModified: new Date(),\n\t\t\t\tinput: getJsonFromItem( item ),\n\t\t\t};\n\t\t} );\n\t\treturn downloadBlob(\n\t\t\t__( 'patterns-export' ) + '.zip',\n\t\t\tawait downloadZip( filesToZip ).blob(),\n\t\t\t'application/zip'\n\t\t);\n\t},\n};\n\nexport default exportPattern;\n"],"mappings":";;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AAKA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AAOA,IAAAI,MAAA,GAAAJ,OAAA;AAjBA;AACA;AACA;;AAIA;AACA;AACA;;AAKA;AACA;AACA;;AAIA,SAASK,eAAeA,CAAEC,IAAa,EAAG;EACzC,OAAOC,IAAI,CAACC,SAAS,CACpB;IACCC,MAAM,EAAEH,IAAI,CAACI,IAAI;IACjBC,KAAK,EAAE,IAAAC,mBAAY,EAAEN,IAAK,CAAC;IAC3BO,OAAO,EACN,OAAOP,IAAI,CAACO,OAAO,KAAK,QAAQ,GAC7BP,IAAI,CAACO,OAAO,GACZP,IAAI,CAACO,OAAO,EAAEC,GAAG;IACrBC,UAAU,EAAET,IAAI,CAACU;EAClB,CAAC,EACD,IAAI,EACJ,CACD,CAAC;AACF;AAEA,MAAMC,aAAgC,GAAG;EACxCC,EAAE,EAAE,gBAAgB;EACpBC,KAAK,EAAE,IAAAC,QAAE,EAAE,gBAAiB,CAAC;EAC7BC,YAAY,EAAE,IAAI;EAClBC,UAAU,EAAIhB,IAAI,IAAMA,IAAI,CAACI,IAAI,KAAK,UAAU;EAChDa,QAAQ,EAAE,MAAQC,KAAK,IAAM;IAC5B,IAAKA,KAAK,CAACC,MAAM,KAAK,CAAC,EAAG;MACzB,OAAO,IAAAC,kBAAY,EACjB,GAAG,IAAAC,qBAAS,EACZ,IAAAf,mBAAY,EAAEY,KAAK,CAAE,CAAC,CAAG,CAAC,IAAIA,KAAK,CAAE,CAAC,CAAE,CAACI,IAC1C,CAAG,OAAM,EACTvB,eAAe,CAAEmB,KAAK,CAAE,CAAC,CAAG,CAAC,EAC7B,kBACD,CAAC;IACF;IACA,MAAMK,SAAmC,GAAG,CAAC,CAAC;IAC9C,MAAMC,UAAU,GAAGN,KAAK,CAACO,GAAG,CAAIzB,IAAI,IAAM;MACzC,MAAM0B,IAAI,GAAG,IAAAL,qBAAS,EAAE,IAAAf,mBAAY,EAAEN,IAAK,CAAC,IAAIA,IAAI,CAACsB,IAAK,CAAC;MAC3DC,SAAS,CAAEG,IAAI,CAAE,GAAG,CAAEH,SAAS,CAAEG,IAAI,CAAE,IAAI,CAAC,IAAK,CAAC;MAClD,OAAO;QACNA,IAAI,EAAG,GACNA,IAAI,IACFH,SAAS,CAAEG,IAAI,CAAE,GAAG,CAAC,GACpB,GAAG,IAAKH,SAAS,CAAEG,IAAI,CAAE,GAAG,CAAC,CAAE,GAC/B,EAAE,CACL,OAAM;QACPC,YAAY,EAAE,IAAIC,IAAI,CAAC,CAAC;QACxBC,KAAK,EAAE9B,eAAe,CAAEC,IAAK;MAC9B,CAAC;IACF,CAAE,CAAC;IACH,OAAO,IAAAoB,kBAAY,EAClB,IAAAN,QAAE,EAAE,iBAAkB,CAAC,GAAG,MAAM,EAChC,MAAM,IAAAgB,sBAAW,EAAEN,UAAW,CAAC,CAACO,IAAI,CAAC,CAAC,EACtC,iBACD,CAAC;EACF;AACD,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEavB,aAAa","ignoreList":[]}
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.default = registerDefaultActions;
8
+ var _data = require("@wordpress/data");
9
+ var _deletePost = _interopRequireDefault(require("./delete-post"));
10
+ var _exportPattern = _interopRequireDefault(require("./export-pattern"));
11
+ var _resetPost = _interopRequireDefault(require("./reset-post"));
12
+ var _store = require("../../store");
13
+ var _lockUnlock = require("../../lock-unlock");
14
+ /**
15
+ * WordPress dependencies
16
+ */
17
+
18
+ /**
19
+ * Internal dependencies
20
+ */
21
+
22
+ // @ts-ignore
23
+
24
+ function registerDefaultActions() {
25
+ const {
26
+ registerEntityAction
27
+ } = (0, _lockUnlock.unlock)((0, _data.dispatch)(_store.store));
28
+ registerEntityAction('postType', 'wp_block', _exportPattern.default);
29
+ registerEntityAction('postType', '*', _resetPost.default);
30
+ registerEntityAction('postType', '*', _deletePost.default);
31
+ }
32
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_data","require","_deletePost","_interopRequireDefault","_exportPattern","_resetPost","_store","_lockUnlock","registerDefaultActions","registerEntityAction","unlock","dispatch","editorStore","exportPattern","resetPost","deletePost"],"sources":["@wordpress/editor/src/dataviews/actions/index.ts"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { type StoreDescriptor, dispatch } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport deletePost from './delete-post';\nimport exportPattern from './export-pattern';\nimport resetPost from './reset-post';\n\n// @ts-ignore\nimport { store as editorStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nexport default function registerDefaultActions() {\n\tconst { registerEntityAction } = unlock(\n\t\tdispatch( editorStore as StoreDescriptor )\n\t);\n\n\tregisterEntityAction( 'postType', 'wp_block', exportPattern );\n\tregisterEntityAction( 'postType', '*', resetPost );\n\tregisterEntityAction( 'postType', '*', deletePost );\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AAKA,IAAAC,WAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,cAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,UAAA,GAAAF,sBAAA,CAAAF,OAAA;AAGA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,WAAA,GAAAN,OAAA;AAdA;AACA;AACA;;AAGA;AACA;AACA;;AAKA;;AAIe,SAASO,sBAAsBA,CAAA,EAAG;EAChD,MAAM;IAAEC;EAAqB,CAAC,GAAG,IAAAC,kBAAM,EACtC,IAAAC,cAAQ,EAAEC,YAA+B,CAC1C,CAAC;EAEDH,oBAAoB,CAAE,UAAU,EAAE,UAAU,EAAEI,sBAAc,CAAC;EAC7DJ,oBAAoB,CAAE,UAAU,EAAE,GAAG,EAAEK,kBAAU,CAAC;EAClDL,oBAAoB,CAAE,UAAU,EAAE,GAAG,EAAEM,mBAAW,CAAC;AACpD","ignoreList":[]}
@@ -0,0 +1,111 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _icons = require("@wordpress/icons");
8
+ var _data = require("@wordpress/data");
9
+ var _coreData = require("@wordpress/core-data");
10
+ var _i18n = require("@wordpress/i18n");
11
+ var _notices = require("@wordpress/notices");
12
+ var _element = require("@wordpress/element");
13
+ var _components = require("@wordpress/components");
14
+ var _constants = require("../../store/constants");
15
+ var _store = require("../../store");
16
+ var _lockUnlock = require("../../lock-unlock");
17
+ var _utils = require("./utils");
18
+ var _jsxRuntime = require("react/jsx-runtime");
19
+ /**
20
+ * WordPress dependencies
21
+ */
22
+
23
+ /**
24
+ * Internal dependencies
25
+ */
26
+
27
+ const resetPost = {
28
+ id: 'reset-post',
29
+ label: (0, _i18n.__)('Reset'),
30
+ isEligible: item => {
31
+ return (0, _utils.isTemplateOrTemplatePart)(item) && item?.source === _constants.TEMPLATE_ORIGINS.custom && item?.has_theme_file;
32
+ },
33
+ icon: _icons.backup,
34
+ supportsBulk: true,
35
+ hideModalHeader: true,
36
+ RenderModal: ({
37
+ items,
38
+ closeModal,
39
+ onActionPerformed
40
+ }) => {
41
+ const [isBusy, setIsBusy] = (0, _element.useState)(false);
42
+ const {
43
+ revertTemplate
44
+ } = (0, _lockUnlock.unlock)((0, _data.useDispatch)(_store.store));
45
+ const {
46
+ saveEditedEntityRecord
47
+ } = (0, _data.useDispatch)(_coreData.store);
48
+ const {
49
+ createSuccessNotice,
50
+ createErrorNotice
51
+ } = (0, _data.useDispatch)(_notices.store);
52
+ const onConfirm = async () => {
53
+ try {
54
+ for (const template of items) {
55
+ await revertTemplate(template, {
56
+ allowUndo: false
57
+ });
58
+ await saveEditedEntityRecord('postType', template.type, template.id);
59
+ }
60
+ createSuccessNotice(items.length > 1 ? (0, _i18n.sprintf)( /* translators: The number of items. */
61
+ (0, _i18n.__)('%s items reset.'), items.length) : (0, _i18n.sprintf)( /* translators: The template/part's name. */
62
+ (0, _i18n.__)('"%s" reset.'), (0, _utils.getItemTitle)(items[0])), {
63
+ type: 'snackbar',
64
+ id: 'revert-template-action'
65
+ });
66
+ } catch (error) {
67
+ let fallbackErrorMessage;
68
+ if (items[0].type === _constants.TEMPLATE_POST_TYPE) {
69
+ fallbackErrorMessage = items.length === 1 ? (0, _i18n.__)('An error occurred while reverting the template.') : (0, _i18n.__)('An error occurred while reverting the templates.');
70
+ } else {
71
+ fallbackErrorMessage = items.length === 1 ? (0, _i18n.__)('An error occurred while reverting the template part.') : (0, _i18n.__)('An error occurred while reverting the template parts.');
72
+ }
73
+ const typedError = error;
74
+ const errorMessage = typedError.message && typedError.code !== 'unknown_error' ? typedError.message : fallbackErrorMessage;
75
+ createErrorNotice(errorMessage, {
76
+ type: 'snackbar'
77
+ });
78
+ }
79
+ };
80
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.__experimentalVStack, {
81
+ spacing: "5",
82
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.__experimentalText, {
83
+ children: (0, _i18n.__)('Reset to default and clear all customizations?')
84
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.__experimentalHStack, {
85
+ justify: "right",
86
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
87
+ variant: "tertiary",
88
+ onClick: closeModal,
89
+ disabled: isBusy,
90
+ accessibleWhenDisabled: true,
91
+ children: (0, _i18n.__)('Cancel')
92
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
93
+ variant: "primary",
94
+ onClick: async () => {
95
+ setIsBusy(true);
96
+ await onConfirm();
97
+ onActionPerformed?.(items);
98
+ setIsBusy(false);
99
+ closeModal?.();
100
+ },
101
+ isBusy: isBusy,
102
+ disabled: isBusy,
103
+ accessibleWhenDisabled: true,
104
+ children: (0, _i18n.__)('Reset')
105
+ })]
106
+ })]
107
+ });
108
+ }
109
+ };
110
+ var _default = exports.default = resetPost;
111
+ //# sourceMappingURL=reset-post.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_icons","require","_data","_coreData","_i18n","_notices","_element","_components","_constants","_store","_lockUnlock","_utils","_jsxRuntime","resetPost","id","label","__","isEligible","item","isTemplateOrTemplatePart","source","TEMPLATE_ORIGINS","custom","has_theme_file","icon","backup","supportsBulk","hideModalHeader","RenderModal","items","closeModal","onActionPerformed","isBusy","setIsBusy","useState","revertTemplate","unlock","useDispatch","editorStore","saveEditedEntityRecord","coreStore","createSuccessNotice","createErrorNotice","noticesStore","onConfirm","template","allowUndo","type","length","sprintf","getItemTitle","error","fallbackErrorMessage","TEMPLATE_POST_TYPE","typedError","errorMessage","message","code","jsxs","__experimentalVStack","spacing","children","jsx","__experimentalText","__experimentalHStack","justify","Button","variant","onClick","disabled","accessibleWhenDisabled","_default","exports","default"],"sources":["@wordpress/editor/src/dataviews/actions/reset-post.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { backup } from '@wordpress/icons';\nimport { useDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { useState } from '@wordpress/element';\nimport {\n\tButton,\n\t__experimentalText as Text,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport type { Action } from '@wordpress/dataviews';\nimport type { StoreDescriptor } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { TEMPLATE_POST_TYPE, TEMPLATE_ORIGINS } from '../../store/constants';\nimport { store as editorStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\nimport type { Post, CoreDataError } from '../types';\nimport { isTemplateOrTemplatePart, getItemTitle } from './utils';\n\nconst resetPost: Action< Post > = {\n\tid: 'reset-post',\n\tlabel: __( 'Reset' ),\n\tisEligible: ( item ) => {\n\t\treturn (\n\t\t\tisTemplateOrTemplatePart( item ) &&\n\t\t\titem?.source === TEMPLATE_ORIGINS.custom &&\n\t\t\titem?.has_theme_file\n\t\t);\n\t},\n\ticon: backup,\n\tsupportsBulk: true,\n\thideModalHeader: true,\n\tRenderModal: ( { items, closeModal, onActionPerformed } ) => {\n\t\tconst [ isBusy, setIsBusy ] = useState( false );\n\t\tconst { revertTemplate } = unlock(\n\t\t\tuseDispatch( editorStore as StoreDescriptor )\n\t\t);\n\t\tconst { saveEditedEntityRecord } = useDispatch( coreStore );\n\t\tconst { createSuccessNotice, createErrorNotice } =\n\t\t\tuseDispatch( noticesStore );\n\t\tconst onConfirm = async () => {\n\t\t\ttry {\n\t\t\t\tfor ( const template of items ) {\n\t\t\t\t\tawait revertTemplate( template, {\n\t\t\t\t\t\tallowUndo: false,\n\t\t\t\t\t} );\n\t\t\t\t\tawait saveEditedEntityRecord(\n\t\t\t\t\t\t'postType',\n\t\t\t\t\t\ttemplate.type,\n\t\t\t\t\t\ttemplate.id\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tcreateSuccessNotice(\n\t\t\t\t\titems.length > 1\n\t\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t\t/* translators: The number of items. */\n\t\t\t\t\t\t\t\t__( '%s items reset.' ),\n\t\t\t\t\t\t\t\titems.length\n\t\t\t\t\t\t )\n\t\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t\t/* translators: The template/part's name. */\n\t\t\t\t\t\t\t\t__( '\"%s\" reset.' ),\n\t\t\t\t\t\t\t\tgetItemTitle( items[ 0 ] )\n\t\t\t\t\t\t ),\n\t\t\t\t\t{\n\t\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\t\tid: 'revert-template-action',\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t} catch ( error ) {\n\t\t\t\tlet fallbackErrorMessage;\n\t\t\t\tif ( items[ 0 ].type === TEMPLATE_POST_TYPE ) {\n\t\t\t\t\tfallbackErrorMessage =\n\t\t\t\t\t\titems.length === 1\n\t\t\t\t\t\t\t? __(\n\t\t\t\t\t\t\t\t\t'An error occurred while reverting the template.'\n\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t: __(\n\t\t\t\t\t\t\t\t\t'An error occurred while reverting the templates.'\n\t\t\t\t\t\t\t );\n\t\t\t\t} else {\n\t\t\t\t\tfallbackErrorMessage =\n\t\t\t\t\t\titems.length === 1\n\t\t\t\t\t\t\t? __(\n\t\t\t\t\t\t\t\t\t'An error occurred while reverting the template part.'\n\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t: __(\n\t\t\t\t\t\t\t\t\t'An error occurred while reverting the template parts.'\n\t\t\t\t\t\t\t );\n\t\t\t\t}\n\n\t\t\t\tconst typedError = error as CoreDataError;\n\t\t\t\tconst errorMessage =\n\t\t\t\t\ttypedError.message && typedError.code !== 'unknown_error'\n\t\t\t\t\t\t? typedError.message\n\t\t\t\t\t\t: fallbackErrorMessage;\n\n\t\t\t\tcreateErrorNotice( errorMessage, { type: 'snackbar' } );\n\t\t\t}\n\t\t};\n\t\treturn (\n\t\t\t<VStack spacing=\"5\">\n\t\t\t\t<Text>\n\t\t\t\t\t{ __( 'Reset to default and clear all customizations?' ) }\n\t\t\t\t</Text>\n\t\t\t\t<HStack justify=\"right\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\tonClick={ closeModal }\n\t\t\t\t\t\tdisabled={ isBusy }\n\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\tonClick={ async () => {\n\t\t\t\t\t\t\tsetIsBusy( true );\n\t\t\t\t\t\t\tawait onConfirm();\n\t\t\t\t\t\t\tonActionPerformed?.( items );\n\t\t\t\t\t\t\tsetIsBusy( false );\n\t\t\t\t\t\t\tcloseModal?.();\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tisBusy={ isBusy }\n\t\t\t\t\t\tdisabled={ isBusy }\n\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Reset' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t</HStack>\n\t\t\t</VStack>\n\t\t);\n\t},\n};\n\nexport default resetPost;\n"],"mappings":"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","ignoreList":[]}
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getItemTitle = getItemTitle;
7
+ exports.isTemplateOrTemplatePart = isTemplateOrTemplatePart;
8
+ exports.isTemplateRemovable = isTemplateRemovable;
9
+ var _htmlEntities = require("@wordpress/html-entities");
10
+ var _constants = require("../../store/constants");
11
+ /**
12
+ * WordPress dependencies
13
+ */
14
+
15
+ /**
16
+ * Internal dependencies
17
+ */
18
+
19
+ function isTemplateOrTemplatePart(p) {
20
+ return p.type === _constants.TEMPLATE_POST_TYPE || p.type === _constants.TEMPLATE_PART_POST_TYPE;
21
+ }
22
+ function getItemTitle(item) {
23
+ if (typeof item.title === 'string') {
24
+ return (0, _htmlEntities.decodeEntities)(item.title);
25
+ }
26
+ if ('rendered' in item.title) {
27
+ return (0, _htmlEntities.decodeEntities)(item.title.rendered);
28
+ }
29
+ if ('raw' in item.title) {
30
+ return (0, _htmlEntities.decodeEntities)(item.title.raw);
31
+ }
32
+ return '';
33
+ }
34
+
35
+ /**
36
+ * Check if a template is removable.
37
+ *
38
+ * @param template The template entity to check.
39
+ * @return Whether the template is removable.
40
+ */
41
+ function isTemplateRemovable(template) {
42
+ if (!template) {
43
+ return false;
44
+ }
45
+ // In patterns list page we map the templates parts to a different object
46
+ // than the one returned from the endpoint. This is why we need to check for
47
+ // two props whether is custom or has a theme file.
48
+ return [template.source, template.source].includes(_constants.TEMPLATE_ORIGINS.custom) && !template.has_theme_file;
49
+ }
50
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_htmlEntities","require","_constants","isTemplateOrTemplatePart","p","type","TEMPLATE_POST_TYPE","TEMPLATE_PART_POST_TYPE","getItemTitle","item","title","decodeEntities","rendered","raw","isTemplateRemovable","template","source","includes","TEMPLATE_ORIGINS","custom","has_theme_file"],"sources":["@wordpress/editor/src/dataviews/actions/utils.ts"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport {\n\tTEMPLATE_ORIGINS,\n\tTEMPLATE_PART_POST_TYPE,\n\tTEMPLATE_POST_TYPE,\n} from '../../store/constants';\n\nimport type { Post, TemplateOrTemplatePart } from '../types';\n\nexport function isTemplateOrTemplatePart(\n\tp: Post\n): p is TemplateOrTemplatePart {\n\treturn p.type === TEMPLATE_POST_TYPE || p.type === TEMPLATE_PART_POST_TYPE;\n}\n\nexport function getItemTitle( item: Post ) {\n\tif ( typeof item.title === 'string' ) {\n\t\treturn decodeEntities( item.title );\n\t}\n\tif ( 'rendered' in item.title ) {\n\t\treturn decodeEntities( item.title.rendered );\n\t}\n\tif ( 'raw' in item.title ) {\n\t\treturn decodeEntities( item.title.raw );\n\t}\n\treturn '';\n}\n\n/**\n * Check if a template is removable.\n *\n * @param template The template entity to check.\n * @return Whether the template is removable.\n */\nexport function isTemplateRemovable( template: TemplateOrTemplatePart ) {\n\tif ( ! template ) {\n\t\treturn false;\n\t}\n\t// In patterns list page we map the templates parts to a different object\n\t// than the one returned from the endpoint. This is why we need to check for\n\t// two props whether is custom or has a theme file.\n\treturn (\n\t\t[ template.source, template.source ].includes(\n\t\t\tTEMPLATE_ORIGINS.custom\n\t\t) && ! template.has_theme_file\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,aAAA,GAAAC,OAAA;AAKA,IAAAC,UAAA,GAAAD,OAAA;AARA;AACA;AACA;;AAGA;AACA;AACA;;AASO,SAASE,wBAAwBA,CACvCC,CAAO,EACuB;EAC9B,OAAOA,CAAC,CAACC,IAAI,KAAKC,6BAAkB,IAAIF,CAAC,CAACC,IAAI,KAAKE,kCAAuB;AAC3E;AAEO,SAASC,YAAYA,CAAEC,IAAU,EAAG;EAC1C,IAAK,OAAOA,IAAI,CAACC,KAAK,KAAK,QAAQ,EAAG;IACrC,OAAO,IAAAC,4BAAc,EAAEF,IAAI,CAACC,KAAM,CAAC;EACpC;EACA,IAAK,UAAU,IAAID,IAAI,CAACC,KAAK,EAAG;IAC/B,OAAO,IAAAC,4BAAc,EAAEF,IAAI,CAACC,KAAK,CAACE,QAAS,CAAC;EAC7C;EACA,IAAK,KAAK,IAAIH,IAAI,CAACC,KAAK,EAAG;IAC1B,OAAO,IAAAC,4BAAc,EAAEF,IAAI,CAACC,KAAK,CAACG,GAAI,CAAC;EACxC;EACA,OAAO,EAAE;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,mBAAmBA,CAAEC,QAAgC,EAAG;EACvE,IAAK,CAAEA,QAAQ,EAAG;IACjB,OAAO,KAAK;EACb;EACA;EACA;EACA;EACA,OACC,CAAEA,QAAQ,CAACC,MAAM,EAAED,QAAQ,CAACC,MAAM,CAAE,CAACC,QAAQ,CAC5CC,2BAAgB,CAACC,MAClB,CAAC,IAAI,CAAEJ,QAAQ,CAACK,cAAc;AAEhC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["registerEntityAction","kind","name","config","type","unregisterEntityAction","actionId"],"sources":["@wordpress/editor/src/dataviews/store/private-actions.ts"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport type { Action, AnyItem } from '@wordpress/dataviews';\n\nexport function registerEntityAction< Item extends AnyItem >(\n\tkind: string,\n\tname: string,\n\tconfig: Action< Item >\n) {\n\treturn {\n\t\ttype: 'REGISTER_ENTITY_ACTION' as const,\n\t\tkind,\n\t\tname,\n\t\tconfig,\n\t};\n}\n\nexport function unregisterEntityAction(\n\tkind: string,\n\tname: string,\n\tactionId: string\n) {\n\treturn {\n\t\ttype: 'UNREGISTER_ENTITY_ACTION' as const,\n\t\tkind,\n\t\tname,\n\t\tactionId,\n\t};\n}\n"],"mappings":";;;;;;;AAAA;AACA;AACA;;AAGO,SAASA,oBAAoBA,CACnCC,IAAY,EACZC,IAAY,EACZC,MAAsB,EACrB;EACD,OAAO;IACNC,IAAI,EAAE,wBAAiC;IACvCH,IAAI;IACJC,IAAI;IACJC;EACD,CAAC;AACF;AAEO,SAASE,sBAAsBA,CACrCJ,IAAY,EACZC,IAAY,EACZI,QAAgB,EACf;EACD,OAAO;IACNF,IAAI,EAAE,0BAAmC;IACzCH,IAAI;IACJC,IAAI;IACJI;EACD,CAAC;AACF","ignoreList":[]}
1
+ {"version":3,"names":["registerEntityAction","kind","name","config","type","unregisterEntityAction","actionId"],"sources":["@wordpress/editor/src/dataviews/store/private-actions.ts"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport type { Action } from '@wordpress/dataviews';\n\nexport function registerEntityAction< Item >(\n\tkind: string,\n\tname: string,\n\tconfig: Action< Item >\n) {\n\treturn {\n\t\ttype: 'REGISTER_ENTITY_ACTION' as const,\n\t\tkind,\n\t\tname,\n\t\tconfig,\n\t};\n}\n\nexport function unregisterEntityAction(\n\tkind: string,\n\tname: string,\n\tactionId: string\n) {\n\treturn {\n\t\ttype: 'UNREGISTER_ENTITY_ACTION' as const,\n\t\tkind,\n\t\tname,\n\t\tactionId,\n\t};\n}\n"],"mappings":";;;;;;;AAAA;AACA;AACA;;AAGO,SAASA,oBAAoBA,CACnCC,IAAY,EACZC,IAAY,EACZC,MAAsB,EACrB;EACD,OAAO;IACNC,IAAI,EAAE,wBAAiC;IACvCH,IAAI;IACJC,IAAI;IACJC;EACD,CAAC;AACF;AAEO,SAASE,sBAAsBA,CACrCJ,IAAY,EACZC,IAAY,EACZI,QAAgB,EACf;EACD,OAAO;IACNF,IAAI,EAAE,0BAAmC;IACzCH,IAAI;IACJC,IAAI;IACJI;EACD,CAAC;AACF","ignoreList":[]}
@@ -3,7 +3,8 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.getEntityActions = getEntityActions;
6
+ exports.getEntityActions = void 0;
7
+ var _data = require("@wordpress/data");
7
8
  /**
8
9
  * WordPress dependencies
9
10
  */
@@ -12,9 +13,8 @@ exports.getEntityActions = getEntityActions;
12
13
  * Internal dependencies
13
14
  */
14
15
 
15
- const EMPTY_ARRAY = [];
16
- function getEntityActions(state, kind, name) {
17
- var _state$actions$kind$n;
18
- return (_state$actions$kind$n = state.actions[kind]?.[name]) !== null && _state$actions$kind$n !== void 0 ? _state$actions$kind$n : EMPTY_ARRAY;
19
- }
16
+ const getEntityActions = exports.getEntityActions = (0, _data.createSelector)((state, kind, name) => {
17
+ var _state$actions$kind$n, _state$actions$kind$;
18
+ return [...((_state$actions$kind$n = state.actions[kind]?.[name]) !== null && _state$actions$kind$n !== void 0 ? _state$actions$kind$n : []), ...((_state$actions$kind$ = state.actions[kind]?.['*']) !== null && _state$actions$kind$ !== void 0 ? _state$actions$kind$ : [])];
19
+ }, (state, kind, name) => [state.actions[kind]?.[name], state.actions[kind]?.['*']]);
20
20
  //# sourceMappingURL=private-selectors.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["EMPTY_ARRAY","getEntityActions","state","kind","name","_state$actions$kind$n","actions"],"sources":["@wordpress/editor/src/dataviews/store/private-selectors.ts"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport type { Action } from '@wordpress/dataviews';\n\n/**\n * Internal dependencies\n */\nimport type { State } from './reducer';\n\nconst EMPTY_ARRAY: Action< any >[] = [];\n\nexport function getEntityActions( state: State, kind: string, name: string ) {\n\treturn state.actions[ kind ]?.[ name ] ?? EMPTY_ARRAY;\n}\n"],"mappings":";;;;;;AAAA;AACA;AACA;;AAGA;AACA;AACA;;AAGA,MAAMA,WAA4B,GAAG,EAAE;AAEhC,SAASC,gBAAgBA,CAAEC,KAAY,EAAEC,IAAY,EAAEC,IAAY,EAAG;EAAA,IAAAC,qBAAA;EAC5E,QAAAA,qBAAA,GAAOH,KAAK,CAACI,OAAO,CAAEH,IAAI,CAAE,GAAIC,IAAI,CAAE,cAAAC,qBAAA,cAAAA,qBAAA,GAAIL,WAAW;AACtD","ignoreList":[]}
1
+ {"version":3,"names":["_data","require","getEntityActions","exports","createSelector","state","kind","name","_state$actions$kind$n","_state$actions$kind$","actions"],"sources":["@wordpress/editor/src/dataviews/store/private-selectors.ts"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createSelector } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport type { State } from './reducer';\n\nexport const getEntityActions = createSelector(\n\t( state: State, kind: string, name: string ) => {\n\t\treturn [\n\t\t\t...( state.actions[ kind ]?.[ name ] ?? [] ),\n\t\t\t...( state.actions[ kind ]?.[ '*' ] ?? [] ),\n\t\t];\n\t},\n\t( state: State, kind: string, name: string ) => [\n\t\tstate.actions[ kind ]?.[ name ],\n\t\tstate.actions[ kind ]?.[ '*' ],\n\t]\n);\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGA;AACA;AACA;;AAGO,MAAMC,gBAAgB,GAAAC,OAAA,CAAAD,gBAAA,GAAG,IAAAE,oBAAc,EAC7C,CAAEC,KAAY,EAAEC,IAAY,EAAEC,IAAY,KAAM;EAAA,IAAAC,qBAAA,EAAAC,oBAAA;EAC/C,OAAO,CACN,KAAAD,qBAAA,GAAKH,KAAK,CAACK,OAAO,CAAEJ,IAAI,CAAE,GAAIC,IAAI,CAAE,cAAAC,qBAAA,cAAAA,qBAAA,GAAI,EAAE,CAAE,EAC5C,KAAAC,oBAAA,GAAKJ,KAAK,CAACK,OAAO,CAAEJ,IAAI,CAAE,GAAI,GAAG,CAAE,cAAAG,oBAAA,cAAAA,oBAAA,GAAI,EAAE,CAAE,CAC3C;AACF,CAAC,EACD,CAAEJ,KAAY,EAAEC,IAAY,EAAEC,IAAY,KAAM,CAC/CF,KAAK,CAACK,OAAO,CAAEJ,IAAI,CAAE,GAAIC,IAAI,CAAE,EAC/BF,KAAK,CAACK,OAAO,CAAEJ,IAAI,CAAE,GAAI,GAAG,CAAE,CAEhC,CAAC","ignoreList":[]}
@@ -16,7 +16,8 @@ function actions(state = {}, action) {
16
16
  return {
17
17
  ...state,
18
18
  [action.kind]: {
19
- [action.name]: [...((_state$action$kind$ac = state[action.kind]?.[action.name]) !== null && _state$action$kind$ac !== void 0 ? _state$action$kind$ac : []), action.config]
19
+ ...state[action.kind],
20
+ [action.name]: [...((_state$action$kind$ac = state[action.kind]?.[action.name]) !== null && _state$action$kind$ac !== void 0 ? _state$action$kind$ac : []).filter(_action => _action.id !== action.config.id), action.config]
20
21
  }
21
22
  };
22
23
  case 'UNREGISTER_ENTITY_ACTION':
@@ -24,7 +25,10 @@ function actions(state = {}, action) {
24
25
  var _state$action$kind$ac2;
25
26
  return {
26
27
  ...state,
27
- [action.kind]: ((_state$action$kind$ac2 = state[action.kind]?.[action.name]) !== null && _state$action$kind$ac2 !== void 0 ? _state$action$kind$ac2 : []).filter(_action => _action.id !== action.actionId)
28
+ [action.kind]: {
29
+ ...state[action.kind],
30
+ [action.name]: ((_state$action$kind$ac2 = state[action.kind]?.[action.name]) !== null && _state$action$kind$ac2 !== void 0 ? _state$action$kind$ac2 : []).filter(_action => _action.id !== action.actionId)
31
+ }
28
32
  };
29
33
  }
30
34
  }
@@ -1 +1 @@
1
- {"version":3,"names":["_data","require","actions","state","action","_state$action$kind$ac","type","kind","name","config","_state$action$kind$ac2","filter","_action","id","actionId","_default","exports","default","combineReducers"],"sources":["@wordpress/editor/src/dataviews/store/reducer.ts"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { combineReducers } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport type { Action } from '@wordpress/dataviews';\n\ntype ReduxAction =\n\t| ReturnType< typeof import('./private-actions').registerEntityAction >\n\t| ReturnType< typeof import('./private-actions').unregisterEntityAction >;\n\nexport type ActionState = Record< string, Record< string, Action< any >[] > >;\nexport type State = {\n\tactions: ActionState;\n};\n\nfunction actions( state: ActionState = {}, action: ReduxAction ) {\n\tswitch ( action.type ) {\n\t\tcase 'REGISTER_ENTITY_ACTION':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t[ action.kind ]: {\n\t\t\t\t\t[ action.name ]: [\n\t\t\t\t\t\t...( state[ action.kind ]?.[ action.name ] ?? [] ),\n\t\t\t\t\t\taction.config,\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t};\n\t\tcase 'UNREGISTER_ENTITY_ACTION': {\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t[ action.kind ]: (\n\t\t\t\t\tstate[ action.kind ]?.[ action.name ] ?? []\n\t\t\t\t).filter( ( _action ) => _action.id !== action.actionId ),\n\t\t\t};\n\t\t}\n\t}\n\n\treturn state;\n}\n\nexport default combineReducers( {\n\tactions,\n} );\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAcA,SAASC,OAAOA,CAAEC,KAAkB,GAAG,CAAC,CAAC,EAAEC,MAAmB,EAAG;EAAA,IAAAC,qBAAA;EAChE,QAASD,MAAM,CAACE,IAAI;IACnB,KAAK,wBAAwB;MAC5B,OAAO;QACN,GAAGH,KAAK;QACR,CAAEC,MAAM,CAACG,IAAI,GAAI;UAChB,CAAEH,MAAM,CAACI,IAAI,GAAI,CAChB,KAAAH,qBAAA,GAAKF,KAAK,CAAEC,MAAM,CAACG,IAAI,CAAE,GAAIH,MAAM,CAACI,IAAI,CAAE,cAAAH,qBAAA,cAAAA,qBAAA,GAAI,EAAE,CAAE,EAClDD,MAAM,CAACK,MAAM;QAEf;MACD,CAAC;IACF,KAAK,0BAA0B;MAAE;QAAA,IAAAC,sBAAA;QAChC,OAAO;UACN,GAAGP,KAAK;UACR,CAAEC,MAAM,CAACG,IAAI,GAAI,EAAAG,sBAAA,GAChBP,KAAK,CAAEC,MAAM,CAACG,IAAI,CAAE,GAAIH,MAAM,CAACI,IAAI,CAAE,cAAAE,sBAAA,cAAAA,sBAAA,GAAI,EAAE,EAC1CC,MAAM,CAAIC,OAAO,IAAMA,OAAO,CAACC,EAAE,KAAKT,MAAM,CAACU,QAAS;QACzD,CAAC;MACF;EACD;EAEA,OAAOX,KAAK;AACb;AAAC,IAAAY,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEc,IAAAC,qBAAe,EAAE;EAC/BhB;AACD,CAAE,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_data","require","actions","state","action","_state$action$kind$ac","type","kind","name","filter","_action","id","config","_state$action$kind$ac2","actionId","_default","exports","default","combineReducers"],"sources":["@wordpress/editor/src/dataviews/store/reducer.ts"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { combineReducers } from '@wordpress/data';\nimport type { Action } from '@wordpress/dataviews';\n\ntype ReduxAction =\n\t| ReturnType< typeof import('./private-actions').registerEntityAction >\n\t| ReturnType< typeof import('./private-actions').unregisterEntityAction >;\n\nexport type ActionState = Record< string, Record< string, Action< any >[] > >;\nexport type State = {\n\tactions: ActionState;\n};\n\nfunction actions( state: ActionState = {}, action: ReduxAction ) {\n\tswitch ( action.type ) {\n\t\tcase 'REGISTER_ENTITY_ACTION':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t[ action.kind ]: {\n\t\t\t\t\t...state[ action.kind ],\n\t\t\t\t\t[ action.name ]: [\n\t\t\t\t\t\t...(\n\t\t\t\t\t\t\tstate[ action.kind ]?.[ action.name ] ?? []\n\t\t\t\t\t\t).filter(\n\t\t\t\t\t\t\t( _action ) => _action.id !== action.config.id\n\t\t\t\t\t\t),\n\t\t\t\t\t\taction.config,\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t};\n\t\tcase 'UNREGISTER_ENTITY_ACTION': {\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t[ action.kind ]: {\n\t\t\t\t\t...state[ action.kind ],\n\t\t\t\t\t[ action.name ]: (\n\t\t\t\t\t\tstate[ action.kind ]?.[ action.name ] ?? []\n\t\t\t\t\t).filter( ( _action ) => _action.id !== action.actionId ),\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\t}\n\n\treturn state;\n}\n\nexport default combineReducers( {\n\tactions,\n} );\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAaA,SAASC,OAAOA,CAAEC,KAAkB,GAAG,CAAC,CAAC,EAAEC,MAAmB,EAAG;EAAA,IAAAC,qBAAA;EAChE,QAASD,MAAM,CAACE,IAAI;IACnB,KAAK,wBAAwB;MAC5B,OAAO;QACN,GAAGH,KAAK;QACR,CAAEC,MAAM,CAACG,IAAI,GAAI;UAChB,GAAGJ,KAAK,CAAEC,MAAM,CAACG,IAAI,CAAE;UACvB,CAAEH,MAAM,CAACI,IAAI,GAAI,CAChB,GAAG,EAAAH,qBAAA,GACFF,KAAK,CAAEC,MAAM,CAACG,IAAI,CAAE,GAAIH,MAAM,CAACI,IAAI,CAAE,cAAAH,qBAAA,cAAAA,qBAAA,GAAI,EAAE,EAC1CI,MAAM,CACLC,OAAO,IAAMA,OAAO,CAACC,EAAE,KAAKP,MAAM,CAACQ,MAAM,CAACD,EAC7C,CAAC,EACDP,MAAM,CAACQ,MAAM;QAEf;MACD,CAAC;IACF,KAAK,0BAA0B;MAAE;QAAA,IAAAC,sBAAA;QAChC,OAAO;UACN,GAAGV,KAAK;UACR,CAAEC,MAAM,CAACG,IAAI,GAAI;YAChB,GAAGJ,KAAK,CAAEC,MAAM,CAACG,IAAI,CAAE;YACvB,CAAEH,MAAM,CAACI,IAAI,GAAI,EAAAK,sBAAA,GAChBV,KAAK,CAAEC,MAAM,CAACG,IAAI,CAAE,GAAIH,MAAM,CAACI,IAAI,CAAE,cAAAK,sBAAA,cAAAA,sBAAA,GAAI,EAAE,EAC1CJ,MAAM,CAAIC,OAAO,IAAMA,OAAO,CAACC,EAAE,KAAKP,MAAM,CAACU,QAAS;UACzD;QACD,CAAC;MACF;EACD;EAEA,OAAOX,KAAK;AACb;AAAC,IAAAY,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEc,IAAAC,qBAAe,EAAE;EAC/BhB;AACD,CAAE,CAAC","ignoreList":[]}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["@wordpress/editor/src/dataviews/types.ts"],"sourcesContent":["type PostStatus =\n\t| 'published'\n\t| 'draft'\n\t| 'pending'\n\t| 'private'\n\t| 'future'\n\t| 'auto-draft'\n\t| 'trash';\n\nexport interface BasePost {\n\tstatus?: PostStatus;\n\ttitle: string | { rendered: string } | { raw: string };\n\ttype: string;\n\tid: string | number;\n}\nexport interface TemplateOrTemplatePart extends BasePost {\n\ttype: 'wp_template' | 'wp_template_part';\n\tsource: string;\n\thas_theme_file: boolean;\n\tid: string;\n}\n\nexport interface Pattern extends BasePost {\n\tslug: string;\n\ttitle: { raw: string };\n\tcontent: { raw: string } | string;\n\twp_pattern_sync_status: string;\n}\n\nexport type Post = TemplateOrTemplatePart | Pattern | BasePost;\n\n// Will be unnecessary after typescript 5.0 upgrade.\nexport type CoreDataError = { message?: string; code?: string };\n"],"mappings":"","ignoreList":[]}
@@ -17,7 +17,7 @@ var _jsxRuntime = require("react/jsx-runtime");
17
17
  * Internal dependencies
18
18
  */
19
19
 
20
- const {
20
+ /** @typedef {import('@wordpress/blocks').WPBlockSettings} WPBlockSettings */const {
21
21
  PatternOverridesControls,
22
22
  ResetOverridesControl,
23
23
  PatternOverridesBlockControls,
@@ -36,7 +36,7 @@ const {
36
36
  * @return {Component} Wrapped component.
37
37
  */
38
38
  const withPatternOverrideControls = (0, _compose.createHigherOrderComponent)(BlockEdit => props => {
39
- const isSupportedBlock = Object.keys(PARTIAL_SYNCING_SUPPORTED_BLOCKS).includes(props.name);
39
+ const isSupportedBlock = !!PARTIAL_SYNCING_SUPPORTED_BLOCKS[props.name];
40
40
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
41
41
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(BlockEdit, {
42
42
  ...props
@@ -44,7 +44,7 @@ const withPatternOverrideControls = (0, _compose.createHigherOrderComponent)(Blo
44
44
  ...props
45
45
  }), isSupportedBlock && /*#__PURE__*/(0, _jsxRuntime.jsx)(PatternOverridesBlockControls, {})]
46
46
  });
47
- });
47
+ }, 'withPatternOverrideControls');
48
48
 
49
49
  // Split into a separate component to avoid a store subscription
50
50
  // on every block.
@@ -1 +1 @@
1
- {"version":3,"names":["_hooks","require","_patterns","_compose","_blockEditor","_data","_blocks","_store","_lockUnlock","_jsxRuntime","PatternOverridesControls","ResetOverridesControl","PatternOverridesBlockControls","PATTERN_TYPES","PARTIAL_SYNCING_SUPPORTED_BLOCKS","PATTERN_SYNC_TYPES","unlock","patternsPrivateApis","withPatternOverrideControls","createHigherOrderComponent","BlockEdit","props","isSupportedBlock","Object","keys","includes","name","jsxs","Fragment","children","jsx","isSelected","ControlsWithStoreSubscription","blockEditingMode","useBlockEditingMode","hasPatternOverridesSource","isEditingSyncedPattern","useSelect","select","getBlockBindingsSource","blocksStore","getCurrentPostType","getEditedPostAttribute","editorStore","user","wp_pattern_sync_status","unsynced","bindings","attributes","metadata","hasPatternBindings","values","some","binding","source","shouldShowPatternOverridesControls","shouldShowResetOverridesControl","addFilter"],"sources":["@wordpress/editor/src/hooks/pattern-overrides.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { addFilter } from '@wordpress/hooks';\nimport { privateApis as patternsPrivateApis } from '@wordpress/patterns';\nimport { createHigherOrderComponent } from '@wordpress/compose';\nimport { useBlockEditingMode } from '@wordpress/block-editor';\nimport { useSelect } from '@wordpress/data';\nimport { store as blocksStore } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../store';\nimport { unlock } from '../lock-unlock';\n\nconst {\n\tPatternOverridesControls,\n\tResetOverridesControl,\n\tPatternOverridesBlockControls,\n\tPATTERN_TYPES,\n\tPARTIAL_SYNCING_SUPPORTED_BLOCKS,\n\tPATTERN_SYNC_TYPES,\n} = unlock( patternsPrivateApis );\n\n/**\n * Override the default edit UI to include a new block inspector control for\n * assigning a partial syncing controls to supported blocks in the pattern editor.\n * Currently, only the `core/paragraph` block is supported.\n *\n * @param {Component} BlockEdit Original component.\n *\n * @return {Component} Wrapped component.\n */\nconst withPatternOverrideControls = createHigherOrderComponent(\n\t( BlockEdit ) => ( props ) => {\n\t\tconst isSupportedBlock = Object.keys(\n\t\t\tPARTIAL_SYNCING_SUPPORTED_BLOCKS\n\t\t).includes( props.name );\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<BlockEdit { ...props } />\n\t\t\t\t{ props.isSelected && isSupportedBlock && (\n\t\t\t\t\t<ControlsWithStoreSubscription { ...props } />\n\t\t\t\t) }\n\t\t\t\t{ isSupportedBlock && <PatternOverridesBlockControls /> }\n\t\t\t</>\n\t\t);\n\t}\n);\n\n// Split into a separate component to avoid a store subscription\n// on every block.\nfunction ControlsWithStoreSubscription( props ) {\n\tconst blockEditingMode = useBlockEditingMode();\n\tconst { hasPatternOverridesSource, isEditingSyncedPattern } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockBindingsSource } = unlock( select( blocksStore ) );\n\t\t\tconst { getCurrentPostType, getEditedPostAttribute } =\n\t\t\t\tselect( editorStore );\n\n\t\t\treturn {\n\t\t\t\t// For editing link to the site editor if the theme and user permissions support it.\n\t\t\t\thasPatternOverridesSource: !! getBlockBindingsSource(\n\t\t\t\t\t'core/pattern-overrides'\n\t\t\t\t),\n\t\t\t\tisEditingSyncedPattern:\n\t\t\t\t\tgetCurrentPostType() === PATTERN_TYPES.user &&\n\t\t\t\t\tgetEditedPostAttribute( 'meta' )?.wp_pattern_sync_status !==\n\t\t\t\t\t\tPATTERN_SYNC_TYPES.unsynced &&\n\t\t\t\t\tgetEditedPostAttribute( 'wp_pattern_sync_status' ) !==\n\t\t\t\t\t\tPATTERN_SYNC_TYPES.unsynced,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\tconst bindings = props.attributes.metadata?.bindings;\n\tconst hasPatternBindings =\n\t\t!! bindings &&\n\t\tObject.values( bindings ).some(\n\t\t\t( binding ) => binding.source === 'core/pattern-overrides'\n\t\t);\n\n\tconst shouldShowPatternOverridesControls =\n\t\tisEditingSyncedPattern && blockEditingMode === 'default';\n\tconst shouldShowResetOverridesControl =\n\t\t! isEditingSyncedPattern &&\n\t\t!! props.attributes.metadata?.name &&\n\t\tblockEditingMode !== 'disabled' &&\n\t\thasPatternBindings;\n\n\tif ( ! hasPatternOverridesSource ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t{ shouldShowPatternOverridesControls && (\n\t\t\t\t<PatternOverridesControls { ...props } />\n\t\t\t) }\n\t\t\t{ shouldShowResetOverridesControl && (\n\t\t\t\t<ResetOverridesControl { ...props } />\n\t\t\t) }\n\t\t</>\n\t);\n}\n\naddFilter(\n\t'editor.BlockEdit',\n\t'core/editor/with-pattern-override-controls',\n\twithPatternOverrideControls\n);\n"],"mappings":"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","ignoreList":[]}
1
+ {"version":3,"names":["_hooks","require","_patterns","_compose","_blockEditor","_data","_blocks","_store","_lockUnlock","_jsxRuntime","PatternOverridesControls","ResetOverridesControl","PatternOverridesBlockControls","PATTERN_TYPES","PARTIAL_SYNCING_SUPPORTED_BLOCKS","PATTERN_SYNC_TYPES","unlock","patternsPrivateApis","withPatternOverrideControls","createHigherOrderComponent","BlockEdit","props","isSupportedBlock","name","jsxs","Fragment","children","jsx","isSelected","ControlsWithStoreSubscription","blockEditingMode","useBlockEditingMode","hasPatternOverridesSource","isEditingSyncedPattern","useSelect","select","getBlockBindingsSource","blocksStore","getCurrentPostType","getEditedPostAttribute","editorStore","user","wp_pattern_sync_status","unsynced","bindings","attributes","metadata","hasPatternBindings","Object","values","some","binding","source","shouldShowPatternOverridesControls","shouldShowResetOverridesControl","addFilter"],"sources":["@wordpress/editor/src/hooks/pattern-overrides.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { addFilter } from '@wordpress/hooks';\nimport { privateApis as patternsPrivateApis } from '@wordpress/patterns';\nimport { createHigherOrderComponent } from '@wordpress/compose';\nimport { useBlockEditingMode } from '@wordpress/block-editor';\nimport { useSelect } from '@wordpress/data';\nimport { store as blocksStore } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../store';\nimport { unlock } from '../lock-unlock';\n\n/** @typedef {import('@wordpress/blocks').WPBlockSettings} WPBlockSettings */\n\nconst {\n\tPatternOverridesControls,\n\tResetOverridesControl,\n\tPatternOverridesBlockControls,\n\tPATTERN_TYPES,\n\tPARTIAL_SYNCING_SUPPORTED_BLOCKS,\n\tPATTERN_SYNC_TYPES,\n} = unlock( patternsPrivateApis );\n\n/**\n * Override the default edit UI to include a new block inspector control for\n * assigning a partial syncing controls to supported blocks in the pattern editor.\n * Currently, only the `core/paragraph` block is supported.\n *\n * @param {Component} BlockEdit Original component.\n *\n * @return {Component} Wrapped component.\n */\nconst withPatternOverrideControls = createHigherOrderComponent(\n\t( BlockEdit ) => ( props ) => {\n\t\tconst isSupportedBlock =\n\t\t\t!! PARTIAL_SYNCING_SUPPORTED_BLOCKS[ props.name ];\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<BlockEdit { ...props } />\n\t\t\t\t{ props.isSelected && isSupportedBlock && (\n\t\t\t\t\t<ControlsWithStoreSubscription { ...props } />\n\t\t\t\t) }\n\t\t\t\t{ isSupportedBlock && <PatternOverridesBlockControls /> }\n\t\t\t</>\n\t\t);\n\t},\n\t'withPatternOverrideControls'\n);\n\n// Split into a separate component to avoid a store subscription\n// on every block.\nfunction ControlsWithStoreSubscription( props ) {\n\tconst blockEditingMode = useBlockEditingMode();\n\tconst { hasPatternOverridesSource, isEditingSyncedPattern } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockBindingsSource } = unlock( select( blocksStore ) );\n\t\t\tconst { getCurrentPostType, getEditedPostAttribute } =\n\t\t\t\tselect( editorStore );\n\n\t\t\treturn {\n\t\t\t\t// For editing link to the site editor if the theme and user permissions support it.\n\t\t\t\thasPatternOverridesSource: !! getBlockBindingsSource(\n\t\t\t\t\t'core/pattern-overrides'\n\t\t\t\t),\n\t\t\t\tisEditingSyncedPattern:\n\t\t\t\t\tgetCurrentPostType() === PATTERN_TYPES.user &&\n\t\t\t\t\tgetEditedPostAttribute( 'meta' )?.wp_pattern_sync_status !==\n\t\t\t\t\t\tPATTERN_SYNC_TYPES.unsynced &&\n\t\t\t\t\tgetEditedPostAttribute( 'wp_pattern_sync_status' ) !==\n\t\t\t\t\t\tPATTERN_SYNC_TYPES.unsynced,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\tconst bindings = props.attributes.metadata?.bindings;\n\tconst hasPatternBindings =\n\t\t!! bindings &&\n\t\tObject.values( bindings ).some(\n\t\t\t( binding ) => binding.source === 'core/pattern-overrides'\n\t\t);\n\n\tconst shouldShowPatternOverridesControls =\n\t\tisEditingSyncedPattern && blockEditingMode === 'default';\n\tconst shouldShowResetOverridesControl =\n\t\t! isEditingSyncedPattern &&\n\t\t!! props.attributes.metadata?.name &&\n\t\tblockEditingMode !== 'disabled' &&\n\t\thasPatternBindings;\n\n\tif ( ! hasPatternOverridesSource ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t{ shouldShowPatternOverridesControls && (\n\t\t\t\t<PatternOverridesControls { ...props } />\n\t\t\t) }\n\t\t\t{ shouldShowResetOverridesControl && (\n\t\t\t\t<ResetOverridesControl { ...props } />\n\t\t\t) }\n\t\t</>\n\t);\n}\n\naddFilter(\n\t'editor.BlockEdit',\n\t'core/editor/with-pattern-override-controls',\n\twithPatternOverrideControls\n);\n"],"mappings":"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","ignoreList":[]}
@@ -12,7 +12,7 @@ var _privateApis = require("@wordpress/private-apis");
12
12
  const {
13
13
  lock,
14
14
  unlock
15
- } = (0, _privateApis.__dangerousOptInToUnstableAPIsOnlyForCoreModules)('I know using unstable features means my theme or plugin will inevitably break in the next version of WordPress.', '@wordpress/editor');
15
+ } = (0, _privateApis.__dangerousOptInToUnstableAPIsOnlyForCoreModules)('I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.', '@wordpress/editor');
16
16
  exports.unlock = unlock;
17
17
  exports.lock = lock;
18
18
  //# sourceMappingURL=lock-unlock.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_privateApis","require","lock","unlock","__dangerousOptInToUnstableAPIsOnlyForCoreModules","exports"],"sources":["@wordpress/editor/src/lock-unlock.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/private-apis';\nexport const { lock, unlock } =\n\t__dangerousOptInToUnstableAPIsOnlyForCoreModules(\n\t\t'I know using unstable features means my theme or plugin will inevitably break in the next version of WordPress.',\n\t\t'@wordpress/editor'\n\t);\n"],"mappings":";;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAEO,MAAM;EAAEC,IAAI;EAAEC;AAAO,CAAC,GAC5B,IAAAC,6DAAgD,EAC/C,iHAAiH,EACjH,mBACD,CAAC;AAACC,OAAA,CAAAF,MAAA,GAAAA,MAAA;AAAAE,OAAA,CAAAH,IAAA,GAAAA,IAAA","ignoreList":[]}
1
+ {"version":3,"names":["_privateApis","require","lock","unlock","__dangerousOptInToUnstableAPIsOnlyForCoreModules","exports"],"sources":["@wordpress/editor/src/lock-unlock.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/private-apis';\nexport const { lock, unlock } =\n\t__dangerousOptInToUnstableAPIsOnlyForCoreModules(\n\t\t'I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.',\n\t\t'@wordpress/editor'\n\t);\n"],"mappings":";;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAEO,MAAM;EAAEC,IAAI;EAAEC;AAAO,CAAC,GAC5B,IAAAC,6DAAgD,EAC/C,+HAA+H,EAC/H,mBACD,CAAC;AAACC,OAAA,CAAAF,MAAA,GAAAA,MAAA;AAAAE,OAAA,CAAAH,IAAA,GAAAA,IAAA","ignoreList":[]}