@wordpress/editor 14.2.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 (695) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/bindings/pattern-overrides.js +8 -5
  3. package/build/bindings/pattern-overrides.js.map +1 -1
  4. package/build/bindings/post-meta.js +4 -0
  5. package/build/bindings/post-meta.js.map +1 -1
  6. package/build/components/editor-interface/index.js +2 -1
  7. package/build/components/editor-interface/index.js.map +1 -1
  8. package/build/components/entities-saved-states/index.js +1 -1
  9. package/build/components/entities-saved-states/index.js.map +1 -1
  10. package/build/components/inserter-sidebar/index.js +10 -21
  11. package/build/components/inserter-sidebar/index.js.map +1 -1
  12. package/build/components/list-view-sidebar/index.js +19 -47
  13. package/build/components/list-view-sidebar/index.js.map +1 -1
  14. package/build/components/page-attributes/parent.js +2 -1
  15. package/build/components/page-attributes/parent.js.map +1 -1
  16. package/build/components/post-actions/actions.js +67 -215
  17. package/build/components/post-actions/actions.js.map +1 -1
  18. package/build/components/post-actions/index.js +1 -1
  19. package/build/components/post-actions/index.js.map +1 -1
  20. package/build/components/post-excerpt/panel.js +1 -1
  21. package/build/components/post-excerpt/panel.js.map +1 -1
  22. package/build/components/post-preview-button/index.js +1 -1
  23. package/build/components/post-preview-button/index.js.map +1 -1
  24. package/build/components/post-publish-panel/index.js +1 -1
  25. package/build/components/post-publish-panel/index.js.map +1 -1
  26. package/build/components/post-saved-state/index.js +11 -1
  27. package/build/components/post-saved-state/index.js.map +1 -1
  28. package/build/components/post-schedule/index.js +3 -0
  29. package/build/components/post-schedule/index.js.map +1 -1
  30. package/build/components/post-status/index.js +2 -1
  31. package/build/components/post-status/index.js.map +1 -1
  32. package/build/components/post-title/index.js +5 -13
  33. package/build/components/post-title/index.js.map +1 -1
  34. package/build/components/preview-dropdown/index.js +1 -1
  35. package/build/components/preview-dropdown/index.js.map +1 -1
  36. package/build/components/provider/index.native.js +0 -4
  37. package/build/components/provider/index.native.js.map +1 -1
  38. package/build/components/provider/use-block-editor-settings.js +7 -4
  39. package/build/components/provider/use-block-editor-settings.js.map +1 -1
  40. package/build/components/save-publish-panels/index.js +30 -16
  41. package/build/components/save-publish-panels/index.js.map +1 -1
  42. package/build/components/sidebar/index.js +3 -1
  43. package/build/components/sidebar/index.js.map +1 -1
  44. package/build/components/sidebar/post-summary.js +1 -2
  45. package/build/components/sidebar/post-summary.js.map +1 -1
  46. package/build/components/template-content-panel/index.js +29 -4
  47. package/build/components/template-content-panel/index.js.map +1 -1
  48. package/build/components/visual-editor/index.js +1 -1
  49. package/build/components/visual-editor/index.js.map +1 -1
  50. package/build/dataviews/actions/delete-post.js +96 -0
  51. package/build/dataviews/actions/delete-post.js.map +1 -0
  52. package/build/{components/post-actions/export-pattern-action.js → dataviews/actions/export-pattern.js} +11 -20
  53. package/build/dataviews/actions/export-pattern.js.map +1 -0
  54. package/build/dataviews/actions/index.js +32 -0
  55. package/build/dataviews/actions/index.js.map +1 -0
  56. package/build/dataviews/actions/reset-post.js +111 -0
  57. package/build/dataviews/actions/reset-post.js.map +1 -0
  58. package/build/dataviews/actions/utils.js +50 -0
  59. package/build/dataviews/actions/utils.js.map +1 -0
  60. package/build/dataviews/store/private-actions.js.map +1 -1
  61. package/build/dataviews/store/private-selectors.js +6 -6
  62. package/build/dataviews/store/private-selectors.js.map +1 -1
  63. package/build/dataviews/store/reducer.js +6 -2
  64. package/build/dataviews/store/reducer.js.map +1 -1
  65. package/build/dataviews/types.js +6 -0
  66. package/build/dataviews/types.js.map +1 -0
  67. package/build/hooks/pattern-overrides.js +2 -2
  68. package/build/hooks/pattern-overrides.js.map +1 -1
  69. package/build/private-apis.js +2 -0
  70. package/build/private-apis.js.map +1 -1
  71. package/build/private-apis.native.js +0 -2
  72. package/build/private-apis.native.js.map +1 -1
  73. package/build/store/constants.js.map +1 -1
  74. package/build/store/private-actions.js +1 -1
  75. package/build/store/private-actions.js.map +1 -1
  76. package/build/store/private-selectors.js +0 -18
  77. package/build/store/private-selectors.js.map +1 -1
  78. package/build/store/utils/is-template-revertable.js +6 -8
  79. package/build/store/utils/is-template-revertable.js.map +1 -1
  80. package/build-module/bindings/pattern-overrides.js +8 -5
  81. package/build-module/bindings/pattern-overrides.js.map +1 -1
  82. package/build-module/bindings/post-meta.js +4 -0
  83. package/build-module/bindings/post-meta.js.map +1 -1
  84. package/build-module/components/editor-interface/index.js +2 -1
  85. package/build-module/components/editor-interface/index.js.map +1 -1
  86. package/build-module/components/entities-saved-states/index.js +1 -1
  87. package/build-module/components/entities-saved-states/index.js.map +1 -1
  88. package/build-module/components/inserter-sidebar/index.js +11 -22
  89. package/build-module/components/inserter-sidebar/index.js.map +1 -1
  90. package/build-module/components/list-view-sidebar/index.js +20 -49
  91. package/build-module/components/list-view-sidebar/index.js.map +1 -1
  92. package/build-module/components/page-attributes/parent.js +2 -1
  93. package/build-module/components/page-attributes/parent.js.map +1 -1
  94. package/build-module/components/post-actions/actions.js +63 -210
  95. package/build-module/components/post-actions/actions.js.map +1 -1
  96. package/build-module/components/post-actions/index.js +1 -1
  97. package/build-module/components/post-actions/index.js.map +1 -1
  98. package/build-module/components/post-excerpt/panel.js +1 -1
  99. package/build-module/components/post-excerpt/panel.js.map +1 -1
  100. package/build-module/components/post-preview-button/index.js +1 -1
  101. package/build-module/components/post-preview-button/index.js.map +1 -1
  102. package/build-module/components/post-publish-panel/index.js +1 -1
  103. package/build-module/components/post-publish-panel/index.js.map +1 -1
  104. package/build-module/components/post-saved-state/index.js +11 -1
  105. package/build-module/components/post-saved-state/index.js.map +1 -1
  106. package/build-module/components/post-schedule/index.js +3 -0
  107. package/build-module/components/post-schedule/index.js.map +1 -1
  108. package/build-module/components/post-status/index.js +1 -1
  109. package/build-module/components/post-status/index.js.map +1 -1
  110. package/build-module/components/post-title/index.js +5 -13
  111. package/build-module/components/post-title/index.js.map +1 -1
  112. package/build-module/components/preview-dropdown/index.js +1 -1
  113. package/build-module/components/preview-dropdown/index.js.map +1 -1
  114. package/build-module/components/provider/index.native.js +0 -4
  115. package/build-module/components/provider/index.native.js.map +1 -1
  116. package/build-module/components/provider/use-block-editor-settings.js +7 -4
  117. package/build-module/components/provider/use-block-editor-settings.js.map +1 -1
  118. package/build-module/components/save-publish-panels/index.js +30 -16
  119. package/build-module/components/save-publish-panels/index.js.map +1 -1
  120. package/build-module/components/sidebar/index.js +3 -1
  121. package/build-module/components/sidebar/index.js.map +1 -1
  122. package/build-module/components/sidebar/post-summary.js +1 -2
  123. package/build-module/components/sidebar/post-summary.js.map +1 -1
  124. package/build-module/components/template-content-panel/index.js +30 -5
  125. package/build-module/components/template-content-panel/index.js.map +1 -1
  126. package/build-module/components/visual-editor/index.js +1 -1
  127. package/build-module/components/visual-editor/index.js.map +1 -1
  128. package/build-module/dataviews/actions/delete-post.js +87 -0
  129. package/build-module/dataviews/actions/delete-post.js.map +1 -0
  130. package/build-module/{components/post-actions/export-pattern-action.js → dataviews/actions/export-pattern.js} +10 -19
  131. package/build-module/dataviews/actions/export-pattern.js.map +1 -0
  132. package/build-module/dataviews/actions/index.js +24 -0
  133. package/build-module/dataviews/actions/index.js.map +1 -0
  134. package/build-module/dataviews/actions/reset-post.js +104 -0
  135. package/build-module/dataviews/actions/reset-post.js.map +1 -0
  136. package/build-module/dataviews/actions/utils.js +41 -0
  137. package/build-module/dataviews/actions/utils.js.map +1 -0
  138. package/build-module/dataviews/store/private-actions.js.map +1 -1
  139. package/build-module/dataviews/store/private-selectors.js +5 -5
  140. package/build-module/dataviews/store/private-selectors.js.map +1 -1
  141. package/build-module/dataviews/store/reducer.js +6 -2
  142. package/build-module/dataviews/store/reducer.js.map +1 -1
  143. package/build-module/dataviews/types.js +2 -0
  144. package/build-module/dataviews/types.js.map +1 -0
  145. package/build-module/hooks/pattern-overrides.js +3 -1
  146. package/build-module/hooks/pattern-overrides.js.map +1 -1
  147. package/build-module/private-apis.js +2 -0
  148. package/build-module/private-apis.js.map +1 -1
  149. package/build-module/private-apis.native.js +0 -2
  150. package/build-module/private-apis.native.js.map +1 -1
  151. package/build-module/store/constants.js.map +1 -1
  152. package/build-module/store/private-actions.js +1 -1
  153. package/build-module/store/private-actions.js.map +1 -1
  154. package/build-module/store/private-selectors.js +0 -17
  155. package/build-module/store/private-selectors.js.map +1 -1
  156. package/build-module/store/utils/is-template-revertable.js +6 -8
  157. package/build-module/store/utils/is-template-revertable.js.map +1 -1
  158. package/build-style/style-rtl.css +15 -53
  159. package/build-style/style.css +15 -53
  160. package/build-types/bindings/index.d.ts +2 -0
  161. package/build-types/bindings/index.d.ts.map +1 -0
  162. package/build-types/bindings/pattern-overrides.d.ts +18 -0
  163. package/build-types/bindings/pattern-overrides.d.ts.map +1 -0
  164. package/build-types/bindings/post-meta.d.ts +25 -0
  165. package/build-types/bindings/post-meta.d.ts.map +1 -0
  166. package/build-types/components/autocompleters/index.d.ts +2 -0
  167. package/build-types/components/autocompleters/index.d.ts.map +1 -0
  168. package/build-types/components/autocompleters/user.d.ts +6 -0
  169. package/build-types/components/autocompleters/user.d.ts.map +1 -0
  170. package/build-types/components/autosave-monitor/index.d.ts +15 -0
  171. package/build-types/components/autosave-monitor/index.d.ts.map +1 -0
  172. package/build-types/components/block-manager/category.d.ts +6 -0
  173. package/build-types/components/block-manager/category.d.ts.map +1 -0
  174. package/build-types/components/block-manager/checklist.d.ts +7 -0
  175. package/build-types/components/block-manager/checklist.d.ts.map +1 -0
  176. package/build-types/components/block-manager/index.d.ts +3 -0
  177. package/build-types/components/block-manager/index.d.ts.map +1 -0
  178. package/build-types/components/block-removal-warnings/index.d.ts +2 -0
  179. package/build-types/components/block-removal-warnings/index.d.ts.map +1 -0
  180. package/build-types/components/block-settings-menu/content-only-settings-menu.d.ts +2 -0
  181. package/build-types/components/block-settings-menu/content-only-settings-menu.d.ts.map +1 -0
  182. package/build-types/components/block-settings-menu/plugin-block-settings-menu-item.d.ts +65 -0
  183. package/build-types/components/block-settings-menu/plugin-block-settings-menu-item.d.ts.map +1 -0
  184. package/build-types/components/blog-title/index.d.ts +2 -0
  185. package/build-types/components/blog-title/index.d.ts.map +1 -0
  186. package/build-types/components/character-count/index.d.ts +7 -0
  187. package/build-types/components/character-count/index.d.ts.map +1 -0
  188. package/build-types/components/collapsible-block-toolbar/index.d.ts +6 -0
  189. package/build-types/components/collapsible-block-toolbar/index.d.ts.map +1 -0
  190. package/build-types/components/commands/index.d.ts +2 -0
  191. package/build-types/components/commands/index.d.ts.map +1 -0
  192. package/build-types/components/create-template-part-modal/index.d.ts +14 -0
  193. package/build-types/components/create-template-part-modal/index.d.ts.map +1 -0
  194. package/build-types/components/create-template-part-modal/utils.d.ts +4 -0
  195. package/build-types/components/create-template-part-modal/utils.d.ts.map +1 -0
  196. package/build-types/components/deprecated.d.ts +182 -0
  197. package/build-types/components/deprecated.d.ts.map +1 -0
  198. package/build-types/components/document-bar/index.d.ts +22 -0
  199. package/build-types/components/document-bar/index.d.ts.map +1 -0
  200. package/build-types/components/document-outline/check.d.ts +12 -0
  201. package/build-types/components/document-outline/check.d.ts.map +1 -0
  202. package/build-types/components/document-outline/index.d.ts +16 -0
  203. package/build-types/components/document-outline/index.d.ts.map +1 -0
  204. package/build-types/components/document-outline/item.d.ts +9 -0
  205. package/build-types/components/document-outline/item.d.ts.map +1 -0
  206. package/build-types/components/document-tools/index.d.ts +6 -0
  207. package/build-types/components/document-tools/index.d.ts.map +1 -0
  208. package/build-types/components/editor/index.d.ts +14 -0
  209. package/build-types/components/editor/index.d.ts.map +1 -0
  210. package/build-types/components/editor-history/redo.d.ts +4 -0
  211. package/build-types/components/editor-history/redo.d.ts.map +1 -0
  212. package/build-types/components/editor-history/undo.d.ts +4 -0
  213. package/build-types/components/editor-history/undo.d.ts.map +1 -0
  214. package/build-types/components/editor-interface/content-slot-fill.d.ts +3 -0
  215. package/build-types/components/editor-interface/content-slot-fill.d.ts.map +1 -0
  216. package/build-types/components/editor-interface/index.d.ts +17 -0
  217. package/build-types/components/editor-interface/index.d.ts.map +1 -0
  218. package/build-types/components/editor-notices/index.d.ts +13 -0
  219. package/build-types/components/editor-notices/index.d.ts.map +1 -0
  220. package/build-types/components/editor-snackbars/index.d.ts +7 -0
  221. package/build-types/components/editor-snackbars/index.d.ts.map +1 -0
  222. package/build-types/components/entities-saved-states/entity-record-item.d.ts +6 -0
  223. package/build-types/components/entities-saved-states/entity-record-item.d.ts.map +1 -0
  224. package/build-types/components/entities-saved-states/entity-type-list.d.ts +6 -0
  225. package/build-types/components/entities-saved-states/entity-type-list.d.ts.map +1 -0
  226. package/build-types/components/entities-saved-states/hooks/use-is-dirty.d.ts +2 -0
  227. package/build-types/components/entities-saved-states/hooks/use-is-dirty.d.ts.map +1 -0
  228. package/build-types/components/entities-saved-states/index.d.ts +43 -0
  229. package/build-types/components/entities-saved-states/index.d.ts.map +1 -0
  230. package/build-types/components/error-boundary/index.d.ts +14 -0
  231. package/build-types/components/error-boundary/index.d.ts.map +1 -0
  232. package/build-types/components/global-keyboard-shortcuts/index.d.ts +9 -0
  233. package/build-types/components/global-keyboard-shortcuts/index.d.ts.map +1 -0
  234. package/build-types/components/global-keyboard-shortcuts/register-shortcuts.d.ts +8 -0
  235. package/build-types/components/global-keyboard-shortcuts/register-shortcuts.d.ts.map +1 -0
  236. package/build-types/components/global-styles-provider/index.d.ts +20 -0
  237. package/build-types/components/global-styles-provider/index.d.ts.map +1 -0
  238. package/build-types/components/header/back-button.d.ts +6 -0
  239. package/build-types/components/header/back-button.d.ts.map +1 -0
  240. package/build-types/components/header/index.d.ts +10 -0
  241. package/build-types/components/header/index.d.ts.map +1 -0
  242. package/build-types/components/index.d.ts +108 -0
  243. package/build-types/components/index.d.ts.map +1 -0
  244. package/build-types/components/inserter-sidebar/index.d.ts +2 -0
  245. package/build-types/components/inserter-sidebar/index.d.ts.map +1 -0
  246. package/build-types/components/keyboard-shortcut-help-modal/config.d.ts +26 -0
  247. package/build-types/components/keyboard-shortcut-help-modal/config.d.ts.map +1 -0
  248. package/build-types/components/keyboard-shortcut-help-modal/dynamic-shortcut.d.ts +5 -0
  249. package/build-types/components/keyboard-shortcut-help-modal/dynamic-shortcut.d.ts.map +1 -0
  250. package/build-types/components/keyboard-shortcut-help-modal/index.d.ts +3 -0
  251. package/build-types/components/keyboard-shortcut-help-modal/index.d.ts.map +1 -0
  252. package/build-types/components/keyboard-shortcut-help-modal/shortcut.d.ts +8 -0
  253. package/build-types/components/keyboard-shortcut-help-modal/shortcut.d.ts.map +1 -0
  254. package/build-types/components/list-view-sidebar/index.d.ts +2 -0
  255. package/build-types/components/list-view-sidebar/index.d.ts.map +1 -0
  256. package/build-types/components/list-view-sidebar/list-view-outline.d.ts +2 -0
  257. package/build-types/components/list-view-sidebar/list-view-outline.d.ts.map +1 -0
  258. package/build-types/components/local-autosave-monitor/index.d.ts +3 -0
  259. package/build-types/components/local-autosave-monitor/index.d.ts.map +1 -0
  260. package/build-types/components/media-categories/index.d.ts +7 -0
  261. package/build-types/components/media-categories/index.d.ts.map +1 -0
  262. package/build-types/components/mode-switcher/index.d.ts +3 -0
  263. package/build-types/components/mode-switcher/index.d.ts.map +1 -0
  264. package/build-types/components/more-menu/copy-content-menu-item.d.ts +2 -0
  265. package/build-types/components/more-menu/copy-content-menu-item.d.ts.map +1 -0
  266. package/build-types/components/more-menu/index.d.ts +2 -0
  267. package/build-types/components/more-menu/index.d.ts.map +1 -0
  268. package/build-types/components/more-menu/tools-more-menu-group.d.ts +6 -0
  269. package/build-types/components/more-menu/tools-more-menu-group.d.ts.map +1 -0
  270. package/build-types/components/more-menu/view-more-menu-group.d.ts +6 -0
  271. package/build-types/components/more-menu/view-more-menu-group.d.ts.map +1 -0
  272. package/build-types/components/page-attributes/check.d.ts +13 -0
  273. package/build-types/components/page-attributes/check.d.ts.map +1 -0
  274. package/build-types/components/page-attributes/order.d.ts +9 -0
  275. package/build-types/components/page-attributes/order.d.ts.map +1 -0
  276. package/build-types/components/page-attributes/panel.d.ts +7 -0
  277. package/build-types/components/page-attributes/panel.d.ts.map +1 -0
  278. package/build-types/components/page-attributes/parent.d.ts +11 -0
  279. package/build-types/components/page-attributes/parent.d.ts.map +1 -0
  280. package/build-types/components/pattern-duplicate-modal/index.d.ts +3 -0
  281. package/build-types/components/pattern-duplicate-modal/index.d.ts.map +1 -0
  282. package/build-types/components/pattern-overrides-panel/index.d.ts +2 -0
  283. package/build-types/components/pattern-overrides-panel/index.d.ts.map +1 -0
  284. package/build-types/components/pattern-rename-modal/index.d.ts +3 -0
  285. package/build-types/components/pattern-rename-modal/index.d.ts.map +1 -0
  286. package/build-types/components/plugin-document-setting-panel/index.d.ts +69 -0
  287. package/build-types/components/plugin-document-setting-panel/index.d.ts.map +1 -0
  288. package/build-types/components/plugin-more-menu-item/index.d.ts +3 -0
  289. package/build-types/components/plugin-more-menu-item/index.d.ts.map +1 -0
  290. package/build-types/components/plugin-post-publish-panel/index.d.ts +47 -0
  291. package/build-types/components/plugin-post-publish-panel/index.d.ts.map +1 -0
  292. package/build-types/components/plugin-post-status-info/index.d.ts +57 -0
  293. package/build-types/components/plugin-post-status-info/index.d.ts.map +1 -0
  294. package/build-types/components/plugin-pre-publish-panel/index.d.ts +50 -0
  295. package/build-types/components/plugin-pre-publish-panel/index.d.ts.map +1 -0
  296. package/build-types/components/plugin-sidebar/index.d.ts +73 -0
  297. package/build-types/components/plugin-sidebar/index.d.ts.map +1 -0
  298. package/build-types/components/plugin-sidebar-more-menu-item/index.d.ts +52 -0
  299. package/build-types/components/plugin-sidebar-more-menu-item/index.d.ts.map +1 -0
  300. package/build-types/components/post-actions/actions.d.ts +31 -0
  301. package/build-types/components/post-actions/actions.d.ts.map +1 -0
  302. package/build-types/components/post-actions/index.d.ts +5 -0
  303. package/build-types/components/post-actions/index.d.ts.map +1 -0
  304. package/build-types/components/post-author/check.d.ts +13 -0
  305. package/build-types/components/post-author/check.d.ts.map +1 -0
  306. package/build-types/components/post-author/combobox.d.ts +2 -0
  307. package/build-types/components/post-author/combobox.d.ts.map +1 -0
  308. package/build-types/components/post-author/constants.d.ts +9 -0
  309. package/build-types/components/post-author/constants.d.ts.map +1 -0
  310. package/build-types/components/post-author/hook.d.ts +6 -0
  311. package/build-types/components/post-author/hook.d.ts.map +1 -0
  312. package/build-types/components/post-author/index.d.ts +8 -0
  313. package/build-types/components/post-author/index.d.ts.map +1 -0
  314. package/build-types/components/post-author/panel.d.ts +8 -0
  315. package/build-types/components/post-author/panel.d.ts.map +1 -0
  316. package/build-types/components/post-author/select.d.ts +2 -0
  317. package/build-types/components/post-author/select.d.ts.map +1 -0
  318. package/build-types/components/post-card-panel/index.d.ts +4 -0
  319. package/build-types/components/post-card-panel/index.d.ts.map +1 -0
  320. package/build-types/components/post-comments/index.d.ts +3 -0
  321. package/build-types/components/post-comments/index.d.ts.map +1 -0
  322. package/build-types/components/post-content-information/index.d.ts +2 -0
  323. package/build-types/components/post-content-information/index.d.ts.map +1 -0
  324. package/build-types/components/post-discussion/panel.d.ts +10 -0
  325. package/build-types/components/post-discussion/panel.d.ts.map +1 -0
  326. package/build-types/components/post-excerpt/check.d.ts +13 -0
  327. package/build-types/components/post-excerpt/check.d.ts.map +1 -0
  328. package/build-types/components/post-excerpt/index.d.ts +15 -0
  329. package/build-types/components/post-excerpt/index.d.ts.map +1 -0
  330. package/build-types/components/post-excerpt/panel.d.ts +8 -0
  331. package/build-types/components/post-excerpt/panel.d.ts.map +1 -0
  332. package/build-types/components/post-excerpt/plugin.d.ts +53 -0
  333. package/build-types/components/post-excerpt/plugin.d.ts.map +1 -0
  334. package/build-types/components/post-featured-image/check.d.ts +14 -0
  335. package/build-types/components/post-featured-image/check.d.ts.map +1 -0
  336. package/build-types/components/post-featured-image/index.d.ts +3 -0
  337. package/build-types/components/post-featured-image/index.d.ts.map +1 -0
  338. package/build-types/components/post-featured-image/panel.d.ts +13 -0
  339. package/build-types/components/post-featured-image/panel.d.ts.map +1 -0
  340. package/build-types/components/post-format/check.d.ts +5 -0
  341. package/build-types/components/post-format/check.d.ts.map +1 -0
  342. package/build-types/components/post-format/index.d.ts +16 -0
  343. package/build-types/components/post-format/index.d.ts.map +1 -0
  344. package/build-types/components/post-format/panel.d.ts +8 -0
  345. package/build-types/components/post-format/panel.d.ts.map +1 -0
  346. package/build-types/components/post-last-edited-panel/index.d.ts +2 -0
  347. package/build-types/components/post-last-edited-panel/index.d.ts.map +1 -0
  348. package/build-types/components/post-last-revision/check.d.ts +13 -0
  349. package/build-types/components/post-last-revision/check.d.ts.map +1 -0
  350. package/build-types/components/post-last-revision/index.d.ts +9 -0
  351. package/build-types/components/post-last-revision/index.d.ts.map +1 -0
  352. package/build-types/components/post-last-revision/panel.d.ts +8 -0
  353. package/build-types/components/post-last-revision/panel.d.ts.map +1 -0
  354. package/build-types/components/post-locked-modal/index.d.ts +8 -0
  355. package/build-types/components/post-locked-modal/index.d.ts.map +1 -0
  356. package/build-types/components/post-panel-row/index.d.ts +3 -0
  357. package/build-types/components/post-panel-row/index.d.ts.map +1 -0
  358. package/build-types/components/post-panel-section/index.d.ts +6 -0
  359. package/build-types/components/post-panel-section/index.d.ts.map +1 -0
  360. package/build-types/components/post-pending-status/check.d.ts +15 -0
  361. package/build-types/components/post-pending-status/check.d.ts.map +1 -0
  362. package/build-types/components/post-pending-status/index.d.ts +8 -0
  363. package/build-types/components/post-pending-status/index.d.ts.map +1 -0
  364. package/build-types/components/post-pingbacks/index.d.ts +3 -0
  365. package/build-types/components/post-pingbacks/index.d.ts.map +1 -0
  366. package/build-types/components/post-preview-button/index.d.ts +23 -0
  367. package/build-types/components/post-preview-button/index.d.ts.map +1 -0
  368. package/build-types/components/post-publish-button/index.d.ts +17 -0
  369. package/build-types/components/post-publish-button/index.d.ts.map +1 -0
  370. package/build-types/components/post-publish-button/label.d.ts +7 -0
  371. package/build-types/components/post-publish-button/label.d.ts.map +1 -0
  372. package/build-types/components/post-publish-button/post-publish-button-or-toggle.d.ts +17 -0
  373. package/build-types/components/post-publish-button/post-publish-button-or-toggle.d.ts.map +1 -0
  374. package/build-types/components/post-publish-panel/index.d.ts +10 -0
  375. package/build-types/components/post-publish-panel/index.d.ts.map +1 -0
  376. package/build-types/components/post-publish-panel/maybe-category-panel.d.ts +3 -0
  377. package/build-types/components/post-publish-panel/maybe-category-panel.d.ts.map +1 -0
  378. package/build-types/components/post-publish-panel/maybe-post-format-panel.d.ts +2 -0
  379. package/build-types/components/post-publish-panel/maybe-post-format-panel.d.ts.map +1 -0
  380. package/build-types/components/post-publish-panel/maybe-tags-panel.d.ts +3 -0
  381. package/build-types/components/post-publish-panel/maybe-tags-panel.d.ts.map +1 -0
  382. package/build-types/components/post-publish-panel/maybe-upload-media.d.ts +2 -0
  383. package/build-types/components/post-publish-panel/maybe-upload-media.d.ts.map +1 -0
  384. package/build-types/components/post-publish-panel/postpublish.d.ts +3 -0
  385. package/build-types/components/post-publish-panel/postpublish.d.ts.map +1 -0
  386. package/build-types/components/post-publish-panel/prepublish.d.ts +5 -0
  387. package/build-types/components/post-publish-panel/prepublish.d.ts.map +1 -0
  388. package/build-types/components/post-saved-state/index.d.ts +13 -0
  389. package/build-types/components/post-saved-state/index.d.ts.map +1 -0
  390. package/build-types/components/post-schedule/check.d.ts +12 -0
  391. package/build-types/components/post-schedule/check.d.ts.map +1 -0
  392. package/build-types/components/post-schedule/index.d.ts +17 -0
  393. package/build-types/components/post-schedule/index.d.ts.map +1 -0
  394. package/build-types/components/post-schedule/label.d.ts +25 -0
  395. package/build-types/components/post-schedule/label.d.ts.map +1 -0
  396. package/build-types/components/post-schedule/panel.d.ts +7 -0
  397. package/build-types/components/post-schedule/panel.d.ts.map +1 -0
  398. package/build-types/components/post-slug/check.d.ts +12 -0
  399. package/build-types/components/post-slug/check.d.ts.map +1 -0
  400. package/build-types/components/post-slug/index.d.ts +7 -0
  401. package/build-types/components/post-slug/index.d.ts.map +1 -0
  402. package/build-types/components/post-slug/panel.d.ts +3 -0
  403. package/build-types/components/post-slug/panel.d.ts.map +1 -0
  404. package/build-types/components/post-status/index.d.ts +6 -0
  405. package/build-types/components/post-status/index.d.ts.map +1 -0
  406. package/build-types/components/post-sticky/check.d.ts +12 -0
  407. package/build-types/components/post-sticky/check.d.ts.map +1 -0
  408. package/build-types/components/post-sticky/index.d.ts +7 -0
  409. package/build-types/components/post-sticky/index.d.ts.map +1 -0
  410. package/build-types/components/post-sticky/panel.d.ts +3 -0
  411. package/build-types/components/post-sticky/panel.d.ts.map +1 -0
  412. package/build-types/components/post-switch-to-draft-button/index.d.ts +7 -0
  413. package/build-types/components/post-switch-to-draft-button/index.d.ts.map +1 -0
  414. package/build-types/components/post-sync-status/index.d.ts +7 -0
  415. package/build-types/components/post-sync-status/index.d.ts.map +1 -0
  416. package/build-types/components/post-taxonomies/check.d.ts +12 -0
  417. package/build-types/components/post-taxonomies/check.d.ts.map +1 -0
  418. package/build-types/components/post-taxonomies/flat-term-selector.d.ts +64 -0
  419. package/build-types/components/post-taxonomies/flat-term-selector.d.ts.map +1 -0
  420. package/build-types/components/post-taxonomies/hierarchical-term-selector.d.ts +102 -0
  421. package/build-types/components/post-taxonomies/hierarchical-term-selector.d.ts.map +1 -0
  422. package/build-types/components/post-taxonomies/index.d.ts +5 -0
  423. package/build-types/components/post-taxonomies/index.d.ts.map +1 -0
  424. package/build-types/components/post-taxonomies/most-used-terms.d.ts +5 -0
  425. package/build-types/components/post-taxonomies/most-used-terms.d.ts.map +1 -0
  426. package/build-types/components/post-taxonomies/panel.d.ts +3 -0
  427. package/build-types/components/post-taxonomies/panel.d.ts.map +1 -0
  428. package/build-types/components/post-template/block-theme.d.ts +4 -0
  429. package/build-types/components/post-template/block-theme.d.ts.map +1 -0
  430. package/build-types/components/post-template/classic-theme.d.ts +3 -0
  431. package/build-types/components/post-template/classic-theme.d.ts.map +1 -0
  432. package/build-types/components/post-template/create-new-template-modal.d.ts +4 -0
  433. package/build-types/components/post-template/create-new-template-modal.d.ts.map +1 -0
  434. package/build-types/components/post-template/create-new-template.d.ts +4 -0
  435. package/build-types/components/post-template/create-new-template.d.ts.map +1 -0
  436. package/build-types/components/post-template/hooks.d.ts +8 -0
  437. package/build-types/components/post-template/hooks.d.ts.map +1 -0
  438. package/build-types/components/post-template/panel.d.ts +7 -0
  439. package/build-types/components/post-template/panel.d.ts.map +1 -0
  440. package/build-types/components/post-template/reset-default-template.d.ts +4 -0
  441. package/build-types/components/post-template/reset-default-template.d.ts.map +1 -0
  442. package/build-types/components/post-template/swap-template-button.d.ts +4 -0
  443. package/build-types/components/post-template/swap-template-button.d.ts.map +1 -0
  444. package/build-types/components/post-text-editor/index.d.ts +7 -0
  445. package/build-types/components/post-text-editor/index.d.ts.map +1 -0
  446. package/build-types/components/post-title/constants.d.ts +3 -0
  447. package/build-types/components/post-title/constants.d.ts.map +1 -0
  448. package/build-types/components/post-title/index.d.ts +3 -0
  449. package/build-types/components/post-title/index.d.ts.map +1 -0
  450. package/build-types/components/post-title/post-title-raw.d.ts +3 -0
  451. package/build-types/components/post-title/post-title-raw.d.ts.map +1 -0
  452. package/build-types/components/post-title/use-post-title-focus.d.ts +9 -0
  453. package/build-types/components/post-title/use-post-title-focus.d.ts.map +1 -0
  454. package/build-types/components/post-title/use-post-title.d.ts +7 -0
  455. package/build-types/components/post-title/use-post-title.d.ts.map +1 -0
  456. package/build-types/components/post-transform-panel/hooks.d.ts +2 -0
  457. package/build-types/components/post-transform-panel/hooks.d.ts.map +1 -0
  458. package/build-types/components/post-transform-panel/index.d.ts +2 -0
  459. package/build-types/components/post-transform-panel/index.d.ts.map +1 -0
  460. package/build-types/components/post-trash/check.d.ts +12 -0
  461. package/build-types/components/post-trash/check.d.ts.map +1 -0
  462. package/build-types/components/post-trash/index.d.ts +7 -0
  463. package/build-types/components/post-trash/index.d.ts.map +1 -0
  464. package/build-types/components/post-type-support-check/index.d.ts +18 -0
  465. package/build-types/components/post-type-support-check/index.d.ts.map +1 -0
  466. package/build-types/components/post-url/check.d.ts +12 -0
  467. package/build-types/components/post-url/check.d.ts.map +1 -0
  468. package/build-types/components/post-url/index.d.ts +14 -0
  469. package/build-types/components/post-url/index.d.ts.map +1 -0
  470. package/build-types/components/post-url/label.d.ts +13 -0
  471. package/build-types/components/post-url/label.d.ts.map +1 -0
  472. package/build-types/components/post-url/panel.d.ts +7 -0
  473. package/build-types/components/post-url/panel.d.ts.map +1 -0
  474. package/build-types/components/post-view-link/index.d.ts +2 -0
  475. package/build-types/components/post-view-link/index.d.ts.map +1 -0
  476. package/build-types/components/post-visibility/check.d.ts +13 -0
  477. package/build-types/components/post-visibility/check.d.ts.map +1 -0
  478. package/build-types/components/post-visibility/index.d.ts +11 -0
  479. package/build-types/components/post-visibility/index.d.ts.map +1 -0
  480. package/build-types/components/post-visibility/label.d.ts +13 -0
  481. package/build-types/components/post-visibility/label.d.ts.map +1 -0
  482. package/build-types/components/post-visibility/utils.d.ts +21 -0
  483. package/build-types/components/post-visibility/utils.d.ts.map +1 -0
  484. package/build-types/components/posts-per-page/index.d.ts +2 -0
  485. package/build-types/components/posts-per-page/index.d.ts.map +1 -0
  486. package/build-types/components/preferences-modal/enable-panel.d.ts +3 -0
  487. package/build-types/components/preferences-modal/enable-panel.d.ts.map +1 -0
  488. package/build-types/components/preferences-modal/enable-plugin-document-setting-panel.d.ts +14 -0
  489. package/build-types/components/preferences-modal/enable-plugin-document-setting-panel.d.ts.map +1 -0
  490. package/build-types/components/preferences-modal/enable-publish-sidebar.d.ts +3 -0
  491. package/build-types/components/preferences-modal/enable-publish-sidebar.d.ts.map +1 -0
  492. package/build-types/components/preferences-modal/index.d.ts +4 -0
  493. package/build-types/components/preferences-modal/index.d.ts.map +1 -0
  494. package/build-types/components/preview-dropdown/index.d.ts +5 -0
  495. package/build-types/components/preview-dropdown/index.d.ts.map +1 -0
  496. package/build-types/components/provider/disable-non-page-content-blocks.d.ts +6 -0
  497. package/build-types/components/provider/disable-non-page-content-blocks.d.ts.map +1 -0
  498. package/build-types/components/provider/index.d.ts +65 -0
  499. package/build-types/components/provider/index.d.ts.map +1 -0
  500. package/build-types/components/provider/navigation-block-editing-mode.d.ts +9 -0
  501. package/build-types/components/provider/navigation-block-editing-mode.d.ts.map +1 -0
  502. package/build-types/components/provider/use-auto-switch-editor-sidebars.d.ts +7 -0
  503. package/build-types/components/provider/use-auto-switch-editor-sidebars.d.ts.map +1 -0
  504. package/build-types/components/provider/use-block-editor-settings.d.ts +13 -0
  505. package/build-types/components/provider/use-block-editor-settings.d.ts.map +1 -0
  506. package/build-types/components/provider/use-hide-blocks-from-inserter.d.ts +9 -0
  507. package/build-types/components/provider/use-hide-blocks-from-inserter.d.ts.map +1 -0
  508. package/build-types/components/provider/with-registry-provider.d.ts +3 -0
  509. package/build-types/components/provider/with-registry-provider.d.ts.map +1 -0
  510. package/build-types/components/resizable-editor/index.d.ts +8 -0
  511. package/build-types/components/resizable-editor/index.d.ts.map +1 -0
  512. package/build-types/components/resizable-editor/resize-handle.d.ts +5 -0
  513. package/build-types/components/resizable-editor/resize-handle.d.ts.map +1 -0
  514. package/build-types/components/save-publish-panels/index.d.ts +11 -0
  515. package/build-types/components/save-publish-panels/index.d.ts.map +1 -0
  516. package/build-types/components/sidebar/constants.d.ts +5 -0
  517. package/build-types/components/sidebar/constants.d.ts.map +1 -0
  518. package/build-types/components/sidebar/header.d.ts +3 -0
  519. package/build-types/components/sidebar/header.d.ts.map +1 -0
  520. package/build-types/components/sidebar/index.d.ts +6 -0
  521. package/build-types/components/sidebar/index.d.ts.map +1 -0
  522. package/build-types/components/sidebar/post-summary.d.ts +4 -0
  523. package/build-types/components/sidebar/post-summary.d.ts.map +1 -0
  524. package/build-types/components/site-discussion/index.d.ts +2 -0
  525. package/build-types/components/site-discussion/index.d.ts.map +1 -0
  526. package/build-types/components/start-page-options/index.d.ts +2 -0
  527. package/build-types/components/start-page-options/index.d.ts.map +1 -0
  528. package/build-types/components/start-template-options/index.d.ts +2 -0
  529. package/build-types/components/start-template-options/index.d.ts.map +1 -0
  530. package/build-types/components/table-of-contents/index.d.ts +7 -0
  531. package/build-types/components/table-of-contents/index.d.ts.map +1 -0
  532. package/build-types/components/table-of-contents/panel.d.ts +6 -0
  533. package/build-types/components/table-of-contents/panel.d.ts.map +1 -0
  534. package/build-types/components/template-content-panel/index.d.ts +4 -0
  535. package/build-types/components/template-content-panel/index.d.ts.map +1 -0
  536. package/build-types/components/template-part-content-panel/index.d.ts +2 -0
  537. package/build-types/components/template-part-content-panel/index.d.ts.map +1 -0
  538. package/build-types/components/template-part-menu-items/convert-to-regular.d.ts +5 -0
  539. package/build-types/components/template-part-menu-items/convert-to-regular.d.ts.map +1 -0
  540. package/build-types/components/template-part-menu-items/convert-to-template-part.d.ts +5 -0
  541. package/build-types/components/template-part-menu-items/convert-to-template-part.d.ts.map +1 -0
  542. package/build-types/components/template-part-menu-items/index.d.ts +2 -0
  543. package/build-types/components/template-part-menu-items/index.d.ts.map +1 -0
  544. package/build-types/components/template-validation-notice/index.d.ts +2 -0
  545. package/build-types/components/template-validation-notice/index.d.ts.map +1 -0
  546. package/build-types/components/text-editor/index.d.ts +4 -0
  547. package/build-types/components/text-editor/index.d.ts.map +1 -0
  548. package/build-types/components/theme-support-check/index.d.ts +14 -0
  549. package/build-types/components/theme-support-check/index.d.ts.map +1 -0
  550. package/build-types/components/time-to-read/index.d.ts +7 -0
  551. package/build-types/components/time-to-read/index.d.ts.map +1 -0
  552. package/build-types/components/unsaved-changes-warning/index.d.ts +8 -0
  553. package/build-types/components/unsaved-changes-warning/index.d.ts.map +1 -0
  554. package/build-types/components/visual-editor/edit-template-blocks-notification.d.ts +18 -0
  555. package/build-types/components/visual-editor/edit-template-blocks-notification.d.ts.map +1 -0
  556. package/build-types/components/visual-editor/index.d.ts +10 -0
  557. package/build-types/components/visual-editor/index.d.ts.map +1 -0
  558. package/build-types/components/word-count/index.d.ts +7 -0
  559. package/build-types/components/word-count/index.d.ts.map +1 -0
  560. package/build-types/dataviews/actions/delete-post.d.ts +5 -0
  561. package/build-types/dataviews/actions/delete-post.d.ts.map +1 -0
  562. package/build-types/dataviews/actions/export-pattern.d.ts +8 -0
  563. package/build-types/dataviews/actions/export-pattern.d.ts.map +1 -0
  564. package/build-types/dataviews/actions/index.d.ts +2 -0
  565. package/build-types/dataviews/actions/index.d.ts.map +1 -0
  566. package/build-types/dataviews/actions/reset-post.d.ts +5 -0
  567. package/build-types/dataviews/actions/reset-post.d.ts.map +1 -0
  568. package/build-types/dataviews/actions/utils.d.ts +11 -0
  569. package/build-types/dataviews/actions/utils.d.ts.map +1 -0
  570. package/build-types/dataviews/api.d.ts +27 -0
  571. package/build-types/dataviews/api.d.ts.map +1 -0
  572. package/build-types/dataviews/store/private-actions.d.ts +2 -2
  573. package/build-types/dataviews/store/private-actions.d.ts.map +1 -1
  574. package/build-types/dataviews/store/private-selectors.d.ts +2 -5
  575. package/build-types/dataviews/store/private-selectors.d.ts.map +1 -1
  576. package/build-types/dataviews/store/reducer.d.ts +5 -1
  577. package/build-types/dataviews/store/reducer.d.ts.map +1 -1
  578. package/build-types/dataviews/types.d.ts +34 -0
  579. package/build-types/dataviews/types.d.ts.map +1 -0
  580. package/build-types/hooks/custom-sources-backwards-compatibility.d.ts +10 -0
  581. package/build-types/hooks/custom-sources-backwards-compatibility.d.ts.map +1 -0
  582. package/build-types/hooks/default-autocompleters.d.ts +2 -0
  583. package/build-types/hooks/default-autocompleters.d.ts.map +1 -0
  584. package/build-types/hooks/index.d.ts +2 -0
  585. package/build-types/hooks/index.d.ts.map +1 -0
  586. package/build-types/hooks/media-upload.d.ts +2 -0
  587. package/build-types/hooks/media-upload.d.ts.map +1 -0
  588. package/build-types/hooks/pattern-overrides.d.ts +2 -0
  589. package/build-types/hooks/pattern-overrides.d.ts.map +1 -0
  590. package/build-types/hooks/use-select-nearest-editable-block.d.ts +4 -0
  591. package/build-types/hooks/use-select-nearest-editable-block.d.ts.map +1 -0
  592. package/build-types/index.d.ts +6 -0
  593. package/build-types/index.d.ts.map +1 -0
  594. package/build-types/lock-unlock.d.ts +3 -0
  595. package/build-types/lock-unlock.d.ts.map +1 -0
  596. package/build-types/private-apis.d.ts +2 -0
  597. package/build-types/private-apis.d.ts.map +1 -0
  598. package/build-types/store/actions.d.ts +367 -0
  599. package/build-types/store/actions.d.ts.map +1 -0
  600. package/build-types/store/constants.d.ts +31 -0
  601. package/build-types/store/constants.d.ts.map +1 -0
  602. package/build-types/store/defaults.d.ts +21 -0
  603. package/build-types/store/defaults.d.ts.map +1 -0
  604. package/build-types/store/index.d.ts +17 -0
  605. package/build-types/store/index.d.ts.map +1 -0
  606. package/build-types/store/local-autosave.d.ts +4 -0
  607. package/build-types/store/local-autosave.d.ts.map +1 -0
  608. package/build-types/store/private-actions.d.ts +37 -0
  609. package/build-types/store/private-actions.d.ts.map +1 -0
  610. package/build-types/store/private-selectors.d.ts +24 -0
  611. package/build-types/store/private-selectors.d.ts.map +1 -0
  612. package/build-types/store/reducer.d.ts +228 -0
  613. package/build-types/store/reducer.d.ts.map +1 -0
  614. package/build-types/store/selectors.d.ts +854 -0
  615. package/build-types/store/selectors.d.ts.map +1 -0
  616. package/build-types/store/utils/get-filtered-template-parts.d.ts +3 -0
  617. package/build-types/store/utils/get-filtered-template-parts.d.ts.map +1 -0
  618. package/build-types/store/utils/is-template-revertable.d.ts +8 -0
  619. package/build-types/store/utils/is-template-revertable.d.ts.map +1 -0
  620. package/build-types/store/utils/notice-builder.d.ts +27 -0
  621. package/build-types/store/utils/notice-builder.d.ts.map +1 -0
  622. package/build-types/utils/get-template-part-icon.d.ts +9 -0
  623. package/build-types/utils/get-template-part-icon.d.ts.map +1 -0
  624. package/build-types/utils/index.d.ts +5 -0
  625. package/build-types/utils/index.d.ts.map +1 -0
  626. package/build-types/utils/media-upload/index.d.ts +21 -0
  627. package/build-types/utils/media-upload/index.d.ts.map +1 -0
  628. package/build-types/utils/set-nested-value.d.ts +20 -0
  629. package/build-types/utils/set-nested-value.d.ts.map +1 -0
  630. package/build-types/utils/terms.d.ts +12 -0
  631. package/build-types/utils/terms.d.ts.map +1 -0
  632. package/build-types/utils/url.d.ts +18 -0
  633. package/build-types/utils/url.d.ts.map +1 -0
  634. package/package.json +36 -35
  635. package/src/bindings/pattern-overrides.js +9 -10
  636. package/src/bindings/post-meta.js +5 -0
  637. package/src/components/editor-interface/index.js +17 -12
  638. package/src/components/entities-saved-states/index.js +1 -1
  639. package/src/components/inserter-sidebar/index.js +4 -24
  640. package/src/components/list-view-sidebar/index.js +34 -62
  641. package/src/components/list-view-sidebar/style.scss +0 -34
  642. package/src/components/page-attributes/parent.js +6 -3
  643. package/src/components/post-actions/actions.js +82 -277
  644. package/src/components/post-actions/index.js +1 -1
  645. package/src/components/post-excerpt/panel.js +1 -1
  646. package/src/components/post-featured-image/style.scss +15 -0
  647. package/src/components/post-panel-row/style.scss +1 -0
  648. package/src/components/post-preview-button/index.js +1 -1
  649. package/src/components/post-publish-panel/index.js +1 -1
  650. package/src/components/post-saved-state/index.js +11 -1
  651. package/src/components/post-schedule/index.js +5 -0
  652. package/src/components/post-status/index.js +1 -1
  653. package/src/components/post-taxonomies/README.md +1 -1
  654. package/src/components/post-title/index.js +5 -12
  655. package/src/components/preview-dropdown/index.js +1 -1
  656. package/src/components/provider/index.native.js +3 -11
  657. package/src/components/provider/use-block-editor-settings.js +10 -5
  658. package/src/components/save-publish-panels/index.js +33 -23
  659. package/src/components/sidebar/index.js +1 -3
  660. package/src/components/sidebar/post-summary.js +0 -2
  661. package/src/components/template-content-panel/index.js +29 -5
  662. package/src/components/visual-editor/index.js +1 -1
  663. package/src/components/visual-editor/style.scss +1 -1
  664. package/src/dataviews/actions/delete-post.tsx +107 -0
  665. package/src/{components/post-actions/export-pattern-action.js → dataviews/actions/export-pattern.tsx} +19 -19
  666. package/src/dataviews/actions/index.ts +25 -0
  667. package/src/dataviews/actions/reset-post.tsx +144 -0
  668. package/src/dataviews/actions/utils.ts +54 -0
  669. package/src/dataviews/store/private-actions.ts +2 -2
  670. package/src/dataviews/store/private-selectors.ts +13 -6
  671. package/src/dataviews/store/reducer.ts +12 -5
  672. package/src/dataviews/types.ts +33 -0
  673. package/src/hooks/pattern-overrides.js +4 -1
  674. package/src/private-apis.js +2 -0
  675. package/src/private-apis.native.js +0 -2
  676. package/src/store/private-actions.js +1 -6
  677. package/src/store/private-selectors.js +0 -25
  678. package/src/store/utils/is-template-revertable.js +8 -8
  679. package/src/style.scss +0 -1
  680. package/tsconfig.json +3 -2
  681. package/tsconfig.tsbuildinfo +1 -1
  682. package/build/components/post-actions/export-pattern-action.js.map +0 -1
  683. package/build/components/post-actions/export-pattern-action.native.js +0 -11
  684. package/build/components/post-actions/export-pattern-action.native.js.map +0 -1
  685. package/build/components/template-areas/index.js +0 -84
  686. package/build/components/template-areas/index.js.map +0 -1
  687. package/build-module/components/post-actions/export-pattern-action.js.map +0 -1
  688. package/build-module/components/post-actions/export-pattern-action.native.js +0 -5
  689. package/build-module/components/post-actions/export-pattern-action.native.js.map +0 -1
  690. package/build-module/components/template-areas/index.js +0 -78
  691. package/build-module/components/template-areas/index.js.map +0 -1
  692. package/src/components/post-actions/export-pattern-action.native.js +0 -4
  693. package/src/components/template-areas/index.js +0 -94
  694. package/src/components/template-areas/style.scss +0 -22
  695. /package/src/store/{constants.js → constants.ts} +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"names":["_changeCase","require","_clientZip","_blob","_i18n","_patterns","_lockUnlock","PATTERN_TYPES","unlock","patternsPrivateApis","getJsonFromItem","item","JSON","stringify","__file","type","title","name","content","patternPost","raw","syncStatus","wp_pattern_sync_status","exportPatternAsJSONAction","exports","id","label","__","supportsBulk","isEligible","user","callback","items","length","downloadBlob","kebabCase","nameCount","filesToZip","map","lastModified","Date","input","downloadZip","blob"],"sources":["@wordpress/editor/src/components/post-actions/export-pattern-action.js"],"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 { privateApis as patternsPrivateApis } from '@wordpress/patterns';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\n// Patterns.\nconst { PATTERN_TYPES } = unlock( patternsPrivateApis );\n\nfunction getJsonFromItem( item ) {\n\treturn JSON.stringify(\n\t\t{\n\t\t\t__file: item.type,\n\t\t\ttitle: item.title || item.name,\n\t\t\tcontent: item.patternPost.content.raw,\n\t\t\tsyncStatus: item.patternPost.wp_pattern_sync_status,\n\t\t},\n\t\tnull,\n\t\t2\n\t);\n}\n\nexport const exportPatternAsJSONAction = {\n\tid: 'export-pattern',\n\tlabel: __( 'Export as JSON' ),\n\tsupportsBulk: true,\n\tisEligible: ( item ) => {\n\t\tif ( ! item.type ) {\n\t\t\treturn false;\n\t\t}\n\t\treturn item.type === PATTERN_TYPES.user;\n\t},\n\tcallback: async ( items ) => {\n\t\tif ( items.length === 1 ) {\n\t\t\treturn downloadBlob(\n\t\t\t\t`${ kebabCase( items[ 0 ].title || items[ 0 ].name ) }.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 = {};\n\t\tconst filesToZip = items.map( ( item ) => {\n\t\t\tconst name = kebabCase( item.title || item.name );\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"],"mappings":";;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AAKA,IAAA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F;IACA,MAAMI,SAAS,GAAG,CAAC,CAAC;IACpB,MAAMC,UAAU,GAAGL,KAAK,CAACM,GAAG,CAAI3B,IAAI,IAAM;MACzC,MAAMM,IAAI,GAAG,IAAAkB,qBAAS,EAAExB,IAAI,CAACK,KAAK,IAAIL,IAAI,CAACM,IAAK,CAAC;MACjDmB,SAAS,CAAEnB,IAAI,CAAE,GAAG,CAAEmB,SAAS,CAAEnB,IAAI,CAAE,IAAI,CAAC,IAAK,CAAC;MAClD,OAAO;QACNA,IAAI,EAAG,GACNA,IAAI,IACFmB,SAAS,CAAEnB,IAAI,CAAE,GAAG,CAAC,GACpB,GAAG,IAAKmB,SAAS,CAAEnB,IAAI,CAAE,GAAG,CAAC,CAAE,GAC/B,EAAE,CACL,OAAM;QACPsB,YAAY,EAAE,IAAIC,IAAI,CAAC,CAAC;QACxBC,KAAK,EAAE/B,eAAe,CAAEC,IAAK;MAC9B,CAAC;IACF,CAAE,CAAC;IACH,OAAO,IAAAuB,kBAAY,EAClB,IAAAP,QAAE,EAAE,iBAAkB,CAAC,GAAG,MAAM,EAChC,MAAM,IAAAe,sBAAW,EAAEL,UAAW,CAAC,CAACM,IAAI,CAAC,CAAC,EACtC,iBACD,CAAC;EACF;AACD,CAAC","ignoreList":[]}
@@ -1,11 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.exportPatternAsJSONAction = void 0;
7
- // Client-zip is meant to be used in a browser and is therefore released as an ES6 module only,
8
- // in order for the native build to succeed we are importing a null action and avoiding importing
9
- // the non working in native context client-zip module.
10
- const exportPatternAsJSONAction = exports.exportPatternAsJSONAction = null;
11
- //# sourceMappingURL=export-pattern-action.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["exportPatternAsJSONAction","exports"],"sources":["@wordpress/editor/src/components/post-actions/export-pattern-action.native.js"],"sourcesContent":["// Client-zip is meant to be used in a browser and is therefore released as an ES6 module only,\n// in order for the native build to succeed we are importing a null action and avoiding importing\n// the non working in native context client-zip module.\nexport const exportPatternAsJSONAction = null;\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACO,MAAMA,yBAAyB,GAAAC,OAAA,CAAAD,yBAAA,GAAG,IAAI","ignoreList":[]}
@@ -1,84 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = TemplateAreas;
7
- var _data = require("@wordpress/data");
8
- var _components = require("@wordpress/components");
9
- var _blockEditor = require("@wordpress/block-editor");
10
- var _i18n = require("@wordpress/i18n");
11
- var _store = require("../../store");
12
- var _lockUnlock = require("../../lock-unlock");
13
- var _constants = require("../../store/constants");
14
- var _jsxRuntime = require("react/jsx-runtime");
15
- /**
16
- * WordPress dependencies
17
- */
18
-
19
- /**
20
- * Internal dependencies
21
- */
22
-
23
- function TemplateAreaItem({
24
- area,
25
- clientId
26
- }) {
27
- const {
28
- selectBlock,
29
- toggleBlockHighlight
30
- } = (0, _data.useDispatch)(_blockEditor.store);
31
- const templatePartArea = (0, _data.useSelect)(select => {
32
- const defaultAreas = select(_store.store).__experimentalGetDefaultTemplatePartAreas();
33
- return defaultAreas.find(defaultArea => defaultArea.area === area);
34
- }, [area]);
35
- const highlightBlock = () => toggleBlockHighlight(clientId, true);
36
- const cancelHighlightBlock = () => toggleBlockHighlight(clientId, false);
37
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
38
- className: "editor-template-areas__item",
39
- icon: templatePartArea?.icon,
40
- onMouseOver: highlightBlock,
41
- onMouseLeave: cancelHighlightBlock,
42
- onFocus: highlightBlock,
43
- onBlur: cancelHighlightBlock,
44
- onClick: () => {
45
- selectBlock(clientId);
46
- },
47
- children: templatePartArea?.label
48
- });
49
- }
50
- function TemplateAreas() {
51
- const {
52
- isTemplate,
53
- templateParts
54
- } = (0, _data.useSelect)(select => {
55
- const _isTemplate = select(_store.store).getCurrentPostType() === _constants.TEMPLATE_POST_TYPE;
56
- return {
57
- isTemplate: _isTemplate,
58
- templateParts: _isTemplate && (0, _lockUnlock.unlock)(select(_store.store)).getCurrentTemplateTemplateParts()
59
- };
60
- }, []);
61
- if (!isTemplate || !templateParts.length) {
62
- return null;
63
- }
64
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)("section", {
65
- className: "editor-template-areas",
66
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.__experimentalHeading, {
67
- level: 3,
68
- className: "editor-template-areas__title",
69
- children: (0, _i18n.__)('Areas')
70
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("ul", {
71
- className: "editor-template-areas__list",
72
- children: templateParts.map(({
73
- templatePart,
74
- block
75
- }) => /*#__PURE__*/(0, _jsxRuntime.jsx)("li", {
76
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(TemplateAreaItem, {
77
- area: templatePart.area,
78
- clientId: block.clientId
79
- })
80
- }, block.clientId))
81
- })]
82
- });
83
- }
84
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_data","require","_components","_blockEditor","_i18n","_store","_lockUnlock","_constants","_jsxRuntime","TemplateAreaItem","area","clientId","selectBlock","toggleBlockHighlight","useDispatch","blockEditorStore","templatePartArea","useSelect","select","defaultAreas","editorStore","__experimentalGetDefaultTemplatePartAreas","find","defaultArea","highlightBlock","cancelHighlightBlock","jsx","Button","className","icon","onMouseOver","onMouseLeave","onFocus","onBlur","onClick","children","label","TemplateAreas","isTemplate","templateParts","_isTemplate","getCurrentPostType","TEMPLATE_POST_TYPE","unlock","getCurrentTemplateTemplateParts","length","jsxs","__experimentalHeading","level","__","map","templatePart","block"],"sources":["@wordpress/editor/src/components/template-areas/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tButton,\n\t__experimentalHeading as Heading,\n} from '@wordpress/components';\n\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\nimport { TEMPLATE_POST_TYPE } from '../../store/constants';\n\nfunction TemplateAreaItem( { area, clientId } ) {\n\tconst { selectBlock, toggleBlockHighlight } =\n\t\tuseDispatch( blockEditorStore );\n\tconst templatePartArea = useSelect(\n\t\t( select ) => {\n\t\t\tconst defaultAreas =\n\t\t\t\tselect(\n\t\t\t\t\teditorStore\n\t\t\t\t).__experimentalGetDefaultTemplatePartAreas();\n\n\t\t\treturn defaultAreas.find(\n\t\t\t\t( defaultArea ) => defaultArea.area === area\n\t\t\t);\n\t\t},\n\t\t[ area ]\n\t);\n\n\tconst highlightBlock = () => toggleBlockHighlight( clientId, true );\n\tconst cancelHighlightBlock = () => toggleBlockHighlight( clientId, false );\n\n\treturn (\n\t\t<Button\n\t\t\tclassName=\"editor-template-areas__item\"\n\t\t\ticon={ templatePartArea?.icon }\n\t\t\tonMouseOver={ highlightBlock }\n\t\t\tonMouseLeave={ cancelHighlightBlock }\n\t\t\tonFocus={ highlightBlock }\n\t\t\tonBlur={ cancelHighlightBlock }\n\t\t\tonClick={ () => {\n\t\t\t\tselectBlock( clientId );\n\t\t\t} }\n\t\t>\n\t\t\t{ templatePartArea?.label }\n\t\t</Button>\n\t);\n}\n\nexport default function TemplateAreas() {\n\tconst { isTemplate, templateParts } = useSelect( ( select ) => {\n\t\tconst _isTemplate =\n\t\t\tselect( editorStore ).getCurrentPostType() === TEMPLATE_POST_TYPE;\n\n\t\treturn {\n\t\t\tisTemplate: _isTemplate,\n\t\t\ttemplateParts:\n\t\t\t\t_isTemplate &&\n\t\t\t\tunlock(\n\t\t\t\t\tselect( editorStore )\n\t\t\t\t).getCurrentTemplateTemplateParts(),\n\t\t};\n\t}, [] );\n\n\tif ( ! isTemplate || ! templateParts.length ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<section className=\"editor-template-areas\">\n\t\t\t<Heading level={ 3 } className=\"editor-template-areas__title\">\n\t\t\t\t{ __( 'Areas' ) }\n\t\t\t</Heading>\n\n\t\t\t<ul className=\"editor-template-areas__list\">\n\t\t\t\t{ templateParts.map( ( { templatePart, block } ) => (\n\t\t\t\t\t<li key={ block.clientId }>\n\t\t\t\t\t\t<TemplateAreaItem\n\t\t\t\t\t\t\tarea={ templatePart.area }\n\t\t\t\t\t\t\tclientId={ block.clientId }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</li>\n\t\t\t\t) ) }\n\t\t\t</ul>\n\t\t</section>\n\t);\n}\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAKA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AAKA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AACA,IAAAM,UAAA,GAAAN,OAAA;AAA2D,IAAAO,WAAA,GAAAP,OAAA;AAjB3D;AACA;AACA;;AAUA;AACA;AACA;;AAKA,SAASQ,gBAAgBA,CAAE;EAAEC,IAAI;EAAEC;AAAS,CAAC,EAAG;EAC/C,MAAM;IAAEC,WAAW;IAAEC;EAAqB,CAAC,GAC1C,IAAAC,iBAAW,EAAEC,kBAAiB,CAAC;EAChC,MAAMC,gBAAgB,GAAG,IAAAC,eAAS,EAC/BC,MAAM,IAAM;IACb,MAAMC,YAAY,GACjBD,MAAM,CACLE,YACD,CAAC,CAACC,yCAAyC,CAAC,CAAC;IAE9C,OAAOF,YAAY,CAACG,IAAI,CACrBC,WAAW,IAAMA,WAAW,CAACb,IAAI,KAAKA,IACzC,CAAC;EACF,CAAC,EACD,CAAEA,IAAI,CACP,CAAC;EAED,MAAMc,cAAc,GAAGA,CAAA,KAAMX,oBAAoB,CAAEF,QAAQ,EAAE,IAAK,CAAC;EACnE,MAAMc,oBAAoB,GAAGA,CAAA,KAAMZ,oBAAoB,CAAEF,QAAQ,EAAE,KAAM,CAAC;EAE1E,oBACC,I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,CAAE;QAAEC,YAAY;QAAEC;MAAM,CAAC,kBAC7C,IAAA5C,WAAA,CAAAkB,GAAA;QAAAS,QAAA,eACC,IAAA3B,WAAA,CAAAkB,GAAA,EAACjB,gBAAgB;UAChBC,IAAI,EAAGyC,YAAY,CAACzC,IAAM;UAC1BC,QAAQ,EAAGyC,KAAK,CAACzC;QAAU,CAC3B;MAAC,GAJOyC,KAAK,CAACzC,QAKZ,CACH;IAAC,CACA,CAAC;EAAA,CACG,CAAC;AAEZ","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"names":["paramCase","kebabCase","downloadZip","downloadBlob","__","privateApis","patternsPrivateApis","unlock","PATTERN_TYPES","getJsonFromItem","item","JSON","stringify","__file","type","title","name","content","patternPost","raw","syncStatus","wp_pattern_sync_status","exportPatternAsJSONAction","id","label","supportsBulk","isEligible","user","callback","items","length","nameCount","filesToZip","map","lastModified","Date","input","blob"],"sources":["@wordpress/editor/src/components/post-actions/export-pattern-action.js"],"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 { privateApis as patternsPrivateApis } from '@wordpress/patterns';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\n// Patterns.\nconst { PATTERN_TYPES } = unlock( patternsPrivateApis );\n\nfunction getJsonFromItem( item ) {\n\treturn JSON.stringify(\n\t\t{\n\t\t\t__file: item.type,\n\t\t\ttitle: item.title || item.name,\n\t\t\tcontent: item.patternPost.content.raw,\n\t\t\tsyncStatus: item.patternPost.wp_pattern_sync_status,\n\t\t},\n\t\tnull,\n\t\t2\n\t);\n}\n\nexport const exportPatternAsJSONAction = {\n\tid: 'export-pattern',\n\tlabel: __( 'Export as JSON' ),\n\tsupportsBulk: true,\n\tisEligible: ( item ) => {\n\t\tif ( ! item.type ) {\n\t\t\treturn false;\n\t\t}\n\t\treturn item.type === PATTERN_TYPES.user;\n\t},\n\tcallback: async ( items ) => {\n\t\tif ( items.length === 1 ) {\n\t\t\treturn downloadBlob(\n\t\t\t\t`${ kebabCase( items[ 0 ].title || items[ 0 ].name ) }.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 = {};\n\t\tconst filesToZip = items.map( ( item ) => {\n\t\t\tconst name = kebabCase( item.title || item.name );\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"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,IAAIC,SAAS,QAAQ,aAAa;AACpD,SAASC,WAAW,QAAQ,YAAY;;AAExC;AACA;AACA;AACA,SAASC,YAAY,QAAQ,iBAAiB;AAC9C,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,WAAW,IAAIC,mBAAmB,QAAQ,qBAAqB;;AAExE;AACA;AACA;AACA,SAASC,MAAM,QAAQ,mBAAmB;;AAE1C;AACA,MAAM;EAAEC;AAAc,CAAC,GAAGD,MAAM,CAAED,mBAAoB,CAAC;AAEvD,SAASG,eAAeA,CAAEC,IAAI,EAAG;EAChC,OAAOC,IAAI,CAACC,SAAS,CACpB;IACCC,MAAM,EAAEH,IAAI,CAACI,IAAI;IACjBC,KAAK,EAAEL,IAAI,CAACK,KAAK,IAAIL,I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L,OAAM;QACPkB,YAAY,EAAE,IAAIC,IAAI,CAAC,CAAC;QACxBC,KAAK,EAAE3B,eAAe,CAAEC,IAAK;MAC9B,CAAC;IACF,CAAE,CAAC;IACH,OAAOP,YAAY,CAClBC,EAAE,CAAE,iBAAkB,CAAC,GAAG,MAAM,EAChC,MAAMF,WAAW,CAAE8B,UAAW,CAAC,CAACK,IAAI,CAAC,CAAC,EACtC,iBACD,CAAC;EACF;AACD,CAAC","ignoreList":[]}
@@ -1,5 +0,0 @@
1
- // Client-zip is meant to be used in a browser and is therefore released as an ES6 module only,
2
- // in order for the native build to succeed we are importing a null action and avoiding importing
3
- // the non working in native context client-zip module.
4
- export const exportPatternAsJSONAction = null;
5
- //# sourceMappingURL=export-pattern-action.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["exportPatternAsJSONAction"],"sources":["@wordpress/editor/src/components/post-actions/export-pattern-action.native.js"],"sourcesContent":["// Client-zip is meant to be used in a browser and is therefore released as an ES6 module only,\n// in order for the native build to succeed we are importing a null action and avoiding importing\n// the non working in native context client-zip module.\nexport const exportPatternAsJSONAction = null;\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAO,MAAMA,yBAAyB,GAAG,IAAI","ignoreList":[]}
@@ -1,78 +0,0 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
- import { useSelect, useDispatch } from '@wordpress/data';
5
- import { Button, __experimentalHeading as Heading } from '@wordpress/components';
6
- import { store as blockEditorStore } from '@wordpress/block-editor';
7
- import { __ } from '@wordpress/i18n';
8
-
9
- /**
10
- * Internal dependencies
11
- */
12
- import { store as editorStore } from '../../store';
13
- import { unlock } from '../../lock-unlock';
14
- import { TEMPLATE_POST_TYPE } from '../../store/constants';
15
- import { jsx as _jsx } from "react/jsx-runtime";
16
- import { jsxs as _jsxs } from "react/jsx-runtime";
17
- function TemplateAreaItem({
18
- area,
19
- clientId
20
- }) {
21
- const {
22
- selectBlock,
23
- toggleBlockHighlight
24
- } = useDispatch(blockEditorStore);
25
- const templatePartArea = useSelect(select => {
26
- const defaultAreas = select(editorStore).__experimentalGetDefaultTemplatePartAreas();
27
- return defaultAreas.find(defaultArea => defaultArea.area === area);
28
- }, [area]);
29
- const highlightBlock = () => toggleBlockHighlight(clientId, true);
30
- const cancelHighlightBlock = () => toggleBlockHighlight(clientId, false);
31
- return /*#__PURE__*/_jsx(Button, {
32
- className: "editor-template-areas__item",
33
- icon: templatePartArea?.icon,
34
- onMouseOver: highlightBlock,
35
- onMouseLeave: cancelHighlightBlock,
36
- onFocus: highlightBlock,
37
- onBlur: cancelHighlightBlock,
38
- onClick: () => {
39
- selectBlock(clientId);
40
- },
41
- children: templatePartArea?.label
42
- });
43
- }
44
- export default function TemplateAreas() {
45
- const {
46
- isTemplate,
47
- templateParts
48
- } = useSelect(select => {
49
- const _isTemplate = select(editorStore).getCurrentPostType() === TEMPLATE_POST_TYPE;
50
- return {
51
- isTemplate: _isTemplate,
52
- templateParts: _isTemplate && unlock(select(editorStore)).getCurrentTemplateTemplateParts()
53
- };
54
- }, []);
55
- if (!isTemplate || !templateParts.length) {
56
- return null;
57
- }
58
- return /*#__PURE__*/_jsxs("section", {
59
- className: "editor-template-areas",
60
- children: [/*#__PURE__*/_jsx(Heading, {
61
- level: 3,
62
- className: "editor-template-areas__title",
63
- children: __('Areas')
64
- }), /*#__PURE__*/_jsx("ul", {
65
- className: "editor-template-areas__list",
66
- children: templateParts.map(({
67
- templatePart,
68
- block
69
- }) => /*#__PURE__*/_jsx("li", {
70
- children: /*#__PURE__*/_jsx(TemplateAreaItem, {
71
- area: templatePart.area,
72
- clientId: block.clientId
73
- })
74
- }, block.clientId))
75
- })]
76
- });
77
- }
78
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["useSelect","useDispatch","Button","__experimentalHeading","Heading","store","blockEditorStore","__","editorStore","unlock","TEMPLATE_POST_TYPE","jsx","_jsx","jsxs","_jsxs","TemplateAreaItem","area","clientId","selectBlock","toggleBlockHighlight","templatePartArea","select","defaultAreas","__experimentalGetDefaultTemplatePartAreas","find","defaultArea","highlightBlock","cancelHighlightBlock","className","icon","onMouseOver","onMouseLeave","onFocus","onBlur","onClick","children","label","TemplateAreas","isTemplate","templateParts","_isTemplate","getCurrentPostType","getCurrentTemplateTemplateParts","length","level","map","templatePart","block"],"sources":["@wordpress/editor/src/components/template-areas/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tButton,\n\t__experimentalHeading as Heading,\n} from '@wordpress/components';\n\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\nimport { TEMPLATE_POST_TYPE } from '../../store/constants';\n\nfunction TemplateAreaItem( { area, clientId } ) {\n\tconst { selectBlock, toggleBlockHighlight } =\n\t\tuseDispatch( blockEditorStore );\n\tconst templatePartArea = useSelect(\n\t\t( select ) => {\n\t\t\tconst defaultAreas =\n\t\t\t\tselect(\n\t\t\t\t\teditorStore\n\t\t\t\t).__experimentalGetDefaultTemplatePartAreas();\n\n\t\t\treturn defaultAreas.find(\n\t\t\t\t( defaultArea ) => defaultArea.area === area\n\t\t\t);\n\t\t},\n\t\t[ area ]\n\t);\n\n\tconst highlightBlock = () => toggleBlockHighlight( clientId, true );\n\tconst cancelHighlightBlock = () => toggleBlockHighlight( clientId, false );\n\n\treturn (\n\t\t<Button\n\t\t\tclassName=\"editor-template-areas__item\"\n\t\t\ticon={ templatePartArea?.icon }\n\t\t\tonMouseOver={ highlightBlock }\n\t\t\tonMouseLeave={ cancelHighlightBlock }\n\t\t\tonFocus={ highlightBlock }\n\t\t\tonBlur={ cancelHighlightBlock }\n\t\t\tonClick={ () => {\n\t\t\t\tselectBlock( clientId );\n\t\t\t} }\n\t\t>\n\t\t\t{ templatePartArea?.label }\n\t\t</Button>\n\t);\n}\n\nexport default function TemplateAreas() {\n\tconst { isTemplate, templateParts } = useSelect( ( select ) => {\n\t\tconst _isTemplate =\n\t\t\tselect( editorStore ).getCurrentPostType() === TEMPLATE_POST_TYPE;\n\n\t\treturn {\n\t\t\tisTemplate: _isTemplate,\n\t\t\ttemplateParts:\n\t\t\t\t_isTemplate &&\n\t\t\t\tunlock(\n\t\t\t\t\tselect( editorStore )\n\t\t\t\t).getCurrentTemplateTemplateParts(),\n\t\t};\n\t}, [] );\n\n\tif ( ! isTemplate || ! templateParts.length ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<section className=\"editor-template-areas\">\n\t\t\t<Heading level={ 3 } className=\"editor-template-areas__title\">\n\t\t\t\t{ __( 'Areas' ) }\n\t\t\t</Heading>\n\n\t\t\t<ul className=\"editor-template-areas__list\">\n\t\t\t\t{ templateParts.map( ( { templatePart, block } ) => (\n\t\t\t\t\t<li key={ block.clientId }>\n\t\t\t\t\t\t<TemplateAreaItem\n\t\t\t\t\t\t\tarea={ templatePart.area }\n\t\t\t\t\t\t\tclientId={ block.clientId }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</li>\n\t\t\t\t) ) }\n\t\t\t</ul>\n\t\t</section>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SACCC,MAAM,EACNC,qBAAqB,IAAIC,OAAO,QAC1B,uBAAuB;AAE9B,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,yBAAyB;AACnE,SAASC,EAAE,QAAQ,iBAAiB;;AAEpC;AACA;AACA;AACA,SAASF,KAAK,IAAIG,WAAW,QAAQ,aAAa;AAClD,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,SAASC,kBAAkB,QAAQ,uBAAuB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAE3D,SAASC,gBAAgBA,CAAE;EAAEC,IAAI;EAAEC;AAAS,CAAC,EAAG;EAC/C,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AAC,EAAE,EAAG,CAAC;EAEP,IAAK,CAAEJ,UAAU,IAAI,CAAEC,aAAa,CAACI,MAAM,EAAG;IAC7C,OAAO,IAAI;EACZ;EAEA,oBACC7B,KAAA;IAASc,SAAS,EAAC,uBAAuB;IAAAO,QAAA,gBACzCvB,IAAA,CAACR,OAAO;MAACwC,KAAK,EAAG,CAAG;MAAChB,SAAS,EAAC,8BAA8B;MAAAO,QAAA,EAC1D5B,EAAE,CAAE,OAAQ;IAAC,CACP,CAAC,eAEVK,IAAA;MAAIgB,SAAS,EAAC,6BAA6B;MAAAO,QAAA,EACxCI,aAAa,CAACM,GAAG,CAAE,CAAE;QAAEC,YAAY;QAAEC;MAAM,CAAC,kBAC7CnC,IAAA;QAAAuB,QAAA,eACCvB,IAAA,CAACG,gBAAgB;UAChBC,IAAI,EAAG8B,YAAY,CAAC9B,IAAM;UAC1BC,QAAQ,EAAG8B,KAAK,CAAC9B;QAAU,CAC3B;MAAC,GAJO8B,KAAK,CAAC9B,QAKZ,CACH;IAAC,CACA,CAAC;EAAA,CACG,CAAC;AAEZ","ignoreList":[]}
@@ -1,4 +0,0 @@
1
- // Client-zip is meant to be used in a browser and is therefore released as an ES6 module only,
2
- // in order for the native build to succeed we are importing a null action and avoiding importing
3
- // the non working in native context client-zip module.
4
- export const exportPatternAsJSONAction = null;
@@ -1,94 +0,0 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
- import { useSelect, useDispatch } from '@wordpress/data';
5
- import {
6
- Button,
7
- __experimentalHeading as Heading,
8
- } from '@wordpress/components';
9
-
10
- import { store as blockEditorStore } from '@wordpress/block-editor';
11
- import { __ } from '@wordpress/i18n';
12
-
13
- /**
14
- * Internal dependencies
15
- */
16
- import { store as editorStore } from '../../store';
17
- import { unlock } from '../../lock-unlock';
18
- import { TEMPLATE_POST_TYPE } from '../../store/constants';
19
-
20
- function TemplateAreaItem( { area, clientId } ) {
21
- const { selectBlock, toggleBlockHighlight } =
22
- useDispatch( blockEditorStore );
23
- const templatePartArea = useSelect(
24
- ( select ) => {
25
- const defaultAreas =
26
- select(
27
- editorStore
28
- ).__experimentalGetDefaultTemplatePartAreas();
29
-
30
- return defaultAreas.find(
31
- ( defaultArea ) => defaultArea.area === area
32
- );
33
- },
34
- [ area ]
35
- );
36
-
37
- const highlightBlock = () => toggleBlockHighlight( clientId, true );
38
- const cancelHighlightBlock = () => toggleBlockHighlight( clientId, false );
39
-
40
- return (
41
- <Button
42
- className="editor-template-areas__item"
43
- icon={ templatePartArea?.icon }
44
- onMouseOver={ highlightBlock }
45
- onMouseLeave={ cancelHighlightBlock }
46
- onFocus={ highlightBlock }
47
- onBlur={ cancelHighlightBlock }
48
- onClick={ () => {
49
- selectBlock( clientId );
50
- } }
51
- >
52
- { templatePartArea?.label }
53
- </Button>
54
- );
55
- }
56
-
57
- export default function TemplateAreas() {
58
- const { isTemplate, templateParts } = useSelect( ( select ) => {
59
- const _isTemplate =
60
- select( editorStore ).getCurrentPostType() === TEMPLATE_POST_TYPE;
61
-
62
- return {
63
- isTemplate: _isTemplate,
64
- templateParts:
65
- _isTemplate &&
66
- unlock(
67
- select( editorStore )
68
- ).getCurrentTemplateTemplateParts(),
69
- };
70
- }, [] );
71
-
72
- if ( ! isTemplate || ! templateParts.length ) {
73
- return null;
74
- }
75
-
76
- return (
77
- <section className="editor-template-areas">
78
- <Heading level={ 3 } className="editor-template-areas__title">
79
- { __( 'Areas' ) }
80
- </Heading>
81
-
82
- <ul className="editor-template-areas__list">
83
- { templateParts.map( ( { templatePart, block } ) => (
84
- <li key={ block.clientId }>
85
- <TemplateAreaItem
86
- area={ templatePart.area }
87
- clientId={ block.clientId }
88
- />
89
- </li>
90
- ) ) }
91
- </ul>
92
- </section>
93
- );
94
- }
@@ -1,22 +0,0 @@
1
- .editor-template-areas {
2
- &__list {
3
- margin: 0;
4
- > li {
5
- margin: 0;
6
- }
7
- }
8
-
9
- &__item {
10
- width: 100%;
11
-
12
- // Override the default padding.
13
- &.components-button.has-icon {
14
- padding: 0;
15
- }
16
- }
17
- }
18
-
19
- h3.components-heading.editor-template-areas__title {
20
- font-weight: 500;
21
- margin: 0 0 $grid-unit-10;
22
- }
File without changes