@wordpress/edit-post 7.33.0 → 7.35.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 (181) hide show
  1. package/CHANGELOG.md +10 -2
  2. package/README.md +22 -36
  3. package/build/components/header/fullscreen-mode-close/index.js +2 -2
  4. package/build/components/header/fullscreen-mode-close/index.js.map +1 -1
  5. package/build/components/header/index.js +7 -127
  6. package/build/components/header/index.js.map +1 -1
  7. package/build/components/header/more-menu/index.js +17 -43
  8. package/build/components/header/more-menu/index.js.map +1 -1
  9. package/build/components/header/more-menu/manage-patterns-menu-item.js +40 -0
  10. package/build/components/header/more-menu/manage-patterns-menu-item.js.map +1 -0
  11. package/build/{plugins/welcome-guide-menu-item/index.js → components/header/more-menu/welcome-guide-menu-item.js} +1 -1
  12. package/build/components/header/more-menu/welcome-guide-menu-item.js.map +1 -0
  13. package/build/components/keyboard-shortcuts/index.js +0 -88
  14. package/build/components/keyboard-shortcuts/index.js.map +1 -1
  15. package/build/components/layout/index.js +72 -33
  16. package/build/components/layout/index.js.map +1 -1
  17. package/build/components/meta-boxes/meta-boxes-area/index.js +2 -2
  18. package/build/components/meta-boxes/meta-boxes-area/index.js.map +1 -1
  19. package/build/components/preferences-modal/index.js +2 -11
  20. package/build/components/preferences-modal/index.js.map +1 -1
  21. package/build/components/visual-editor/index.js +11 -5
  22. package/build/components/visual-editor/index.js.map +1 -1
  23. package/build/components/visual-editor/use-padding-appender.js +6 -1
  24. package/build/components/visual-editor/use-padding-appender.js.map +1 -1
  25. package/build/deprecated.js +132 -0
  26. package/build/deprecated.js.map +1 -0
  27. package/build/index.js +19 -58
  28. package/build/index.js.map +1 -1
  29. package/build-module/components/header/fullscreen-mode-close/index.js +2 -2
  30. package/build-module/components/header/fullscreen-mode-close/index.js.map +1 -1
  31. package/build-module/components/header/index.js +11 -131
  32. package/build-module/components/header/index.js.map +1 -1
  33. package/build-module/components/header/more-menu/index.js +17 -43
  34. package/build-module/components/header/more-menu/index.js.map +1 -1
  35. package/build-module/components/header/more-menu/manage-patterns-menu-item.js +33 -0
  36. package/build-module/components/header/more-menu/manage-patterns-menu-item.js.map +1 -0
  37. package/build-module/{plugins/welcome-guide-menu-item/index.js → components/header/more-menu/welcome-guide-menu-item.js} +1 -1
  38. package/build-module/components/header/more-menu/welcome-guide-menu-item.js.map +1 -0
  39. package/build-module/components/keyboard-shortcuts/index.js +1 -89
  40. package/build-module/components/keyboard-shortcuts/index.js.map +1 -1
  41. package/build-module/components/layout/index.js +73 -34
  42. package/build-module/components/layout/index.js.map +1 -1
  43. package/build-module/components/meta-boxes/meta-boxes-area/index.js +2 -2
  44. package/build-module/components/meta-boxes/meta-boxes-area/index.js.map +1 -1
  45. package/build-module/components/preferences-modal/index.js +3 -12
  46. package/build-module/components/preferences-modal/index.js.map +1 -1
  47. package/build-module/components/visual-editor/index.js +11 -5
  48. package/build-module/components/visual-editor/index.js.map +1 -1
  49. package/build-module/components/visual-editor/use-padding-appender.js +6 -1
  50. package/build-module/components/visual-editor/use-padding-appender.js.map +1 -1
  51. package/build-module/deprecated.js +116 -0
  52. package/build-module/deprecated.js.map +1 -0
  53. package/build-module/index.js +2 -15
  54. package/build-module/index.js.map +1 -1
  55. package/build-style/style-rtl.css +14 -409
  56. package/build-style/style.css +14 -409
  57. package/package.json +32 -32
  58. package/src/components/header/fullscreen-mode-close/index.js +2 -2
  59. package/src/components/header/index.js +11 -159
  60. package/src/components/header/more-menu/index.js +27 -42
  61. package/src/components/header/more-menu/manage-patterns-menu-item.js +33 -0
  62. package/src/components/header/style.scss +4 -320
  63. package/src/components/keyboard-shortcuts/index.js +1 -106
  64. package/src/components/layout/index.js +84 -25
  65. package/src/components/layout/style.scss +7 -80
  66. package/src/components/meta-boxes/meta-boxes-area/index.js +4 -8
  67. package/src/components/preferences-modal/index.js +2 -22
  68. package/src/components/visual-editor/index.js +11 -4
  69. package/src/components/visual-editor/use-padding-appender.js +7 -1
  70. package/src/deprecated.js +107 -0
  71. package/src/index.js +3 -24
  72. package/src/style.scss +1 -5
  73. package/build/components/header/post-publish-button-or-toggle.js +0 -94
  74. package/build/components/header/post-publish-button-or-toggle.js.map +0 -1
  75. package/build/components/header/preferences-menu-item/index.js +0 -39
  76. package/build/components/header/preferences-menu-item/index.js.map +0 -1
  77. package/build/components/header/tools-more-menu-group/index.js +0 -26
  78. package/build/components/header/tools-more-menu-group/index.js.map +0 -1
  79. package/build/components/header/writing-menu/index.js +0 -71
  80. package/build/components/header/writing-menu/index.js.map +0 -1
  81. package/build/components/layout/actions-panel.js +0 -86
  82. package/build/components/layout/actions-panel.js.map +0 -1
  83. package/build/components/preferences-modal/enable-publish-sidebar.js +0 -38
  84. package/build/components/preferences-modal/enable-publish-sidebar.js.map +0 -1
  85. package/build/components/sidebar/plugin-post-publish-panel/index.js +0 -39
  86. package/build/components/sidebar/plugin-post-publish-panel/index.js.map +0 -1
  87. package/build/components/sidebar/plugin-pre-publish-panel/index.js +0 -43
  88. package/build/components/sidebar/plugin-pre-publish-panel/index.js.map +0 -1
  89. package/build/components/sidebar/post-format/index.js +0 -21
  90. package/build/components/sidebar/post-format/index.js.map +0 -1
  91. package/build/components/sidebar/post-pending-status/index.js +0 -26
  92. package/build/components/sidebar/post-pending-status/index.js.map +0 -1
  93. package/build/components/sidebar/post-slug/index.js +0 -21
  94. package/build/components/sidebar/post-slug/index.js.map +0 -1
  95. package/build/components/sidebar/post-status/index.js +0 -69
  96. package/build/components/sidebar/post-status/index.js.map +0 -1
  97. package/build/components/sidebar/post-sticky/index.js +0 -26
  98. package/build/components/sidebar/post-sticky/index.js.map +0 -1
  99. package/build/components/sidebar/post-trash/index.js +0 -16
  100. package/build/components/sidebar/post-trash/index.js.map +0 -1
  101. package/build/components/sidebar/post-visibility/index.js +0 -78
  102. package/build/components/sidebar/post-visibility/index.js.map +0 -1
  103. package/build/components/sidebar/settings-header/index.js +0 -53
  104. package/build/components/sidebar/settings-header/index.js.map +0 -1
  105. package/build/components/sidebar/settings-sidebar/index.js +0 -163
  106. package/build/components/sidebar/settings-sidebar/index.js.map +0 -1
  107. package/build/plugins/copy-content-menu-item/index.js +0 -39
  108. package/build/plugins/copy-content-menu-item/index.js.map +0 -1
  109. package/build/plugins/index.js +0 -69
  110. package/build/plugins/index.js.map +0 -1
  111. package/build/plugins/keyboard-shortcuts-help-menu-item/index.js +0 -44
  112. package/build/plugins/keyboard-shortcuts-help-menu-item/index.js.map +0 -1
  113. package/build/plugins/welcome-guide-menu-item/index.js.map +0 -1
  114. package/build-module/components/header/post-publish-button-or-toggle.js +0 -86
  115. package/build-module/components/header/post-publish-button-or-toggle.js.map +0 -1
  116. package/build-module/components/header/preferences-menu-item/index.js +0 -32
  117. package/build-module/components/header/preferences-menu-item/index.js.map +0 -1
  118. package/build-module/components/header/tools-more-menu-group/index.js +0 -19
  119. package/build-module/components/header/tools-more-menu-group/index.js.map +0 -1
  120. package/build-module/components/header/writing-menu/index.js +0 -64
  121. package/build-module/components/header/writing-menu/index.js.map +0 -1
  122. package/build-module/components/layout/actions-panel.js +0 -78
  123. package/build-module/components/layout/actions-panel.js.map +0 -1
  124. package/build-module/components/preferences-modal/enable-publish-sidebar.js +0 -31
  125. package/build-module/components/preferences-modal/enable-publish-sidebar.js.map +0 -1
  126. package/build-module/components/sidebar/plugin-post-publish-panel/index.js +0 -32
  127. package/build-module/components/sidebar/plugin-post-publish-panel/index.js.map +0 -1
  128. package/build-module/components/sidebar/plugin-pre-publish-panel/index.js +0 -36
  129. package/build-module/components/sidebar/plugin-pre-publish-panel/index.js.map +0 -1
  130. package/build-module/components/sidebar/post-format/index.js +0 -13
  131. package/build-module/components/sidebar/post-format/index.js.map +0 -1
  132. package/build-module/components/sidebar/post-pending-status/index.js +0 -18
  133. package/build-module/components/sidebar/post-pending-status/index.js.map +0 -1
  134. package/build-module/components/sidebar/post-slug/index.js +0 -13
  135. package/build-module/components/sidebar/post-slug/index.js.map +0 -1
  136. package/build-module/components/sidebar/post-status/index.js +0 -61
  137. package/build-module/components/sidebar/post-status/index.js.map +0 -1
  138. package/build-module/components/sidebar/post-sticky/index.js +0 -18
  139. package/build-module/components/sidebar/post-sticky/index.js.map +0 -1
  140. package/build-module/components/sidebar/post-trash/index.js +0 -9
  141. package/build-module/components/sidebar/post-trash/index.js.map +0 -1
  142. package/build-module/components/sidebar/post-visibility/index.js +0 -70
  143. package/build-module/components/sidebar/post-visibility/index.js.map +0 -1
  144. package/build-module/components/sidebar/settings-header/index.js +0 -46
  145. package/build-module/components/sidebar/settings-header/index.js.map +0 -1
  146. package/build-module/components/sidebar/settings-sidebar/index.js +0 -155
  147. package/build-module/components/sidebar/settings-sidebar/index.js.map +0 -1
  148. package/build-module/plugins/copy-content-menu-item/index.js +0 -32
  149. package/build-module/plugins/copy-content-menu-item/index.js.map +0 -1
  150. package/build-module/plugins/index.js +0 -65
  151. package/build-module/plugins/index.js.map +0 -1
  152. package/build-module/plugins/keyboard-shortcuts-help-menu-item/index.js +0 -36
  153. package/build-module/plugins/keyboard-shortcuts-help-menu-item/index.js.map +0 -1
  154. package/build-module/plugins/welcome-guide-menu-item/index.js.map +0 -1
  155. package/src/components/header/post-publish-button-or-toggle.js +0 -97
  156. package/src/components/header/preferences-menu-item/index.js +0 -31
  157. package/src/components/header/test/index.js +0 -63
  158. package/src/components/header/tools-more-menu-group/index.js +0 -20
  159. package/src/components/header/writing-menu/index.js +0 -73
  160. package/src/components/layout/actions-panel.js +0 -103
  161. package/src/components/preferences-modal/enable-publish-sidebar.js +0 -32
  162. package/src/components/preferences-modal/test/index.js +0 -28
  163. package/src/components/sidebar/plugin-post-publish-panel/index.js +0 -28
  164. package/src/components/sidebar/plugin-pre-publish-panel/index.js +0 -32
  165. package/src/components/sidebar/post-format/index.js +0 -20
  166. package/src/components/sidebar/post-format/style.scss +0 -5
  167. package/src/components/sidebar/post-pending-status/index.js +0 -27
  168. package/src/components/sidebar/post-slug/index.js +0 -17
  169. package/src/components/sidebar/post-slug/style.scss +0 -5
  170. package/src/components/sidebar/post-status/index.js +0 -88
  171. package/src/components/sidebar/post-sticky/index.js +0 -27
  172. package/src/components/sidebar/post-trash/index.js +0 -12
  173. package/src/components/sidebar/post-visibility/index.js +0 -88
  174. package/src/components/sidebar/post-visibility/style.scss +0 -5
  175. package/src/components/sidebar/settings-header/index.js +0 -49
  176. package/src/components/sidebar/settings-sidebar/index.js +0 -211
  177. package/src/components/sidebar/style.scss +0 -18
  178. package/src/plugins/copy-content-menu-item/index.js +0 -29
  179. package/src/plugins/index.js +0 -85
  180. package/src/plugins/keyboard-shortcuts-help-menu-item/index.js +0 -36
  181. /package/src/{plugins/welcome-guide-menu-item/index.js → components/header/more-menu/welcome-guide-menu-item.js} +0 -0
@@ -0,0 +1,116 @@
1
+ import { createElement } from "react";
2
+ /**
3
+ * WordPress dependencies
4
+ */
5
+ import { privateApis as editorPrivateApis, PluginBlockSettingsMenuItem as EditorPluginBlockSettingsMenuItem, PluginDocumentSettingPanel as EditorPluginDocumentSettingPanel, PluginMoreMenuItem as EditorPluginMoreMenuItem, PluginPrePublishPanel as EditorPluginPrePublishPanel, PluginPostPublishPanel as EditorPluginPostPublishPanel, PluginPostStatusInfo as EditorPluginPostStatusInfo, PluginSidebar as EditorPluginSidebar, PluginSidebarMoreMenuItem as EditorPluginSidebarMoreMenuItem } from '@wordpress/editor';
6
+ import deprecated from '@wordpress/deprecated';
7
+
8
+ /**
9
+ * Internal dependencies
10
+ */
11
+ import { unlock } from './lock-unlock';
12
+ const {
13
+ PluginPostExcerpt
14
+ } = unlock(editorPrivateApis);
15
+ const deprecateSlot = name => {
16
+ deprecated(`wp.editPost.${name}`, {
17
+ since: '6.6',
18
+ alternative: `wp.editor.${name}`
19
+ });
20
+ };
21
+
22
+ /* eslint-disable jsdoc/require-param */
23
+ /**
24
+ * @see PluginBlockSettingsMenuItem in @wordpress/editor package.
25
+ */
26
+ export function PluginBlockSettingsMenuItem(props) {
27
+ deprecateSlot('PluginBlockSettingsMenuItem');
28
+ return createElement(EditorPluginBlockSettingsMenuItem, {
29
+ ...props
30
+ });
31
+ }
32
+
33
+ /**
34
+ * @see PluginDocumentSettingPanel in @wordpress/editor package.
35
+ */
36
+ export function PluginDocumentSettingPanel(props) {
37
+ deprecateSlot('PluginDocumentSettingPanel');
38
+ return createElement(EditorPluginDocumentSettingPanel, {
39
+ ...props
40
+ });
41
+ }
42
+
43
+ /**
44
+ * @see PluginMoreMenuItem in @wordpress/editor package.
45
+ */
46
+ export function PluginMoreMenuItem(props) {
47
+ deprecateSlot('PluginMoreMenuItem');
48
+ return createElement(EditorPluginMoreMenuItem, {
49
+ ...props
50
+ });
51
+ }
52
+
53
+ /**
54
+ * @see PluginPrePublishPanel in @wordpress/editor package.
55
+ */
56
+ export function PluginPrePublishPanel(props) {
57
+ deprecateSlot('PluginPrePublishPanel');
58
+ return createElement(EditorPluginPrePublishPanel, {
59
+ ...props
60
+ });
61
+ }
62
+
63
+ /**
64
+ * @see PluginPostPublishPanel in @wordpress/editor package.
65
+ */
66
+ export function PluginPostPublishPanel(props) {
67
+ deprecateSlot('PluginPostPublishPanel');
68
+ return createElement(EditorPluginPostPublishPanel, {
69
+ ...props
70
+ });
71
+ }
72
+
73
+ /**
74
+ * @see PluginPostStatusInfo in @wordpress/editor package.
75
+ */
76
+ export function PluginPostStatusInfo(props) {
77
+ deprecateSlot('PluginPostStatusInfo');
78
+ return createElement(EditorPluginPostStatusInfo, {
79
+ ...props
80
+ });
81
+ }
82
+
83
+ /**
84
+ * @see PluginSidebar in @wordpress/editor package.
85
+ */
86
+ export function PluginSidebar(props) {
87
+ deprecateSlot('PluginSidebar');
88
+ return createElement(EditorPluginSidebar, {
89
+ ...props
90
+ });
91
+ }
92
+
93
+ /**
94
+ * @see PluginSidebarMoreMenuItem in @wordpress/editor package.
95
+ */
96
+ export function PluginSidebarMoreMenuItem(props) {
97
+ deprecateSlot('PluginSidebarMoreMenuItem');
98
+ return createElement(EditorPluginSidebarMoreMenuItem, {
99
+ ...props
100
+ });
101
+ }
102
+
103
+ /**
104
+ * @see PluginPostExcerpt in @wordpress/editor package.
105
+ */
106
+ export function __experimentalPluginPostExcerpt() {
107
+ deprecated('wp.editPost.__experimentalPluginPostExcerpt', {
108
+ since: '6.6',
109
+ hint: 'Core and custom panels can be access programmatically using their panel name.',
110
+ link: 'https://developer.wordpress.org/block-editor/reference-guides/slotfills/plugin-document-setting-panel/#accessing-a-panel-programmatically'
111
+ });
112
+ return PluginPostExcerpt;
113
+ }
114
+
115
+ /* eslint-enable jsdoc/require-param */
116
+ //# sourceMappingURL=deprecated.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["privateApis","editorPrivateApis","PluginBlockSettingsMenuItem","EditorPluginBlockSettingsMenuItem","PluginDocumentSettingPanel","EditorPluginDocumentSettingPanel","PluginMoreMenuItem","EditorPluginMoreMenuItem","PluginPrePublishPanel","EditorPluginPrePublishPanel","PluginPostPublishPanel","EditorPluginPostPublishPanel","PluginPostStatusInfo","EditorPluginPostStatusInfo","PluginSidebar","EditorPluginSidebar","PluginSidebarMoreMenuItem","EditorPluginSidebarMoreMenuItem","deprecated","unlock","PluginPostExcerpt","deprecateSlot","name","since","alternative","props","createElement","__experimentalPluginPostExcerpt","hint","link"],"sources":["@wordpress/edit-post/src/deprecated.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tprivateApis as editorPrivateApis,\n\tPluginBlockSettingsMenuItem as EditorPluginBlockSettingsMenuItem,\n\tPluginDocumentSettingPanel as EditorPluginDocumentSettingPanel,\n\tPluginMoreMenuItem as EditorPluginMoreMenuItem,\n\tPluginPrePublishPanel as EditorPluginPrePublishPanel,\n\tPluginPostPublishPanel as EditorPluginPostPublishPanel,\n\tPluginPostStatusInfo as EditorPluginPostStatusInfo,\n\tPluginSidebar as EditorPluginSidebar,\n\tPluginSidebarMoreMenuItem as EditorPluginSidebarMoreMenuItem,\n} from '@wordpress/editor';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from './lock-unlock';\nconst { PluginPostExcerpt } = unlock( editorPrivateApis );\n\nconst deprecateSlot = ( name ) => {\n\tdeprecated( `wp.editPost.${ name }`, {\n\t\tsince: '6.6',\n\t\talternative: `wp.editor.${ name }`,\n\t} );\n};\n\n/* eslint-disable jsdoc/require-param */\n/**\n * @see PluginBlockSettingsMenuItem in @wordpress/editor package.\n */\nexport function PluginBlockSettingsMenuItem( props ) {\n\tdeprecateSlot( 'PluginBlockSettingsMenuItem' );\n\treturn <EditorPluginBlockSettingsMenuItem { ...props } />;\n}\n\n/**\n * @see PluginDocumentSettingPanel in @wordpress/editor package.\n */\nexport function PluginDocumentSettingPanel( props ) {\n\tdeprecateSlot( 'PluginDocumentSettingPanel' );\n\treturn <EditorPluginDocumentSettingPanel { ...props } />;\n}\n\n/**\n * @see PluginMoreMenuItem in @wordpress/editor package.\n */\nexport function PluginMoreMenuItem( props ) {\n\tdeprecateSlot( 'PluginMoreMenuItem' );\n\treturn <EditorPluginMoreMenuItem { ...props } />;\n}\n\n/**\n * @see PluginPrePublishPanel in @wordpress/editor package.\n */\nexport function PluginPrePublishPanel( props ) {\n\tdeprecateSlot( 'PluginPrePublishPanel' );\n\treturn <EditorPluginPrePublishPanel { ...props } />;\n}\n\n/**\n * @see PluginPostPublishPanel in @wordpress/editor package.\n */\nexport function PluginPostPublishPanel( props ) {\n\tdeprecateSlot( 'PluginPostPublishPanel' );\n\treturn <EditorPluginPostPublishPanel { ...props } />;\n}\n\n/**\n * @see PluginPostStatusInfo in @wordpress/editor package.\n */\nexport function PluginPostStatusInfo( props ) {\n\tdeprecateSlot( 'PluginPostStatusInfo' );\n\treturn <EditorPluginPostStatusInfo { ...props } />;\n}\n\n/**\n * @see PluginSidebar in @wordpress/editor package.\n */\nexport function PluginSidebar( props ) {\n\tdeprecateSlot( 'PluginSidebar' );\n\treturn <EditorPluginSidebar { ...props } />;\n}\n\n/**\n * @see PluginSidebarMoreMenuItem in @wordpress/editor package.\n */\nexport function PluginSidebarMoreMenuItem( props ) {\n\tdeprecateSlot( 'PluginSidebarMoreMenuItem' );\n\treturn <EditorPluginSidebarMoreMenuItem { ...props } />;\n}\n\n/**\n * @see PluginPostExcerpt in @wordpress/editor package.\n */\nexport function __experimentalPluginPostExcerpt() {\n\tdeprecated( 'wp.editPost.__experimentalPluginPostExcerpt', {\n\t\tsince: '6.6',\n\t\thint: 'Core and custom panels can be access programmatically using their panel name.',\n\t\tlink: 'https://developer.wordpress.org/block-editor/reference-guides/slotfills/plugin-document-setting-panel/#accessing-a-panel-programmatically',\n\t} );\n\treturn PluginPostExcerpt;\n}\n\n/* eslint-enable jsdoc/require-param */\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,WAAW,IAAIC,iBAAiB,EAChCC,2BAA2B,IAAIC,iCAAiC,EAChEC,0BAA0B,IAAIC,gCAAgC,EAC9DC,kBAAkB,IAAIC,wBAAwB,EAC9CC,qBAAqB,IAAIC,2BAA2B,EACpDC,sBAAsB,IAAIC,4BAA4B,EACtDC,oBAAoB,IAAIC,0BAA0B,EAClDC,aAAa,IAAIC,mBAAmB,EACpCC,yBAAyB,IAAIC,+BAA+B,QACtD,mBAAmB;AAC1B,OAAOC,UAAU,MAAM,uBAAuB;;AAE9C;AACA;AACA;AACA,SAASC,MAAM,QAAQ,eAAe;AACtC,MAAM;EAAEC;AAAkB,CAAC,GAAGD,MAAM,CAAElB,iBAAkB,CAAC;AAEzD,MAAMoB,aAAa,GAAKC,IAAI,IAAM;EACjCJ,UAAU,CAAG,eAAeI,IAAM,EAAC,EAAE;IACpCC,KAAK,EAAE,KAAK;IACZC,WAAW,EAAG,aAAaF,IAAM;EAClC,CAAE,CAAC;AACJ,CAAC;;AAED;AACA;AACA;AACA;AACA,OAAO,SAASpB,2BAA2BA,CAAEuB,KAAK,EAAG;EACpDJ,aAAa,CAAE,6BAA8B,CAAC;EAC9C,OAAOK,aAAA,CAACvB,iCAAiC;IAAA,GAAMsB;EAAK,CAAI,CAAC;AAC1D;;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BAA+BA,CAAA,EAAG;EACjDT,UAAU,CAAE,6CAA6C,EAAE;IAC1DK,KAAK,EAAE,KAAK;IACZK,IAAI,EAAE,+EAA+E;IACrFC,IAAI,EAAE;EACP,CAAE,CAAC;EACH,OAAOT,iBAAiB;AACzB;;AAEA","ignoreList":[]}
@@ -9,18 +9,13 @@ import { createRoot } from '@wordpress/element';
9
9
  import { dispatch, select } from '@wordpress/data';
10
10
  import { store as preferencesStore } from '@wordpress/preferences';
11
11
  import { registerLegacyWidgetBlock, registerWidgetGroupBlock } from '@wordpress/widgets';
12
- import { PluginBlockSettingsMenuItem, PluginDocumentSettingPanel, PluginMoreMenuItem, PluginPostStatusInfo, PluginSidebar, PluginSidebarMoreMenuItem, privateApis as editorPrivateApis, store as editorStore } from '@wordpress/editor';
12
+ import { store as editorStore } from '@wordpress/editor';
13
13
 
14
14
  /**
15
15
  * Internal dependencies
16
16
  */
17
17
  import './hooks';
18
- import './plugins';
19
18
  import Editor from './editor';
20
- import { unlock } from './lock-unlock';
21
- const {
22
- PluginPostExcerpt: __experimentalPluginPostExcerpt
23
- } = unlock(editorPrivateApis);
24
19
 
25
20
  /**
26
21
  * Initializes and returns an instance of Editor.
@@ -129,16 +124,8 @@ export function reinitializeEditor() {
129
124
  version: '6.3'
130
125
  });
131
126
  }
132
- export { PluginBlockSettingsMenuItem };
133
- export { PluginDocumentSettingPanel };
134
- export { PluginMoreMenuItem };
135
- export { PluginPostStatusInfo };
136
- export { PluginSidebar };
137
- export { PluginSidebarMoreMenuItem };
138
- export { default as PluginPostPublishPanel } from './components/sidebar/plugin-post-publish-panel';
139
- export { default as PluginPrePublishPanel } from './components/sidebar/plugin-pre-publish-panel';
140
127
  export { default as __experimentalFullscreenModeClose } from './components/header/fullscreen-mode-close';
141
128
  export { default as __experimentalMainDashboardButton } from './components/header/main-dashboard-button';
142
- export { __experimentalPluginPostExcerpt };
143
129
  export { store } from './store';
130
+ export * from './deprecated';
144
131
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["store","blocksStore","registerCoreBlocks","__experimentalRegisterExperimentalCoreBlocks","deprecated","createRoot","dispatch","select","preferencesStore","registerLegacyWidgetBlock","registerWidgetGroupBlock","PluginBlockSettingsMenuItem","PluginDocumentSettingPanel","PluginMoreMenuItem","PluginPostStatusInfo","PluginSidebar","PluginSidebarMoreMenuItem","privateApis","editorPrivateApis","editorStore","Editor","unlock","PluginPostExcerpt","__experimentalPluginPostExcerpt","initializeEditor","id","postType","postId","settings","initialEdits","isMediumOrBigger","window","matchMedia","matches","target","document","getElementById","root","setDefaults","fullscreenMode","themeStyles","welcomeGuide","welcomeGuideTemplate","allowRightClickOverrides","editorMode","fixedToolbar","hiddenBlockTypes","inactivePanels","openPanels","showBlockBreadcrumbs","showIconLabels","showListViewByDefault","isPublishSidebarEnabled","reapplyBlockTypeFilters","get","setIsListViewOpened","inserter","process","env","IS_GUTENBERG_PLUGIN","enableFSEBlocks","__unstableEnableFullSiteEditingBlocks","documentMode","compatMode","console","warn","isIphone","navigator","userAgent","indexOf","addEventListener","event","editorScrollContainer","getElementsByClassName","scrollY","scrollTop","scrollTo","e","preventDefault","render","createElement","reinitializeEditor","since","version","default","PluginPostPublishPanel","PluginPrePublishPanel","__experimentalFullscreenModeClose","__experimentalMainDashboardButton"],"sources":["@wordpress/edit-post/src/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport {\n\tregisterCoreBlocks,\n\t__experimentalRegisterExperimentalCoreBlocks,\n} from '@wordpress/block-library';\nimport deprecated from '@wordpress/deprecated';\nimport { createRoot } from '@wordpress/element';\nimport { dispatch, select } from '@wordpress/data';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport {\n\tregisterLegacyWidgetBlock,\n\tregisterWidgetGroupBlock,\n} from '@wordpress/widgets';\nimport {\n\tPluginBlockSettingsMenuItem,\n\tPluginDocumentSettingPanel,\n\tPluginMoreMenuItem,\n\tPluginPostStatusInfo,\n\tPluginSidebar,\n\tPluginSidebarMoreMenuItem,\n\tprivateApis as editorPrivateApis,\n\tstore as editorStore,\n} from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport './hooks';\nimport './plugins';\nimport Editor from './editor';\nimport { unlock } from './lock-unlock';\n\nconst { PluginPostExcerpt: __experimentalPluginPostExcerpt } =\n\tunlock( editorPrivateApis );\n\n/**\n * Initializes and returns an instance of Editor.\n *\n * @param {string} id Unique identifier for editor instance.\n * @param {string} postType Post type of the post to edit.\n * @param {Object} postId ID of the post to edit.\n * @param {?Object} settings Editor settings object.\n * @param {Object} initialEdits Programmatic edits to apply initially, to be\n * considered as non-user-initiated (bypass for\n * unsaved changes prompt).\n */\nexport function initializeEditor(\n\tid,\n\tpostType,\n\tpostId,\n\tsettings,\n\tinitialEdits\n) {\n\tconst isMediumOrBigger = window.matchMedia( '(min-width: 782px)' ).matches;\n\tconst target = document.getElementById( id );\n\tconst root = createRoot( target );\n\n\tdispatch( preferencesStore ).setDefaults( 'core/edit-post', {\n\t\tfullscreenMode: true,\n\t\tthemeStyles: true,\n\t\twelcomeGuide: true,\n\t\twelcomeGuideTemplate: true,\n\t} );\n\n\tdispatch( preferencesStore ).setDefaults( 'core', {\n\t\tallowRightClickOverrides: true,\n\t\teditorMode: 'visual',\n\t\tfixedToolbar: false,\n\t\thiddenBlockTypes: [],\n\t\tinactivePanels: [],\n\t\topenPanels: [ 'post-status' ],\n\t\tshowBlockBreadcrumbs: true,\n\t\tshowIconLabels: false,\n\t\tshowListViewByDefault: false,\n\t\tisPublishSidebarEnabled: true,\n\t} );\n\n\tdispatch( blocksStore ).reapplyBlockTypeFilters();\n\n\t// Check if the block list view should be open by default.\n\t// If `distractionFree` mode is enabled, the block list view should not be open.\n\t// This behavior is disabled for small viewports.\n\tif (\n\t\tisMediumOrBigger &&\n\t\tselect( preferencesStore ).get( 'core', 'showListViewByDefault' ) &&\n\t\t! select( preferencesStore ).get( 'core', 'distractionFree' )\n\t) {\n\t\tdispatch( editorStore ).setIsListViewOpened( true );\n\t}\n\n\tregisterCoreBlocks();\n\tregisterLegacyWidgetBlock( { inserter: false } );\n\tregisterWidgetGroupBlock( { inserter: false } );\n\tif ( process.env.IS_GUTENBERG_PLUGIN ) {\n\t\t__experimentalRegisterExperimentalCoreBlocks( {\n\t\t\tenableFSEBlocks: settings.__unstableEnableFullSiteEditingBlocks,\n\t\t} );\n\t}\n\n\t// Show a console log warning if the browser is not in Standards rendering mode.\n\tconst documentMode =\n\t\tdocument.compatMode === 'CSS1Compat' ? 'Standards' : 'Quirks';\n\tif ( documentMode !== 'Standards' ) {\n\t\t// eslint-disable-next-line no-console\n\t\tconsole.warn(\n\t\t\t\"Your browser is using Quirks Mode. \\nThis can cause rendering issues such as blocks overlaying meta boxes in the editor. Quirks Mode can be triggered by PHP errors or HTML code appearing before the opening <!DOCTYPE html>. Try checking the raw page source or your site's PHP error log and resolving errors there, removing any HTML before the doctype, or disabling plugins.\"\n\t\t);\n\t}\n\n\t// This is a temporary fix for a couple of issues specific to Webkit on iOS.\n\t// Without this hack the browser scrolls the mobile toolbar off-screen.\n\t// Once supported in Safari we can replace this in favor of preventScroll.\n\t// For details see issue #18632 and PR #18686\n\t// Specifically, we scroll `interface-interface-skeleton__body` to enable a fixed top toolbar.\n\t// But Mobile Safari forces the `html` element to scroll upwards, hiding the toolbar.\n\n\tconst isIphone = window.navigator.userAgent.indexOf( 'iPhone' ) !== -1;\n\tif ( isIphone ) {\n\t\twindow.addEventListener( 'scroll', ( event ) => {\n\t\t\tconst editorScrollContainer = document.getElementsByClassName(\n\t\t\t\t'interface-interface-skeleton__body'\n\t\t\t)[ 0 ];\n\t\t\tif ( event.target === document ) {\n\t\t\t\t// Scroll element into view by scrolling the editor container by the same amount\n\t\t\t\t// that Mobile Safari tried to scroll the html element upwards.\n\t\t\t\tif ( window.scrollY > 100 ) {\n\t\t\t\t\teditorScrollContainer.scrollTop =\n\t\t\t\t\t\teditorScrollContainer.scrollTop + window.scrollY;\n\t\t\t\t}\n\t\t\t\t// Undo unwanted scroll on html element, but only in the visual editor.\n\t\t\t\tif (\n\t\t\t\t\tdocument.getElementsByClassName( 'is-mode-visual' )[ 0 ]\n\t\t\t\t) {\n\t\t\t\t\twindow.scrollTo( 0, 0 );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n\n\t// Prevent the default browser action for files dropped outside of dropzones.\n\twindow.addEventListener( 'dragover', ( e ) => e.preventDefault(), false );\n\twindow.addEventListener( 'drop', ( e ) => e.preventDefault(), false );\n\n\troot.render(\n\t\t<Editor\n\t\t\tsettings={ settings }\n\t\t\tpostId={ postId }\n\t\t\tpostType={ postType }\n\t\t\tinitialEdits={ initialEdits }\n\t\t/>\n\t);\n\n\treturn root;\n}\n\n/**\n * Used to reinitialize the editor after an error. Now it's a deprecated noop function.\n */\nexport function reinitializeEditor() {\n\tdeprecated( 'wp.editPost.reinitializeEditor', {\n\t\tsince: '6.2',\n\t\tversion: '6.3',\n\t} );\n}\n\nexport { PluginBlockSettingsMenuItem };\nexport { PluginDocumentSettingPanel };\nexport { PluginMoreMenuItem };\nexport { PluginPostStatusInfo };\nexport { PluginSidebar };\nexport { PluginSidebarMoreMenuItem };\nexport { default as PluginPostPublishPanel } from './components/sidebar/plugin-post-publish-panel';\nexport { default as PluginPrePublishPanel } from './components/sidebar/plugin-pre-publish-panel';\nexport { default as __experimentalFullscreenModeClose } from './components/header/fullscreen-mode-close';\nexport { default as __experimentalMainDashboardButton } from './components/header/main-dashboard-button';\nexport { __experimentalPluginPostExcerpt };\nexport { store } from './store';\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,KAAK,IAAIC,WAAW,QAAQ,mBAAmB;AACxD,SACCC,kBAAkB,EAClBC,4CAA4C,QACtC,0BAA0B;AACjC,OAAOC,UAAU,MAAM,uBAAuB;AAC9C,SAASC,UAAU,QAAQ,oBAAoB;AAC/C,SAASC,QAAQ,EAAEC,MAAM,QAAQ,iBAAiB;AAClD,SAASP,K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AAqB,QAAQ,+CAA+C;AAChG,SAASF,OAAO,IAAIG,iCAAiC,QAAQ,2CAA2C;AACxG,SAASH,OAAO,IAAII,iCAAiC,QAAQ,2CAA2C;AACxG,SAASjE,+BAA+B;AACxC,SAASvB,KAAK,QAAQ,SAAS","ignoreList":[]}
1
+ {"version":3,"names":["store","blocksStore","registerCoreBlocks","__experimentalRegisterExperimentalCoreBlocks","deprecated","createRoot","dispatch","select","preferencesStore","registerLegacyWidgetBlock","registerWidgetGroupBlock","editorStore","Editor","initializeEditor","id","postType","postId","settings","initialEdits","isMediumOrBigger","window","matchMedia","matches","target","document","getElementById","root","setDefaults","fullscreenMode","themeStyles","welcomeGuide","welcomeGuideTemplate","allowRightClickOverrides","editorMode","fixedToolbar","hiddenBlockTypes","inactivePanels","openPanels","showBlockBreadcrumbs","showIconLabels","showListViewByDefault","isPublishSidebarEnabled","reapplyBlockTypeFilters","get","setIsListViewOpened","inserter","process","env","IS_GUTENBERG_PLUGIN","enableFSEBlocks","__unstableEnableFullSiteEditingBlocks","documentMode","compatMode","console","warn","isIphone","navigator","userAgent","indexOf","addEventListener","event","editorScrollContainer","getElementsByClassName","scrollY","scrollTop","scrollTo","e","preventDefault","render","createElement","reinitializeEditor","since","version","default","__experimentalFullscreenModeClose","__experimentalMainDashboardButton"],"sources":["@wordpress/edit-post/src/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport {\n\tregisterCoreBlocks,\n\t__experimentalRegisterExperimentalCoreBlocks,\n} from '@wordpress/block-library';\nimport deprecated from '@wordpress/deprecated';\nimport { createRoot } from '@wordpress/element';\nimport { dispatch, select } from '@wordpress/data';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport {\n\tregisterLegacyWidgetBlock,\n\tregisterWidgetGroupBlock,\n} from '@wordpress/widgets';\nimport { store as editorStore } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport './hooks';\nimport Editor from './editor';\n\n/**\n * Initializes and returns an instance of Editor.\n *\n * @param {string} id Unique identifier for editor instance.\n * @param {string} postType Post type of the post to edit.\n * @param {Object} postId ID of the post to edit.\n * @param {?Object} settings Editor settings object.\n * @param {Object} initialEdits Programmatic edits to apply initially, to be\n * considered as non-user-initiated (bypass for\n * unsaved changes prompt).\n */\nexport function initializeEditor(\n\tid,\n\tpostType,\n\tpostId,\n\tsettings,\n\tinitialEdits\n) {\n\tconst isMediumOrBigger = window.matchMedia( '(min-width: 782px)' ).matches;\n\tconst target = document.getElementById( id );\n\tconst root = createRoot( target );\n\n\tdispatch( preferencesStore ).setDefaults( 'core/edit-post', {\n\t\tfullscreenMode: true,\n\t\tthemeStyles: true,\n\t\twelcomeGuide: true,\n\t\twelcomeGuideTemplate: true,\n\t} );\n\n\tdispatch( preferencesStore ).setDefaults( 'core', {\n\t\tallowRightClickOverrides: true,\n\t\teditorMode: 'visual',\n\t\tfixedToolbar: false,\n\t\thiddenBlockTypes: [],\n\t\tinactivePanels: [],\n\t\topenPanels: [ 'post-status' ],\n\t\tshowBlockBreadcrumbs: true,\n\t\tshowIconLabels: false,\n\t\tshowListViewByDefault: false,\n\t\tisPublishSidebarEnabled: true,\n\t} );\n\n\tdispatch( blocksStore ).reapplyBlockTypeFilters();\n\n\t// Check if the block list view should be open by default.\n\t// If `distractionFree` mode is enabled, the block list view should not be open.\n\t// This behavior is disabled for small viewports.\n\tif (\n\t\tisMediumOrBigger &&\n\t\tselect( preferencesStore ).get( 'core', 'showListViewByDefault' ) &&\n\t\t! select( preferencesStore ).get( 'core', 'distractionFree' )\n\t) {\n\t\tdispatch( editorStore ).setIsListViewOpened( true );\n\t}\n\n\tregisterCoreBlocks();\n\tregisterLegacyWidgetBlock( { inserter: false } );\n\tregisterWidgetGroupBlock( { inserter: false } );\n\tif ( process.env.IS_GUTENBERG_PLUGIN ) {\n\t\t__experimentalRegisterExperimentalCoreBlocks( {\n\t\t\tenableFSEBlocks: settings.__unstableEnableFullSiteEditingBlocks,\n\t\t} );\n\t}\n\n\t// Show a console log warning if the browser is not in Standards rendering mode.\n\tconst documentMode =\n\t\tdocument.compatMode === 'CSS1Compat' ? 'Standards' : 'Quirks';\n\tif ( documentMode !== 'Standards' ) {\n\t\t// eslint-disable-next-line no-console\n\t\tconsole.warn(\n\t\t\t\"Your browser is using Quirks Mode. \\nThis can cause rendering issues such as blocks overlaying meta boxes in the editor. Quirks Mode can be triggered by PHP errors or HTML code appearing before the opening <!DOCTYPE html>. Try checking the raw page source or your site's PHP error log and resolving errors there, removing any HTML before the doctype, or disabling plugins.\"\n\t\t);\n\t}\n\n\t// This is a temporary fix for a couple of issues specific to Webkit on iOS.\n\t// Without this hack the browser scrolls the mobile toolbar off-screen.\n\t// Once supported in Safari we can replace this in favor of preventScroll.\n\t// For details see issue #18632 and PR #18686\n\t// Specifically, we scroll `interface-interface-skeleton__body` to enable a fixed top toolbar.\n\t// But Mobile Safari forces the `html` element to scroll upwards, hiding the toolbar.\n\n\tconst isIphone = window.navigator.userAgent.indexOf( 'iPhone' ) !== -1;\n\tif ( isIphone ) {\n\t\twindow.addEventListener( 'scroll', ( event ) => {\n\t\t\tconst editorScrollContainer = document.getElementsByClassName(\n\t\t\t\t'interface-interface-skeleton__body'\n\t\t\t)[ 0 ];\n\t\t\tif ( event.target === document ) {\n\t\t\t\t// Scroll element into view by scrolling the editor container by the same amount\n\t\t\t\t// that Mobile Safari tried to scroll the html element upwards.\n\t\t\t\tif ( window.scrollY > 100 ) {\n\t\t\t\t\teditorScrollContainer.scrollTop =\n\t\t\t\t\t\teditorScrollContainer.scrollTop + window.scrollY;\n\t\t\t\t}\n\t\t\t\t// Undo unwanted scroll on html element, but only in the visual editor.\n\t\t\t\tif (\n\t\t\t\t\tdocument.getElementsByClassName( 'is-mode-visual' )[ 0 ]\n\t\t\t\t) {\n\t\t\t\t\twindow.scrollTo( 0, 0 );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n\n\t// Prevent the default browser action for files dropped outside of dropzones.\n\twindow.addEventListener( 'dragover', ( e ) => e.preventDefault(), false );\n\twindow.addEventListener( 'drop', ( e ) => e.preventDefault(), false );\n\n\troot.render(\n\t\t<Editor\n\t\t\tsettings={ settings }\n\t\t\tpostId={ postId }\n\t\t\tpostType={ postType }\n\t\t\tinitialEdits={ initialEdits }\n\t\t/>\n\t);\n\n\treturn root;\n}\n\n/**\n * Used to reinitialize the editor after an error. Now it's a deprecated noop function.\n */\nexport function reinitializeEditor() {\n\tdeprecated( 'wp.editPost.reinitializeEditor', {\n\t\tsince: '6.2',\n\t\tversion: '6.3',\n\t} );\n}\n\nexport { default as __experimentalFullscreenModeClose } from './components/header/fullscreen-mode-close';\nexport { default as __experimentalMainDashboardButton } from './components/header/main-dashboard-button';\n\nexport { store } from './store';\nexport * from './deprecated';\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,KAAK,IAAIC,WAAW,QAAQ,mBAAmB;AACxD,SACCC,kBAAkB,EAClBC,4CAA4C,QACtC,0BAA0B;AACjC,OAAOC,UAAU,MAAM,uBAAuB;AAC9C,SAASC,UAAU,QAAQ,oBAAoB;AAC/C,SAASC,QAAQ,EAAEC,MAAM,QAAQ,iBAAiB;AAClD,SAASP,KAAK,IAAIQ,gBAAgB,QAAQ,wBAAwB;AAClE,SACCC,yBAAyB,EACzBC,wBAAwB,QAClB,oBAAoB;AAC3B,SAASV,KAAK,IAAIW,WAAW,QAAQ,mBAAmB;;AAExD;AACA;AACA;AACA,OAAO,SAAS;AAChB,OAAOC,MAAM,MAAM,UAAU;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,gBAAgBA,CAC/BC,EAAE,EACFC,QAAQ,EACRC,MAAM,EACNC,QAAQ,EACRC,YAAY,EACX;EACD,MAAMC,gBAAgB,GAAGC,MAAM,CAACC,UAAU,CAAE,oBAAqB,CAAC,CAACC,OAAO;EAC1E,MAAMC,MAAM,GAAGC,QAAQ,CAACC,cAAc,CAAEX,E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