@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
@@ -8,8 +8,6 @@ var _element = require("@wordpress/element");
8
8
  var _data = require("@wordpress/data");
9
9
  var _keyboardShortcuts = require("@wordpress/keyboard-shortcuts");
10
10
  var _i18n = require("@wordpress/i18n");
11
- var _blockEditor = require("@wordpress/block-editor");
12
- var _blocks = require("@wordpress/blocks");
13
11
  var _store = require("../../store");
14
12
  /**
15
13
  * WordPress dependencies
@@ -26,36 +24,6 @@ function KeyboardShortcuts() {
26
24
  const {
27
25
  registerShortcut
28
26
  } = (0, _data.useDispatch)(_keyboardShortcuts.store);
29
- const {
30
- replaceBlocks
31
- } = (0, _data.useDispatch)(_blockEditor.store);
32
- const {
33
- getBlockName,
34
- getSelectedBlockClientId,
35
- getBlockAttributes
36
- } = (0, _data.useSelect)(_blockEditor.store);
37
- const handleTextLevelShortcut = (event, level) => {
38
- event.preventDefault();
39
- const destinationBlockName = level === 0 ? 'core/paragraph' : 'core/heading';
40
- const currentClientId = getSelectedBlockClientId();
41
- if (currentClientId === null) {
42
- return;
43
- }
44
- const blockName = getBlockName(currentClientId);
45
- if (blockName !== 'core/paragraph' && blockName !== 'core/heading') {
46
- return;
47
- }
48
- const attributes = getBlockAttributes(currentClientId);
49
- const textAlign = blockName === 'core/paragraph' ? 'align' : 'textAlign';
50
- const destinationTextAlign = destinationBlockName === 'core/paragraph' ? 'align' : 'textAlign';
51
- replaceBlocks(currentClientId, (0, _blocks.createBlock)(destinationBlockName, {
52
- level,
53
- content: attributes.content,
54
- ...{
55
- [destinationTextAlign]: attributes[textAlign]
56
- }
57
- }));
58
- };
59
27
  (0, _element.useEffect)(() => {
60
28
  registerShortcut({
61
29
  name: 'core/edit-post/toggle-fullscreen',
@@ -66,66 +34,10 @@ function KeyboardShortcuts() {
66
34
  character: 'f'
67
35
  }
68
36
  });
69
- registerShortcut({
70
- name: 'core/edit-post/next-region',
71
- category: 'global',
72
- description: (0, _i18n.__)('Navigate to the next part of the editor.'),
73
- keyCombination: {
74
- modifier: 'ctrl',
75
- character: '`'
76
- },
77
- aliases: [{
78
- modifier: 'access',
79
- character: 'n'
80
- }]
81
- });
82
- registerShortcut({
83
- name: 'core/edit-post/previous-region',
84
- category: 'global',
85
- description: (0, _i18n.__)('Navigate to the previous part of the editor.'),
86
- keyCombination: {
87
- modifier: 'ctrlShift',
88
- character: '`'
89
- },
90
- aliases: [{
91
- modifier: 'access',
92
- character: 'p'
93
- }, {
94
- modifier: 'ctrlShift',
95
- character: '~'
96
- }]
97
- });
98
- registerShortcut({
99
- name: 'core/edit-post/transform-heading-to-paragraph',
100
- category: 'block-library',
101
- description: (0, _i18n.__)('Transform heading to paragraph.'),
102
- keyCombination: {
103
- modifier: 'access',
104
- character: `0`
105
- }
106
- });
107
- [1, 2, 3, 4, 5, 6].forEach(level => {
108
- registerShortcut({
109
- name: `core/edit-post/transform-paragraph-to-heading-${level}`,
110
- category: 'block-library',
111
- description: (0, _i18n.__)('Transform paragraph to heading.'),
112
- keyCombination: {
113
- modifier: 'access',
114
- character: `${level}`
115
- }
116
- });
117
- });
118
37
  }, []);
119
38
  (0, _keyboardShortcuts.useShortcut)('core/edit-post/toggle-fullscreen', () => {
120
39
  toggleFeature('fullscreenMode');
121
40
  });
122
- (0, _keyboardShortcuts.useShortcut)('core/edit-post/transform-heading-to-paragraph', event => handleTextLevelShortcut(event, 0));
123
- [1, 2, 3, 4, 5, 6].forEach(level => {
124
- //the loop is based off on a constant therefore
125
- //the hook will execute the same way every time
126
- //eslint-disable-next-line react-hooks/rules-of-hooks
127
- (0, _keyboardShortcuts.useShortcut)(`core/edit-post/transform-paragraph-to-heading-${level}`, event => handleTextLevelShortcut(event, level));
128
- });
129
41
  return null;
130
42
  }
131
43
  var _default = exports.default = KeyboardShortcuts;
@@ -1 +1 @@
1
- {"version":3,"names":["_element","require","_data","_keyboardShortcuts","_i18n","_blockEditor","_blocks","_store","KeyboardShortcuts","toggleFeature","useDispatch","editPostStore","registerShortcut","keyboardShortcutsStore","replaceBlocks","blockEditorStore","getBlockName","getSelectedBlockClientId","getBlockAttributes","useSelect","handleTextLevelShortcut","event","level","preventDefault","destinationBlockName","currentClientId","blockName","attributes","textAlign","destinationTextAlign","createBlock","content","useEffect","name","category","description","__","keyCombination","modifier","character","aliases","forEach","useShortcut","_default","exports","default"],"sources":["@wordpress/edit-post/src/components/keyboard-shortcuts/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useEffect } from '@wordpress/element';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tuseShortcut,\n\tstore as keyboardShortcutsStore,\n} from '@wordpress/keyboard-shortcuts';\nimport { __ } from '@wordpress/i18n';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { createBlock } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport { store as editPostStore } from '../../store';\n\nfunction KeyboardShortcuts() {\n\tconst { toggleFeature } = useDispatch( editPostStore );\n\tconst { registerShortcut } = useDispatch( keyboardShortcutsStore );\n\tconst { replaceBlocks } = useDispatch( blockEditorStore );\n\tconst { getBlockName, getSelectedBlockClientId, getBlockAttributes } =\n\t\tuseSelect( blockEditorStore );\n\n\tconst handleTextLevelShortcut = ( event, level ) => {\n\t\tevent.preventDefault();\n\t\tconst destinationBlockName =\n\t\t\tlevel === 0 ? 'core/paragraph' : 'core/heading';\n\t\tconst currentClientId = getSelectedBlockClientId();\n\t\tif ( currentClientId === null ) {\n\t\t\treturn;\n\t\t}\n\t\tconst blockName = getBlockName( currentClientId );\n\t\tif ( blockName !== 'core/paragraph' && blockName !== 'core/heading' ) {\n\t\t\treturn;\n\t\t}\n\t\tconst attributes = getBlockAttributes( currentClientId );\n\t\tconst textAlign =\n\t\t\tblockName === 'core/paragraph' ? 'align' : 'textAlign';\n\t\tconst destinationTextAlign =\n\t\t\tdestinationBlockName === 'core/paragraph' ? 'align' : 'textAlign';\n\n\t\treplaceBlocks(\n\t\t\tcurrentClientId,\n\t\t\tcreateBlock( destinationBlockName, {\n\t\t\t\tlevel,\n\t\t\t\tcontent: attributes.content,\n\t\t\t\t...{ [ destinationTextAlign ]: attributes[ textAlign ] },\n\t\t\t} )\n\t\t);\n\t};\n\n\tuseEffect( () => {\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-post/toggle-fullscreen',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Toggle fullscreen mode.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'secondary',\n\t\t\t\tcharacter: 'f',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-post/next-region',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Navigate to the next part of the editor.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'ctrl',\n\t\t\t\tcharacter: '`',\n\t\t\t},\n\t\t\taliases: [\n\t\t\t\t{\n\t\t\t\t\tmodifier: 'access',\n\t\t\t\t\tcharacter: 'n',\n\t\t\t\t},\n\t\t\t],\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-post/previous-region',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Navigate to the previous part of the editor.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'ctrlShift',\n\t\t\t\tcharacter: '`',\n\t\t\t},\n\t\t\taliases: [\n\t\t\t\t{\n\t\t\t\t\tmodifier: 'access',\n\t\t\t\t\tcharacter: 'p',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tmodifier: 'ctrlShift',\n\t\t\t\t\tcharacter: '~',\n\t\t\t\t},\n\t\t\t],\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-post/transform-heading-to-paragraph',\n\t\t\tcategory: 'block-library',\n\t\t\tdescription: __( 'Transform heading to paragraph.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'access',\n\t\t\t\tcharacter: `0`,\n\t\t\t},\n\t\t} );\n\n\t\t[ 1, 2, 3, 4, 5, 6 ].forEach( ( level ) => {\n\t\t\tregisterShortcut( {\n\t\t\t\tname: `core/edit-post/transform-paragraph-to-heading-${ level }`,\n\t\t\t\tcategory: 'block-library',\n\t\t\t\tdescription: __( 'Transform paragraph to heading.' ),\n\t\t\t\tkeyCombination: {\n\t\t\t\t\tmodifier: 'access',\n\t\t\t\t\tcharacter: `${ level }`,\n\t\t\t\t},\n\t\t\t} );\n\t\t} );\n\t}, [] );\n\n\tuseShortcut( 'core/edit-post/toggle-fullscreen', () => {\n\t\ttoggleFeature( 'fullscreenMode' );\n\t} );\n\n\tuseShortcut( 'core/edit-post/transform-heading-to-paragraph', ( event ) =>\n\t\thandleTextLevelShortcut( event, 0 )\n\t);\n\n\t[ 1, 2, 3, 4, 5, 6 ].forEach( ( level ) => {\n\t\t//the loop is based off on a constant therefore\n\t\t//the hook will execute the same way every time\n\t\t//eslint-disable-next-line react-hooks/rules-of-hooks\n\t\tuseShortcut(\n\t\t\t`core/edit-post/transform-paragraph-to-heading-${ level }`,\n\t\t\t( event ) => handleTextLevelShortcut( event, level )\n\t\t);\n\t} );\n\n\treturn null;\n}\n\nexport default KeyboardShortcuts;\n"],"mappings":";;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,kBAAA,GAAAF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AAG;MACb;IACD,CAAE,CAAC;IAEH,CAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAE,CAACE,OAAO,CAAInB,KAAK,IAAM;MAC1CV,gBAAgB,CAAE;QACjBqB,IAAI,EAAG,iDAAiDX,KAAO,EAAC;QAChEY,QAAQ,EAAE,eAAe;QACzBC,WAAW,EAAE,IAAAC,QAAE,EAAE,iCAAkC,CAAC;QACpDC,cAAc,EAAE;UACfC,QAAQ,EAAE,QAAQ;UAClBC,SAAS,EAAG,GAAGjB,KAAO;QACvB;MACD,CAAE,CAAC;IACJ,CAAE,CAAC;EACJ,CAAC,EAAE,EAAG,CAAC;EAEP,IAAAoB,8BAAW,EAAE,kCAAkC,EAAE,MAAM;IACtDjC,aAAa,CAAE,gBAAiB,CAAC;EAClC,CAAE,CAAC;EAEH,IAAAiC,8BAAW,EAAE,+CAA+C,EAAIrB,KAAK,IACpED,uBAAuB,CAAEC,KAAK,EAAE,CAAE,CACnC,CAAC;EAED,CAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAE,CAACoB,OAAO,CAAInB,KAAK,IAAM;IAC1C;IACA;IACA;IACA,IAAAoB,8BAAW,EACT,iDAAiDpB,KAAO,EAAC,EACxDD,KAAK,IAAMD,uBAAuB,CAAEC,KAAK,EAAEC,KAAM,CACpD,CAAC;EACF,CAAE,CAAC;EAEH,OAAO,IAAI;AACZ;AAAC,IAAAqB,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEcrC,iBAAiB","ignoreList":[]}
1
+ {"version":3,"names":["_element","require","_data","_keyboardShortcuts","_i18n","_store","KeyboardShortcuts","toggleFeature","useDispatch","editPostStore","registerShortcut","keyboardShortcutsStore","useEffect","name","category","description","__","keyCombination","modifier","character","useShortcut","_default","exports","default"],"sources":["@wordpress/edit-post/src/components/keyboard-shortcuts/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useEffect } from '@wordpress/element';\nimport { useDispatch } from '@wordpress/data';\nimport {\n\tuseShortcut,\n\tstore as keyboardShortcutsStore,\n} from '@wordpress/keyboard-shortcuts';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { store as editPostStore } from '../../store';\n\nfunction KeyboardShortcuts() {\n\tconst { toggleFeature } = useDispatch( editPostStore );\n\tconst { registerShortcut } = useDispatch( keyboardShortcutsStore );\n\n\tuseEffect( () => {\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-post/toggle-fullscreen',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Toggle fullscreen mode.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'secondary',\n\t\t\t\tcharacter: 'f',\n\t\t\t},\n\t\t} );\n\t}, [] );\n\n\tuseShortcut( 'core/edit-post/toggle-fullscreen', () => {\n\t\ttoggleFeature( 'fullscreenMode' );\n\t} );\n\n\treturn null;\n}\n\nexport default KeyboardShortcuts;\n"],"mappings":";;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,kBAAA,GAAAF,OAAA;AAIA,IAAAG,KAAA,GAAAH,OAAA;AAKA,IAAAI,MAAA,GAAAJ,OAAA;AAdA;AACA;AACA;;AASA;AACA;AACA;;AAGA,SAASK,iBAAiBA,CAAA,EAAG;EAC5B,MAAM;IAAEC;EAAc,CAAC,GAAG,IAAAC,iBAAW,EAAEC,YAAc,CAAC;EACtD,MAAM;IAAEC;EAAiB,CAAC,GAAG,IAAAF,iBAAW,EAAEG,wBAAuB,CAAC;EAElE,IAAAC,kBAAS,EAAE,MAAM;IAChBF,gBAAgB,CAAE;MACjBG,IAAI,EAAE,kCAAkC;MACxCC,QAAQ,EAAE,QAAQ;MAClBC,WAAW,EAAE,IAAAC,QAAE,EAAE,yBAA0B,CAAC;MAC5CC,cAAc,EAAE;QACfC,QAAQ,EAAE,WAAW;QACrBC,SAAS,EAAE;MACZ;IACD,CAAE,CAAC;EACJ,CAAC,EAAE,EAAG,CAAC;EAEP,IAAAC,8BAAW,EAAE,kCAAkC,EAAE,MAAM;IACtDb,aAAa,CAAE,gBAAiB,CAAC;EAClC,CAAE,CAAC;EAEH,OAAO,IAAI;AACZ;AAAC,IAAAc,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEcjB,iBAAiB","ignoreList":[]}
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.default = void 0;
8
8
  var _react = require("react");
9
- var _classnames = _interopRequireDefault(require("classnames"));
9
+ var _clsx = _interopRequireDefault(require("clsx"));
10
10
  var _editor = require("@wordpress/editor");
11
11
  var _data = require("@wordpress/data");
12
12
  var _blockEditor = require("@wordpress/block-editor");
@@ -20,17 +20,16 @@ var _notices = require("@wordpress/notices");
20
20
  var _preferences = require("@wordpress/preferences");
21
21
  var _commands = require("@wordpress/commands");
22
22
  var _coreCommands = require("@wordpress/core-commands");
23
+ var _blockLibrary = require("@wordpress/block-library");
24
+ var _url = require("@wordpress/url");
23
25
  var _textEditor = _interopRequireDefault(require("../text-editor"));
24
26
  var _visualEditor = _interopRequireDefault(require("../visual-editor"));
25
27
  var _keyboardShortcuts2 = _interopRequireDefault(require("../keyboard-shortcuts"));
26
- var _preferencesModal = _interopRequireDefault(require("../preferences-modal"));
27
28
  var _initPatternModal = _interopRequireDefault(require("../init-pattern-modal"));
28
29
  var _browserUrl = _interopRequireDefault(require("../browser-url"));
29
30
  var _header = _interopRequireDefault(require("../header"));
30
- var _settingsSidebar = _interopRequireDefault(require("../sidebar/settings-sidebar"));
31
31
  var _metaBoxes = _interopRequireDefault(require("../meta-boxes"));
32
32
  var _welcomeGuide = _interopRequireDefault(require("../welcome-guide"));
33
- var _actionsPanel = _interopRequireDefault(require("./actions-panel"));
34
33
  var _store = require("../../store");
35
34
  var _lockUnlock = require("../../lock-unlock");
36
35
  var _useCommonCommands = _interopRequireDefault(require("../../hooks/commands/use-common-commands"));
@@ -60,9 +59,14 @@ const {
60
59
  ListViewSidebar,
61
60
  ComplementaryArea,
62
61
  FullscreenMode,
62
+ SavePublishPanels,
63
63
  InterfaceSkeleton,
64
- interfaceStore
64
+ interfaceStore,
65
+ Sidebar
65
66
  } = (0, _lockUnlock.unlock)(_editor.privateApis);
67
+ const {
68
+ BlockKeyboardShortcuts
69
+ } = (0, _lockUnlock.unlock)(_blockLibrary.privateApis);
66
70
  const interfaceLabels = {
67
71
  /* translators: accessibility text for the editor top bar landmark region. */
68
72
  header: (0, _i18n.__)('Editor top bar'),
@@ -115,7 +119,6 @@ function Layout({
115
119
  useCommands();
116
120
  (0, _useCommonCommands.default)();
117
121
  const isMobileViewport = (0, _compose.useViewportMatch)('medium', '<');
118
- const isHugeViewport = (0, _compose.useViewportMatch)('huge', '>=');
119
122
  const isWideViewport = (0, _compose.useViewportMatch)('large');
120
123
  const isLargeViewport = (0, _compose.useViewportMatch)('medium');
121
124
  const {
@@ -124,9 +127,6 @@ function Layout({
124
127
  const {
125
128
  createErrorNotice
126
129
  } = (0, _data.useDispatch)(_notices.store);
127
- const {
128
- setIsInserterOpened
129
- } = (0, _data.useDispatch)(_editor.store);
130
130
  const {
131
131
  mode,
132
132
  isFullscreenActive,
@@ -143,7 +143,10 @@ function Layout({
143
143
  showBlockBreadcrumbs,
144
144
  showMetaBoxes,
145
145
  documentLabel,
146
- hasHistory
146
+ hasHistory,
147
+ hasBlockBreadcrumbs,
148
+ blockEditorMode,
149
+ isEditingTemplate
147
150
  } = (0, _data.useSelect)(select => {
148
151
  const {
149
152
  get
@@ -163,15 +166,18 @@ function Layout({
163
166
  mode: select(_editor.store).getEditorMode(),
164
167
  isRichEditingEnabled: editorSettings.richEditingEnabled,
165
168
  hasActiveMetaboxes: select(_store.store).hasMetaBoxes(),
166
- previousShortcut: select(_keyboardShortcuts.store).getAllShortcutKeyCombinations('core/edit-post/previous-region'),
167
- nextShortcut: select(_keyboardShortcuts.store).getAllShortcutKeyCombinations('core/edit-post/next-region'),
169
+ previousShortcut: select(_keyboardShortcuts.store).getAllShortcutKeyCombinations('core/editor/previous-region'),
170
+ nextShortcut: select(_keyboardShortcuts.store).getAllShortcutKeyCombinations('core/editor/next-region'),
168
171
  showIconLabels: get('core', 'showIconLabels'),
169
172
  isDistractionFree: get('core', 'distractionFree'),
170
173
  showBlockBreadcrumbs: get('core', 'showBlockBreadcrumbs'),
171
174
  // translators: Default label for the Document in the Block Breadcrumb.
172
175
  documentLabel: postTypeLabel || (0, _i18n._x)('Document', 'noun'),
173
176
  hasBlockSelected: !!select(_blockEditor.store).getBlockSelectionStart(),
174
- hasHistory: !!getEditorSettings().onNavigateToPreviousEntityRecord
177
+ hasHistory: !!getEditorSettings().onNavigateToPreviousEntityRecord,
178
+ hasBlockBreadcrumbs: get('core', 'showBlockBreadcrumbs'),
179
+ blockEditorMode: select(_blockEditor.store).__unstableGetEditorMode(),
180
+ isEditingTemplate: select(_editor.store).getCurrentPostType() === 'wp_template'
175
181
  };
176
182
  }, []);
177
183
 
@@ -180,18 +186,6 @@ function Layout({
180
186
  useCommandContext(commandContext);
181
187
  const styles = useEditorStyles();
182
188
 
183
- // Inserter and Sidebars are mutually exclusive
184
- (0, _element.useEffect)(() => {
185
- if (sidebarIsOpened && !isHugeViewport) {
186
- setIsInserterOpened(false);
187
- }
188
- }, [isHugeViewport, setIsInserterOpened, sidebarIsOpened]);
189
- (0, _element.useEffect)(() => {
190
- if (isInserterOpened && !isHugeViewport) {
191
- closeGeneralSidebar();
192
- }
193
- }, [closeGeneralSidebar, isInserterOpened, isHugeViewport]);
194
-
195
189
  // Local state for save panel.
196
190
  // Note 'truthy' callback implies an open panel.
197
191
  const [entitiesSavedStatesCallback, setEntitiesSavedStatesCallback] = (0, _element.useState)(false);
@@ -208,11 +202,12 @@ function Layout({
208
202
  } else {
209
203
  document.body.classList.remove('show-icon-labels');
210
204
  }
211
- const className = (0, _classnames.default)('edit-post-layout', 'is-mode-' + mode, {
205
+ const className = (0, _clsx.default)('edit-post-layout', 'is-mode-' + mode, {
212
206
  'is-sidebar-opened': sidebarIsOpened,
213
207
  'has-metaboxes': hasActiveMetaboxes,
214
208
  'is-distraction-free': isDistractionFree && isWideViewport,
215
- 'is-entity-save-view-open': !!entitiesSavedStatesCallback
209
+ 'is-entity-save-view-open': !!entitiesSavedStatesCallback,
210
+ 'has-block-breadcrumbs': hasBlockBreadcrumbs && !isDistractionFree && isWideViewport
216
211
  });
217
212
  const secondarySidebarLabel = isListViewOpened ? (0, _i18n.__)('Document Overview') : (0, _i18n.__)('Block Library');
218
213
  const secondarySidebar = () => {
@@ -231,11 +226,49 @@ function Layout({
231
226
  createErrorNotice((0, _i18n.sprintf)( /* translators: %s: plugin name */
232
227
  (0, _i18n.__)('The "%s" plugin has encountered an error and cannot be rendered.'), name));
233
228
  }
229
+ const {
230
+ createSuccessNotice
231
+ } = (0, _data.useDispatch)(_notices.store);
232
+ const onActionPerformed = (0, _element.useCallback)((actionId, items) => {
233
+ switch (actionId) {
234
+ case 'move-to-trash':
235
+ {
236
+ document.location.href = (0, _url.addQueryArgs)('edit.php', {
237
+ trashed: 1,
238
+ post_type: items[0].type,
239
+ ids: items[0].id
240
+ });
241
+ }
242
+ break;
243
+ case 'duplicate-post':
244
+ {
245
+ const newItem = items[0];
246
+ const title = typeof newItem.title === 'string' ? newItem.title : newItem.title?.rendered;
247
+ createSuccessNotice((0, _i18n.sprintf)(
248
+ // translators: %s: Title of the created post e.g: "Post 1".
249
+ (0, _i18n.__)('"%s" successfully created.'), title), {
250
+ type: 'snackbar',
251
+ id: 'duplicate-post-action',
252
+ actions: [{
253
+ label: (0, _i18n.__)('Edit'),
254
+ onClick: () => {
255
+ const postId = newItem.id;
256
+ document.location.href = (0, _url.addQueryArgs)('post.php', {
257
+ post: postId,
258
+ action: 'edit'
259
+ });
260
+ }
261
+ }]
262
+ });
263
+ }
264
+ break;
265
+ }
266
+ }, [createSuccessNotice]);
234
267
  return (0, _react.createElement)(_react.Fragment, null, (0, _react.createElement)(FullscreenMode, {
235
268
  isActive: isFullscreenActive
236
269
  }), (0, _react.createElement)(_browserUrl.default, {
237
270
  hasHistory: hasHistory
238
- }), (0, _react.createElement)(_editor.UnsavedChangesWarning, null), (0, _react.createElement)(_editor.AutosaveMonitor, null), (0, _react.createElement)(_editor.LocalAutosaveMonitor, null), (0, _react.createElement)(_keyboardShortcuts2.default, null), (0, _react.createElement)(_editor.EditorKeyboardShortcutsRegister, null), (0, _react.createElement)(_editor.EditorKeyboardShortcuts, null), (0, _react.createElement)(InterfaceSkeleton, {
271
+ }), (0, _react.createElement)(_editor.UnsavedChangesWarning, null), (0, _react.createElement)(_editor.AutosaveMonitor, null), (0, _react.createElement)(_editor.LocalAutosaveMonitor, null), (0, _react.createElement)(_keyboardShortcuts2.default, null), (0, _react.createElement)(_editor.EditorKeyboardShortcutsRegister, null), (0, _react.createElement)(_editor.EditorKeyboardShortcuts, null), (0, _react.createElement)(BlockKeyboardShortcuts, null), (0, _react.createElement)(InterfaceSkeleton, {
239
272
  isDistractionFree: isDistractionFree && isWideViewport,
240
273
  className: className,
241
274
  labels: {
@@ -263,23 +296,29 @@ function Layout({
263
296
  }), (0, _react.createElement)(_metaBoxes.default, {
264
297
  location: "advanced"
265
298
  })), isMobileViewport && sidebarIsOpened && (0, _react.createElement)(_components.ScrollLock, null)),
266
- footer: !isDistractionFree && !isMobileViewport && showBlockBreadcrumbs && isRichEditingEnabled && mode === 'visual' && (0, _react.createElement)("div", {
299
+ footer: !isDistractionFree && !isMobileViewport && showBlockBreadcrumbs && isRichEditingEnabled && blockEditorMode !== 'zoom-out' && mode === 'visual' && (0, _react.createElement)("div", {
267
300
  className: "edit-post-layout__footer"
268
301
  }, (0, _react.createElement)(_blockEditor.BlockBreadcrumb, {
269
302
  rootLabelText: documentLabel
270
303
  })),
271
- actions: (0, _react.createElement)(_actionsPanel.default, {
304
+ actions: (0, _react.createElement)(SavePublishPanels, {
272
305
  closeEntitiesSavedStates: closeEntitiesSavedStates,
273
306
  isEntitiesSavedStatesOpen: entitiesSavedStatesCallback,
274
- setEntitiesSavedStatesCallback: setEntitiesSavedStatesCallback
307
+ setEntitiesSavedStatesCallback: setEntitiesSavedStatesCallback,
308
+ forceIsDirtyPublishPanel: hasActiveMetaboxes
275
309
  }),
276
310
  shortcuts: {
277
311
  previous: previousShortcut,
278
312
  next: nextShortcut
279
313
  }
280
- }), (0, _react.createElement)(_preferencesModal.default, null), (0, _react.createElement)(_welcomeGuide.default, null), (0, _react.createElement)(_initPatternModal.default, null), (0, _react.createElement)(_plugins.PluginArea, {
314
+ }), (0, _react.createElement)(_welcomeGuide.default, null), (0, _react.createElement)(_initPatternModal.default, null), (0, _react.createElement)(_plugins.PluginArea, {
281
315
  onError: onPluginAreaError
282
- }), !isDistractionFree && (0, _react.createElement)(_settingsSidebar.default, null));
316
+ }), !isDistractionFree && (0, _react.createElement)(Sidebar, {
317
+ onActionPerformed: onActionPerformed,
318
+ extraPanels: !isEditingTemplate && (0, _react.createElement)(_metaBoxes.default, {
319
+ location: "side"
320
+ })
321
+ }));
283
322
  }
284
323
  var _default = exports.default = Layout;
285
324
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_classnames","_interopRequireDefault","require","_editor","_data","_blockEditor","_components","_compose","_plugins","_i18n","_element","_keyboardShortcuts","_notices","_preferences","_commands","_coreCommands","_textEditor","_visualEditor","_keyboardShortcuts2","_preferencesModal","_initPatternModal","_browserUrl","_header","_settingsSidebar","_metaBoxes","_welcomeGuide","_actionsPanel","_store","_lockUnlock","_useCommonCommands","getLayoutStyles","unlock","blockEditorPrivateApis","useCommands","coreCommandsPrivateApis","useCommandContext","commandsPrivateApis","InserterSidebar","ListViewSidebar","ComplementaryArea","FullscreenMode","InterfaceSkeleton","interfaceStore","editorPrivateApis","interfaceLabels","header","__","body","sidebar","actions","footer","useEditorStyles","hasThemeStyleSupport","editorSettings","useSelect","select","editPostStore","isFeatureActive","editorStore","getEditorSettings","useMemo","_editorSettings$style","_editorSettings$style2","presetStyles","styles","filter","style","__unstableType","defaultEditorStyles","hasThemeStyles","length","disableLayoutStyles","push","css","selector","hasBlockGapSupport","hasFallbackGapSupport","fallbackGapValue","Layout","initialPost","useCommonCommands","isMobileViewport","useViewportMatch","isHugeViewport","isWideViewport","isLargeViewport","closeGeneralSidebar","useDispatch","createErrorNotice","noticesStore","setIsInserterOpened","mode","isFullscreenActive","isRichEditingEnabled","sidebarIsOpened","hasActiveMetaboxes","previousShortcut","nextShortcut","hasBlockSelected","isInserterOpened","isListViewOpened","showIconLabels","isDistractionFree","showBlockBreadcrumbs","showMetaBoxes","documentLabel","hasHistory","get","preferencesStore","getPostTypeLabel","postTypeLabel","getRenderingMode","getActiveComplementaryArea","isPublishSidebarOpened","getEditorMode","richEditingEnabled","hasMetaBoxes","keyboardShortcutsStore","getAllShortcutKeyCombinations","_x","blockEditorStore","getBlockSelectionStart","onNavigateToPreviousEntityRecord","commandContext","useEffect","entitiesSavedStatesCallback","setEntitiesSavedStatesCallback","useState","closeEntitiesSavedStates","useCallback","arg","document","classList","add","remove","className","classnames","secondarySidebarLabel","secondarySidebar","_react","createElement","isRightSidebarOpen","onPluginAreaError","name","sprintf","Fragment","isActive","default","UnsavedChangesWarning","AutosaveMonitor","LocalAutosaveMonitor","EditorKeyboardShortcutsRegister","EditorKeyboardShortcuts","labels","editorNotices","EditorNotices","Slot","scope","notices","EditorSnackbars","content","BlockToolbar","hideDragHandle","location","ScrollLock","BlockBreadcrumb","rootLabelText","isEntitiesSavedStatesOpen","shortcuts","previous","next","PluginArea","onError","_default","exports"],"sources":["@wordpress/edit-post/src/components/layout/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tAutosaveMonitor,\n\tLocalAutosaveMonitor,\n\tUnsavedChangesWarning,\n\tEditorNotices,\n\tEditorKeyboardShortcutsRegister,\n\tEditorKeyboardShortcuts,\n\tEditorSnackbars,\n\tstore as editorStore,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tBlockBreadcrumb,\n\tBlockToolbar,\n\tprivateApis as blockEditorPrivateApis,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { ScrollLock } from '@wordpress/components';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { PluginArea } from '@wordpress/plugins';\nimport { __, _x, sprintf } from '@wordpress/i18n';\nimport { useState, useEffect, useCallback, useMemo } from '@wordpress/element';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { privateApis as commandsPrivateApis } from '@wordpress/commands';\nimport { privateApis as coreCommandsPrivateApis } from '@wordpress/core-commands';\n\n/**\n * Internal dependencies\n */\nimport TextEditor from '../text-editor';\nimport VisualEditor from '../visual-editor';\nimport EditPostKeyboardShortcuts from '../keyboard-shortcuts';\nimport EditPostPreferencesModal from '../preferences-modal';\nimport InitPatternModal from '../init-pattern-modal';\nimport BrowserURL from '../browser-url';\nimport Header from '../header';\nimport SettingsSidebar from '../sidebar/settings-sidebar';\nimport MetaBoxes from '../meta-boxes';\nimport WelcomeGuide from '../welcome-guide';\nimport ActionsPanel from './actions-panel';\nimport { store as editPostStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\nimport useCommonCommands from '../../hooks/commands/use-common-commands';\n\nconst { getLayoutStyles } = unlock( blockEditorPrivateApis );\nconst { useCommands } = unlock( coreCommandsPrivateApis );\nconst { useCommandContext } = unlock( commandsPrivateApis );\nconst {\n\tInserterSidebar,\n\tListViewSidebar,\n\tComplementaryArea,\n\tFullscreenMode,\n\tInterfaceSkeleton,\n\tinterfaceStore,\n} = unlock( editorPrivateApis );\n\nconst interfaceLabels = {\n\t/* translators: accessibility text for the editor top bar landmark region. */\n\theader: __( 'Editor top bar' ),\n\t/* translators: accessibility text for the editor content landmark region. */\n\tbody: __( 'Editor content' ),\n\t/* translators: accessibility text for the editor settings landmark region. */\n\tsidebar: __( 'Editor settings' ),\n\t/* translators: accessibility text for the editor publish landmark region. */\n\tactions: __( 'Editor publish' ),\n\t/* translators: accessibility text for the editor footer landmark region. */\n\tfooter: __( 'Editor footer' ),\n};\n\nfunction useEditorStyles() {\n\tconst { hasThemeStyleSupport, editorSettings } = useSelect(\n\t\t( select ) => ( {\n\t\t\thasThemeStyleSupport:\n\t\t\t\tselect( editPostStore ).isFeatureActive( 'themeStyles' ),\n\t\t\teditorSettings: select( editorStore ).getEditorSettings(),\n\t\t} ),\n\t\t[]\n\t);\n\n\t// Compute the default styles.\n\treturn useMemo( () => {\n\t\tconst presetStyles =\n\t\t\teditorSettings.styles?.filter(\n\t\t\t\t( style ) =>\n\t\t\t\t\tstyle.__unstableType && style.__unstableType !== 'theme'\n\t\t\t) ?? [];\n\n\t\tconst defaultEditorStyles = [\n\t\t\t...editorSettings.defaultEditorStyles,\n\t\t\t...presetStyles,\n\t\t];\n\n\t\t// Has theme styles if the theme supports them and if some styles were not preset styles (in which case they're theme styles).\n\t\tconst hasThemeStyles =\n\t\t\thasThemeStyleSupport &&\n\t\t\tpresetStyles.length !== ( editorSettings.styles?.length ?? 0 );\n\n\t\t// If theme styles are not present or displayed, ensure that\n\t\t// base layout styles are still present in the editor.\n\t\tif ( ! editorSettings.disableLayoutStyles && ! hasThemeStyles ) {\n\t\t\tdefaultEditorStyles.push( {\n\t\t\t\tcss: getLayoutStyles( {\n\t\t\t\t\tstyle: {},\n\t\t\t\t\tselector: 'body',\n\t\t\t\t\thasBlockGapSupport: false,\n\t\t\t\t\thasFallbackGapSupport: true,\n\t\t\t\t\tfallbackGapValue: '0.5em',\n\t\t\t\t} ),\n\t\t\t} );\n\t\t}\n\n\t\treturn hasThemeStyles ? editorSettings.styles : defaultEditorStyles;\n\t}, [\n\t\teditorSettings.defaultEditorStyles,\n\t\teditorSettings.disableLayoutStyles,\n\t\teditorSettings.styles,\n\t\thasThemeStyleSupport,\n\t] );\n}\n\nfunction Layout( { initialPost } ) {\n\tuseCommands();\n\tuseCommonCommands();\n\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\tconst isHugeViewport = useViewportMatch( 'huge', '>=' );\n\tconst isWideViewport = useViewportMatch( 'large' );\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\n\tconst { closeGeneralSidebar } = useDispatch( editPostStore );\n\tconst { createErrorNotice } = useDispatch( noticesStore );\n\tconst { setIsInserterOpened } = useDispatch( editorStore );\n\tconst {\n\t\tmode,\n\t\tisFullscreenActive,\n\t\tisRichEditingEnabled,\n\t\tsidebarIsOpened,\n\t\thasActiveMetaboxes,\n\t\tpreviousShortcut,\n\t\tnextShortcut,\n\t\thasBlockSelected,\n\t\tisInserterOpened,\n\t\tisListViewOpened,\n\t\tshowIconLabels,\n\t\tisDistractionFree,\n\t\tshowBlockBreadcrumbs,\n\t\tshowMetaBoxes,\n\t\tdocumentLabel,\n\t\thasHistory,\n\t} = useSelect( ( select ) => {\n\t\tconst { get } = select( preferencesStore );\n\t\tconst { getEditorSettings, getPostTypeLabel } = select( editorStore );\n\t\tconst editorSettings = getEditorSettings();\n\t\tconst postTypeLabel = getPostTypeLabel();\n\n\t\treturn {\n\t\t\tshowMetaBoxes:\n\t\t\t\tselect( editorStore ).getRenderingMode() === 'post-only',\n\t\t\tsidebarIsOpened: !! (\n\t\t\t\tselect( interfaceStore ).getActiveComplementaryArea( 'core' ) ||\n\t\t\t\tselect( editorStore ).isPublishSidebarOpened()\n\t\t\t),\n\t\t\tisFullscreenActive:\n\t\t\t\tselect( editPostStore ).isFeatureActive( 'fullscreenMode' ),\n\t\t\tisInserterOpened: select( editorStore ).isInserterOpened(),\n\t\t\tisListViewOpened: select( editorStore ).isListViewOpened(),\n\t\t\tmode: select( editorStore ).getEditorMode(),\n\t\t\tisRichEditingEnabled: editorSettings.richEditingEnabled,\n\t\t\thasActiveMetaboxes: select( editPostStore ).hasMetaBoxes(),\n\t\t\tpreviousShortcut: select(\n\t\t\t\tkeyboardShortcutsStore\n\t\t\t).getAllShortcutKeyCombinations( 'core/edit-post/previous-region' ),\n\t\t\tnextShortcut: select(\n\t\t\t\tkeyboardShortcutsStore\n\t\t\t).getAllShortcutKeyCombinations( 'core/edit-post/next-region' ),\n\t\t\tshowIconLabels: get( 'core', 'showIconLabels' ),\n\t\t\tisDistractionFree: get( 'core', 'distractionFree' ),\n\t\t\tshowBlockBreadcrumbs: get( 'core', 'showBlockBreadcrumbs' ),\n\t\t\t// translators: Default label for the Document in the Block Breadcrumb.\n\t\t\tdocumentLabel: postTypeLabel || _x( 'Document', 'noun' ),\n\t\t\thasBlockSelected:\n\t\t\t\t!! select( blockEditorStore ).getBlockSelectionStart(),\n\t\t\thasHistory: !! getEditorSettings().onNavigateToPreviousEntityRecord,\n\t\t};\n\t}, [] );\n\n\t// Set the right context for the command palette\n\tconst commandContext = hasBlockSelected\n\t\t? 'block-selection-edit'\n\t\t: 'post-editor-edit';\n\tuseCommandContext( commandContext );\n\n\tconst styles = useEditorStyles();\n\n\t// Inserter and Sidebars are mutually exclusive\n\tuseEffect( () => {\n\t\tif ( sidebarIsOpened && ! isHugeViewport ) {\n\t\t\tsetIsInserterOpened( false );\n\t\t}\n\t}, [ isHugeViewport, setIsInserterOpened, sidebarIsOpened ] );\n\tuseEffect( () => {\n\t\tif ( isInserterOpened && ! isHugeViewport ) {\n\t\t\tcloseGeneralSidebar();\n\t\t}\n\t}, [ closeGeneralSidebar, isInserterOpened, isHugeViewport ] );\n\n\t// Local state for save panel.\n\t// Note 'truthy' callback implies an open panel.\n\tconst [ entitiesSavedStatesCallback, setEntitiesSavedStatesCallback ] =\n\t\tuseState( false );\n\n\tconst closeEntitiesSavedStates = useCallback(\n\t\t( arg ) => {\n\t\t\tif ( typeof entitiesSavedStatesCallback === 'function' ) {\n\t\t\t\tentitiesSavedStatesCallback( arg );\n\t\t\t}\n\t\t\tsetEntitiesSavedStatesCallback( false );\n\t\t},\n\t\t[ entitiesSavedStatesCallback ]\n\t);\n\n\t// We need to add the show-icon-labels class to the body element so it is applied to modals.\n\tif ( showIconLabels ) {\n\t\tdocument.body.classList.add( 'show-icon-labels' );\n\t} else {\n\t\tdocument.body.classList.remove( 'show-icon-labels' );\n\t}\n\n\tconst className = classnames( 'edit-post-layout', 'is-mode-' + mode, {\n\t\t'is-sidebar-opened': sidebarIsOpened,\n\t\t'has-metaboxes': hasActiveMetaboxes,\n\t\t'is-distraction-free': isDistractionFree && isWideViewport,\n\t\t'is-entity-save-view-open': !! entitiesSavedStatesCallback,\n\t} );\n\n\tconst secondarySidebarLabel = isListViewOpened\n\t\t? __( 'Document Overview' )\n\t\t: __( 'Block Library' );\n\n\tconst secondarySidebar = () => {\n\t\tif ( mode === 'visual' && isInserterOpened ) {\n\t\t\treturn (\n\t\t\t\t<InserterSidebar\n\t\t\t\t\tcloseGeneralSidebar={ closeGeneralSidebar }\n\t\t\t\t\tisRightSidebarOpen={ sidebarIsOpened }\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\t\tif ( mode === 'visual' && isListViewOpened ) {\n\t\t\treturn <ListViewSidebar />;\n\t\t}\n\n\t\treturn null;\n\t};\n\n\tfunction onPluginAreaError( name ) {\n\t\tcreateErrorNotice(\n\t\t\tsprintf(\n\t\t\t\t/* translators: %s: plugin name */\n\t\t\t\t__(\n\t\t\t\t\t'The \"%s\" plugin has encountered an error and cannot be rendered.'\n\t\t\t\t),\n\t\t\t\tname\n\t\t\t)\n\t\t);\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<FullscreenMode isActive={ isFullscreenActive } />\n\t\t\t<BrowserURL hasHistory={ hasHistory } />\n\t\t\t<UnsavedChangesWarning />\n\t\t\t<AutosaveMonitor />\n\t\t\t<LocalAutosaveMonitor />\n\t\t\t<EditPostKeyboardShortcuts />\n\t\t\t<EditorKeyboardShortcutsRegister />\n\t\t\t<EditorKeyboardShortcuts />\n\n\t\t\t<InterfaceSkeleton\n\t\t\t\tisDistractionFree={ isDistractionFree && isWideViewport }\n\t\t\t\tclassName={ className }\n\t\t\t\tlabels={ {\n\t\t\t\t\t...interfaceLabels,\n\t\t\t\t\tsecondarySidebar: secondarySidebarLabel,\n\t\t\t\t} }\n\t\t\t\theader={\n\t\t\t\t\t<Header\n\t\t\t\t\t\tsetEntitiesSavedStatesCallback={\n\t\t\t\t\t\t\tsetEntitiesSavedStatesCallback\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinitialPost={ initialPost }\n\t\t\t\t\t/>\n\t\t\t\t}\n\t\t\t\teditorNotices={ <EditorNotices /> }\n\t\t\t\tsecondarySidebar={ secondarySidebar() }\n\t\t\t\tsidebar={\n\t\t\t\t\t! isDistractionFree && (\n\t\t\t\t\t\t<ComplementaryArea.Slot scope=\"core\" />\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t\tnotices={ <EditorSnackbars /> }\n\t\t\t\tcontent={\n\t\t\t\t\t<>\n\t\t\t\t\t\t{ ! isDistractionFree && <EditorNotices /> }\n\t\t\t\t\t\t{ ( mode === 'text' || ! isRichEditingEnabled ) && (\n\t\t\t\t\t\t\t<TextEditor />\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ ! isLargeViewport && <BlockToolbar hideDragHandle /> }\n\t\t\t\t\t\t{ isRichEditingEnabled && mode === 'visual' && (\n\t\t\t\t\t\t\t<VisualEditor styles={ styles } />\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ ! isDistractionFree && showMetaBoxes && (\n\t\t\t\t\t\t\t<div className=\"edit-post-layout__metaboxes\">\n\t\t\t\t\t\t\t\t<MetaBoxes location=\"normal\" />\n\t\t\t\t\t\t\t\t<MetaBoxes location=\"advanced\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ isMobileViewport && sidebarIsOpened && (\n\t\t\t\t\t\t\t<ScrollLock />\n\t\t\t\t\t\t) }\n\t\t\t\t\t</>\n\t\t\t\t}\n\t\t\t\tfooter={\n\t\t\t\t\t! isDistractionFree &&\n\t\t\t\t\t! isMobileViewport &&\n\t\t\t\t\tshowBlockBreadcrumbs &&\n\t\t\t\t\tisRichEditingEnabled &&\n\t\t\t\t\tmode === 'visual' && (\n\t\t\t\t\t\t<div className=\"edit-post-layout__footer\">\n\t\t\t\t\t\t\t<BlockBreadcrumb rootLabelText={ documentLabel } />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t\tactions={\n\t\t\t\t\t<ActionsPanel\n\t\t\t\t\t\tcloseEntitiesSavedStates={ closeEntitiesSavedStates }\n\t\t\t\t\t\tisEntitiesSavedStatesOpen={\n\t\t\t\t\t\t\tentitiesSavedStatesCallback\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsetEntitiesSavedStatesCallback={\n\t\t\t\t\t\t\tsetEntitiesSavedStatesCallback\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t}\n\t\t\t\tshortcuts={ {\n\t\t\t\t\tprevious: previousShortcut,\n\t\t\t\t\tnext: nextShortcut,\n\t\t\t\t} }\n\t\t\t/>\n\t\t\t<EditPostPreferencesModal />\n\t\t\t<WelcomeGuide />\n\t\t\t<InitPatternModal />\n\t\t\t<PluginArea onError={ onPluginAreaError } />\n\t\t\t{ ! isDistractionFree && <SettingsSidebar /> }\n\t\t</>\n\t);\n}\n\nexport default Layout;\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,OAAA,GAAAD,OAAA;AAWA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AAMA,IAAAI,WAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,QAAA,GAAAN,OAAA;AACA,IAAAO,KAAA,GAAAP,OAAA;AACA,IAAAQ,QAAA,GAAAR,OAAA;AACA,IAA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A0B,GACxC,IAAAI,MAAA,CAAAC,aAAA,EAACvI,YAAA,CAAAgK,eAAe;MAACC,aAAa,EAAG7D;IAAe,CAAE,CAC9C,CAEN;IACDxD,OAAO,EACN,IAAA0F,MAAA,CAAAC,aAAA,EAAClH,aAAA,CAAAyH,OAAY;MACZnB,wBAAwB,EAAGA,wBAA0B;MACrDuC,yBAAyB,EACxB1C,2BACA;MACDC,8BAA8B,EAC7BA;IACA,CACD,CACD;IACD0C,SAAS,EAAG;MACXC,QAAQ,EAAEzE,gBAAgB;MAC1B0E,IAAI,EAAEzE;IACP;EAAG,CACH,CAAC,EACF,IAAA0C,MAAA,CAAAC,aAAA,EAACzH,iBAAA,CAAAgI,OAAwB,MAAE,CAAC,EAC5B,IAAAR,MAAA,CAAAC,aAAA,EAACnH,aAAA,CAAA0H,OAAY,MAAE,CAAC,EAChB,IAAAR,MAAA,CAAAC,aAAA,EAACxH,iBAAA,CAAA+H,OAAgB,MAAE,CAAC,EACpB,IAAAR,MAAA,CAAAC,aAAA,EAACpI,QAAA,CAAAmK,UAAU;IAACC,OAAO,EAAG9B;EAAmB,CAAE,CAAC,EAC1C,CAAExC,iBAAiB,IAAI,IAAAqC,MAAA,CAAAC,aAAA,EAACrH,gBAAA,CAAA4H,OAAe,MAAE,CAC1C,CAAC;AAEL;AAAC,IAAA0B,QAAA,GAAAC,OAAA,CAAA3B,OAAA,GAEcrE,MAAM","ignoreList":[]}
1
+ {"version":3,"names":["_clsx","_interopRequireDefault","require","_editor","_data","_blockEditor","_components","_compose","_plugins","_i18n","_element","_keyboardShortcuts","_notices","_preferences","_commands","_coreCommands","_blockLibrary","_url","_textEditor","_visualEditor","_keyboardShortcuts2","_initPatternModal","_browserUrl","_header","_metaBoxes","_welcomeGuide","_store","_lockUnlock","_useCommonCommands","getLayoutStyles","unlock","blockEditorPrivateApis","useCommands","coreCommandsPrivateApis","useCommandContext","commandsPrivateApis","InserterSidebar","ListViewSidebar","ComplementaryArea","FullscreenMode","SavePublishPanels","InterfaceSkeleton","interfaceStore","Sidebar","editorPrivateApis","BlockKeyboardShortcuts","blockLibraryPrivateApis","interfaceLabels","header","__","body","sidebar","actions","footer","useEditorStyles","hasThemeStyleSupport","editorSettings","useSelect","select","editPostStore","isFeatureActive","editorStore","getEditorSettings","useMemo","_editorSettings$style","_editorSettings$style2","presetStyles","styles","filter","style","__unstableType","defaultEditorStyles","hasThemeStyles","length","disableLayoutStyles","push","css","selector","hasBlockGapSupport","hasFallbackGapSupport","fallbackGapValue","Layout","initialPost","useCommonCommands","isMobileViewport","useViewportMatch","isWideViewport","isLargeViewport","closeGeneralSidebar","useDispatch","createErrorNotice","noticesStore","mode","isFullscreenActive","isRichEditingEnabled","sidebarIsOpened","hasActiveMetaboxes","previousShortcut","nextShortcut","hasBlockSelected","isInserterOpened","isListViewOpened","showIconLabels","isDistractionFree","showBlockBreadcrumbs","showMetaBoxes","documentLabel","hasHistory","hasBlockBreadcrumbs","blockEditorMode","isEditingTemplate","get","preferencesStore","getPostTypeLabel","postTypeLabel","getRenderingMode","getActiveComplementaryArea","isPublishSidebarOpened","getEditorMode","richEditingEnabled","hasMetaBoxes","keyboardShortcutsStore","getAllShortcutKeyCombinations","_x","blockEditorStore","getBlockSelectionStart","onNavigateToPreviousEntityRecord","__unstableGetEditorMode","getCurrentPostType","commandContext","entitiesSavedStatesCallback","setEntitiesSavedStatesCallback","useState","closeEntitiesSavedStates","useCallback","arg","document","classList","add","remove","className","clsx","secondarySidebarLabel","secondarySidebar","_react","createElement","isRightSidebarOpen","onPluginAreaError","name","sprintf","createSuccessNotice","onActionPerformed","actionId","items","location","href","addQueryArgs","trashed","post_type","type","ids","id","newItem","title","rendered","label","onClick","postId","post","action","Fragment","isActive","default","UnsavedChangesWarning","AutosaveMonitor","LocalAutosaveMonitor","EditorKeyboardShortcutsRegister","EditorKeyboardShortcuts","labels","editorNotices","EditorNotices","Slot","scope","notices","EditorSnackbars","content","BlockToolbar","hideDragHandle","ScrollLock","BlockBreadcrumb","rootLabelText","isEntitiesSavedStatesOpen","forceIsDirtyPublishPanel","shortcuts","previous","next","PluginArea","onError","extraPanels","_default","exports"],"sources":["@wordpress/edit-post/src/components/layout/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tAutosaveMonitor,\n\tLocalAutosaveMonitor,\n\tUnsavedChangesWarning,\n\tEditorNotices,\n\tEditorKeyboardShortcutsRegister,\n\tEditorKeyboardShortcuts,\n\tEditorSnackbars,\n\tstore as editorStore,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tBlockBreadcrumb,\n\tBlockToolbar,\n\tprivateApis as blockEditorPrivateApis,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { ScrollLock } from '@wordpress/components';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { PluginArea } from '@wordpress/plugins';\nimport { __, _x, sprintf } from '@wordpress/i18n';\nimport { useState, useCallback, useMemo } from '@wordpress/element';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { privateApis as commandsPrivateApis } from '@wordpress/commands';\nimport { privateApis as coreCommandsPrivateApis } from '@wordpress/core-commands';\nimport { privateApis as blockLibraryPrivateApis } from '@wordpress/block-library';\nimport { addQueryArgs } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport TextEditor from '../text-editor';\nimport VisualEditor from '../visual-editor';\nimport EditPostKeyboardShortcuts from '../keyboard-shortcuts';\nimport InitPatternModal from '../init-pattern-modal';\nimport BrowserURL from '../browser-url';\nimport Header from '../header';\nimport MetaBoxes from '../meta-boxes';\nimport WelcomeGuide from '../welcome-guide';\nimport { store as editPostStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\nimport useCommonCommands from '../../hooks/commands/use-common-commands';\n\nconst { getLayoutStyles } = unlock( blockEditorPrivateApis );\nconst { useCommands } = unlock( coreCommandsPrivateApis );\nconst { useCommandContext } = unlock( commandsPrivateApis );\nconst {\n\tInserterSidebar,\n\tListViewSidebar,\n\tComplementaryArea,\n\tFullscreenMode,\n\tSavePublishPanels,\n\tInterfaceSkeleton,\n\tinterfaceStore,\n\tSidebar,\n} = unlock( editorPrivateApis );\nconst { BlockKeyboardShortcuts } = unlock( blockLibraryPrivateApis );\n\nconst interfaceLabels = {\n\t/* translators: accessibility text for the editor top bar landmark region. */\n\theader: __( 'Editor top bar' ),\n\t/* translators: accessibility text for the editor content landmark region. */\n\tbody: __( 'Editor content' ),\n\t/* translators: accessibility text for the editor settings landmark region. */\n\tsidebar: __( 'Editor settings' ),\n\t/* translators: accessibility text for the editor publish landmark region. */\n\tactions: __( 'Editor publish' ),\n\t/* translators: accessibility text for the editor footer landmark region. */\n\tfooter: __( 'Editor footer' ),\n};\n\nfunction useEditorStyles() {\n\tconst { hasThemeStyleSupport, editorSettings } = useSelect(\n\t\t( select ) => ( {\n\t\t\thasThemeStyleSupport:\n\t\t\t\tselect( editPostStore ).isFeatureActive( 'themeStyles' ),\n\t\t\teditorSettings: select( editorStore ).getEditorSettings(),\n\t\t} ),\n\t\t[]\n\t);\n\n\t// Compute the default styles.\n\treturn useMemo( () => {\n\t\tconst presetStyles =\n\t\t\teditorSettings.styles?.filter(\n\t\t\t\t( style ) =>\n\t\t\t\t\tstyle.__unstableType && style.__unstableType !== 'theme'\n\t\t\t) ?? [];\n\n\t\tconst defaultEditorStyles = [\n\t\t\t...editorSettings.defaultEditorStyles,\n\t\t\t...presetStyles,\n\t\t];\n\n\t\t// Has theme styles if the theme supports them and if some styles were not preset styles (in which case they're theme styles).\n\t\tconst hasThemeStyles =\n\t\t\thasThemeStyleSupport &&\n\t\t\tpresetStyles.length !== ( editorSettings.styles?.length ?? 0 );\n\n\t\t// If theme styles are not present or displayed, ensure that\n\t\t// base layout styles are still present in the editor.\n\t\tif ( ! editorSettings.disableLayoutStyles && ! hasThemeStyles ) {\n\t\t\tdefaultEditorStyles.push( {\n\t\t\t\tcss: getLayoutStyles( {\n\t\t\t\t\tstyle: {},\n\t\t\t\t\tselector: 'body',\n\t\t\t\t\thasBlockGapSupport: false,\n\t\t\t\t\thasFallbackGapSupport: true,\n\t\t\t\t\tfallbackGapValue: '0.5em',\n\t\t\t\t} ),\n\t\t\t} );\n\t\t}\n\n\t\treturn hasThemeStyles ? editorSettings.styles : defaultEditorStyles;\n\t}, [\n\t\teditorSettings.defaultEditorStyles,\n\t\teditorSettings.disableLayoutStyles,\n\t\teditorSettings.styles,\n\t\thasThemeStyleSupport,\n\t] );\n}\n\nfunction Layout( { initialPost } ) {\n\tuseCommands();\n\tuseCommonCommands();\n\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\tconst isWideViewport = useViewportMatch( 'large' );\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\n\tconst { closeGeneralSidebar } = useDispatch( editPostStore );\n\tconst { createErrorNotice } = useDispatch( noticesStore );\n\tconst {\n\t\tmode,\n\t\tisFullscreenActive,\n\t\tisRichEditingEnabled,\n\t\tsidebarIsOpened,\n\t\thasActiveMetaboxes,\n\t\tpreviousShortcut,\n\t\tnextShortcut,\n\t\thasBlockSelected,\n\t\tisInserterOpened,\n\t\tisListViewOpened,\n\t\tshowIconLabels,\n\t\tisDistractionFree,\n\t\tshowBlockBreadcrumbs,\n\t\tshowMetaBoxes,\n\t\tdocumentLabel,\n\t\thasHistory,\n\t\thasBlockBreadcrumbs,\n\t\tblockEditorMode,\n\t\tisEditingTemplate,\n\t} = useSelect( ( select ) => {\n\t\tconst { get } = select( preferencesStore );\n\t\tconst { getEditorSettings, getPostTypeLabel } = select( editorStore );\n\t\tconst editorSettings = getEditorSettings();\n\t\tconst postTypeLabel = getPostTypeLabel();\n\n\t\treturn {\n\t\t\tshowMetaBoxes:\n\t\t\t\tselect( editorStore ).getRenderingMode() === 'post-only',\n\t\t\tsidebarIsOpened: !! (\n\t\t\t\tselect( interfaceStore ).getActiveComplementaryArea( 'core' ) ||\n\t\t\t\tselect( editorStore ).isPublishSidebarOpened()\n\t\t\t),\n\t\t\tisFullscreenActive:\n\t\t\t\tselect( editPostStore ).isFeatureActive( 'fullscreenMode' ),\n\t\t\tisInserterOpened: select( editorStore ).isInserterOpened(),\n\t\t\tisListViewOpened: select( editorStore ).isListViewOpened(),\n\t\t\tmode: select( editorStore ).getEditorMode(),\n\t\t\tisRichEditingEnabled: editorSettings.richEditingEnabled,\n\t\t\thasActiveMetaboxes: select( editPostStore ).hasMetaBoxes(),\n\t\t\tpreviousShortcut: select(\n\t\t\t\tkeyboardShortcutsStore\n\t\t\t).getAllShortcutKeyCombinations( 'core/editor/previous-region' ),\n\t\t\tnextShortcut: select(\n\t\t\t\tkeyboardShortcutsStore\n\t\t\t).getAllShortcutKeyCombinations( 'core/editor/next-region' ),\n\t\t\tshowIconLabels: get( 'core', 'showIconLabels' ),\n\t\t\tisDistractionFree: get( 'core', 'distractionFree' ),\n\t\t\tshowBlockBreadcrumbs: get( 'core', 'showBlockBreadcrumbs' ),\n\t\t\t// translators: Default label for the Document in the Block Breadcrumb.\n\t\t\tdocumentLabel: postTypeLabel || _x( 'Document', 'noun' ),\n\t\t\thasBlockSelected:\n\t\t\t\t!! select( blockEditorStore ).getBlockSelectionStart(),\n\t\t\thasHistory: !! getEditorSettings().onNavigateToPreviousEntityRecord,\n\t\t\thasBlockBreadcrumbs: get( 'core', 'showBlockBreadcrumbs' ),\n\t\t\tblockEditorMode:\n\t\t\t\tselect( blockEditorStore ).__unstableGetEditorMode(),\n\t\t\tisEditingTemplate:\n\t\t\t\tselect( editorStore ).getCurrentPostType() === 'wp_template',\n\t\t};\n\t}, [] );\n\n\t// Set the right context for the command palette\n\tconst commandContext = hasBlockSelected\n\t\t? 'block-selection-edit'\n\t\t: 'post-editor-edit';\n\tuseCommandContext( commandContext );\n\n\tconst styles = useEditorStyles();\n\n\t// Local state for save panel.\n\t// Note 'truthy' callback implies an open panel.\n\tconst [ entitiesSavedStatesCallback, setEntitiesSavedStatesCallback ] =\n\t\tuseState( false );\n\n\tconst closeEntitiesSavedStates = useCallback(\n\t\t( arg ) => {\n\t\t\tif ( typeof entitiesSavedStatesCallback === 'function' ) {\n\t\t\t\tentitiesSavedStatesCallback( arg );\n\t\t\t}\n\t\t\tsetEntitiesSavedStatesCallback( false );\n\t\t},\n\t\t[ entitiesSavedStatesCallback ]\n\t);\n\n\t// We need to add the show-icon-labels class to the body element so it is applied to modals.\n\tif ( showIconLabels ) {\n\t\tdocument.body.classList.add( 'show-icon-labels' );\n\t} else {\n\t\tdocument.body.classList.remove( 'show-icon-labels' );\n\t}\n\n\tconst className = clsx( 'edit-post-layout', 'is-mode-' + mode, {\n\t\t'is-sidebar-opened': sidebarIsOpened,\n\t\t'has-metaboxes': hasActiveMetaboxes,\n\t\t'is-distraction-free': isDistractionFree && isWideViewport,\n\t\t'is-entity-save-view-open': !! entitiesSavedStatesCallback,\n\t\t'has-block-breadcrumbs':\n\t\t\thasBlockBreadcrumbs && ! isDistractionFree && isWideViewport,\n\t} );\n\n\tconst secondarySidebarLabel = isListViewOpened\n\t\t? __( 'Document Overview' )\n\t\t: __( 'Block Library' );\n\n\tconst secondarySidebar = () => {\n\t\tif ( mode === 'visual' && isInserterOpened ) {\n\t\t\treturn (\n\t\t\t\t<InserterSidebar\n\t\t\t\t\tcloseGeneralSidebar={ closeGeneralSidebar }\n\t\t\t\t\tisRightSidebarOpen={ sidebarIsOpened }\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\t\tif ( mode === 'visual' && isListViewOpened ) {\n\t\t\treturn <ListViewSidebar />;\n\t\t}\n\n\t\treturn null;\n\t};\n\n\tfunction onPluginAreaError( name ) {\n\t\tcreateErrorNotice(\n\t\t\tsprintf(\n\t\t\t\t/* translators: %s: plugin name */\n\t\t\t\t__(\n\t\t\t\t\t'The \"%s\" plugin has encountered an error and cannot be rendered.'\n\t\t\t\t),\n\t\t\t\tname\n\t\t\t)\n\t\t);\n\t}\n\n\tconst { createSuccessNotice } = useDispatch( noticesStore );\n\n\tconst onActionPerformed = useCallback(\n\t\t( actionId, items ) => {\n\t\t\tswitch ( actionId ) {\n\t\t\t\tcase 'move-to-trash':\n\t\t\t\t\t{\n\t\t\t\t\t\tdocument.location.href = addQueryArgs( 'edit.php', {\n\t\t\t\t\t\t\ttrashed: 1,\n\t\t\t\t\t\t\tpost_type: items[ 0 ].type,\n\t\t\t\t\t\t\tids: items[ 0 ].id,\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'duplicate-post':\n\t\t\t\t\t{\n\t\t\t\t\t\tconst newItem = items[ 0 ];\n\t\t\t\t\t\tconst title =\n\t\t\t\t\t\t\ttypeof newItem.title === 'string'\n\t\t\t\t\t\t\t\t? newItem.title\n\t\t\t\t\t\t\t\t: newItem.title?.rendered;\n\t\t\t\t\t\tcreateSuccessNotice(\n\t\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t\t// translators: %s: Title of the created post e.g: \"Post 1\".\n\t\t\t\t\t\t\t\t__( '\"%s\" successfully created.' ),\n\t\t\t\t\t\t\t\ttitle\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\t\t\t\tid: 'duplicate-post-action',\n\t\t\t\t\t\t\t\tactions: [\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tlabel: __( 'Edit' ),\n\t\t\t\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\t\t\t\tconst postId = newItem.id;\n\t\t\t\t\t\t\t\t\t\t\tdocument.location.href =\n\t\t\t\t\t\t\t\t\t\t\t\taddQueryArgs( 'post.php', {\n\t\t\t\t\t\t\t\t\t\t\t\t\tpost: postId,\n\t\t\t\t\t\t\t\t\t\t\t\t\taction: 'edit',\n\t\t\t\t\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t},\n\t\t[ createSuccessNotice ]\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<FullscreenMode isActive={ isFullscreenActive } />\n\t\t\t<BrowserURL hasHistory={ hasHistory } />\n\t\t\t<UnsavedChangesWarning />\n\t\t\t<AutosaveMonitor />\n\t\t\t<LocalAutosaveMonitor />\n\t\t\t<EditPostKeyboardShortcuts />\n\t\t\t<EditorKeyboardShortcutsRegister />\n\t\t\t<EditorKeyboardShortcuts />\n\t\t\t<BlockKeyboardShortcuts />\n\n\t\t\t<InterfaceSkeleton\n\t\t\t\tisDistractionFree={ isDistractionFree && isWideViewport }\n\t\t\t\tclassName={ className }\n\t\t\t\tlabels={ {\n\t\t\t\t\t...interfaceLabels,\n\t\t\t\t\tsecondarySidebar: secondarySidebarLabel,\n\t\t\t\t} }\n\t\t\t\theader={\n\t\t\t\t\t<Header\n\t\t\t\t\t\tsetEntitiesSavedStatesCallback={\n\t\t\t\t\t\t\tsetEntitiesSavedStatesCallback\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinitialPost={ initialPost }\n\t\t\t\t\t/>\n\t\t\t\t}\n\t\t\t\teditorNotices={ <EditorNotices /> }\n\t\t\t\tsecondarySidebar={ secondarySidebar() }\n\t\t\t\tsidebar={\n\t\t\t\t\t! isDistractionFree && (\n\t\t\t\t\t\t<ComplementaryArea.Slot scope=\"core\" />\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t\tnotices={ <EditorSnackbars /> }\n\t\t\t\tcontent={\n\t\t\t\t\t<>\n\t\t\t\t\t\t{ ! isDistractionFree && <EditorNotices /> }\n\t\t\t\t\t\t{ ( mode === 'text' || ! isRichEditingEnabled ) && (\n\t\t\t\t\t\t\t<TextEditor />\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ ! isLargeViewport && <BlockToolbar hideDragHandle /> }\n\t\t\t\t\t\t{ isRichEditingEnabled && mode === 'visual' && (\n\t\t\t\t\t\t\t<VisualEditor styles={ styles } />\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ ! isDistractionFree && showMetaBoxes && (\n\t\t\t\t\t\t\t<div className=\"edit-post-layout__metaboxes\">\n\t\t\t\t\t\t\t\t<MetaBoxes location=\"normal\" />\n\t\t\t\t\t\t\t\t<MetaBoxes location=\"advanced\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ isMobileViewport && sidebarIsOpened && (\n\t\t\t\t\t\t\t<ScrollLock />\n\t\t\t\t\t\t) }\n\t\t\t\t\t</>\n\t\t\t\t}\n\t\t\t\tfooter={\n\t\t\t\t\t! isDistractionFree &&\n\t\t\t\t\t! isMobileViewport &&\n\t\t\t\t\tshowBlockBreadcrumbs &&\n\t\t\t\t\tisRichEditingEnabled &&\n\t\t\t\t\tblockEditorMode !== 'zoom-out' &&\n\t\t\t\t\tmode === 'visual' && (\n\t\t\t\t\t\t<div className=\"edit-post-layout__footer\">\n\t\t\t\t\t\t\t<BlockBreadcrumb rootLabelText={ documentLabel } />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t\tactions={\n\t\t\t\t\t<SavePublishPanels\n\t\t\t\t\t\tcloseEntitiesSavedStates={ closeEntitiesSavedStates }\n\t\t\t\t\t\tisEntitiesSavedStatesOpen={\n\t\t\t\t\t\t\tentitiesSavedStatesCallback\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsetEntitiesSavedStatesCallback={\n\t\t\t\t\t\t\tsetEntitiesSavedStatesCallback\n\t\t\t\t\t\t}\n\t\t\t\t\t\tforceIsDirtyPublishPanel={ hasActiveMetaboxes }\n\t\t\t\t\t/>\n\t\t\t\t}\n\t\t\t\tshortcuts={ {\n\t\t\t\t\tprevious: previousShortcut,\n\t\t\t\t\tnext: nextShortcut,\n\t\t\t\t} }\n\t\t\t/>\n\t\t\t<WelcomeGuide />\n\t\t\t<InitPatternModal />\n\t\t\t<PluginArea onError={ onPluginAreaError } />\n\t\t\t{ ! isDistractionFree && (\n\t\t\t\t<Sidebar\n\t\t\t\t\tonActionPerformed={ onActionPerformed }\n\t\t\t\t\textraPanels={\n\t\t\t\t\t\t! isEditingTemplate && <MetaBoxes location=\"side\" />\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default Layout;\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,OAAA,GAAAD,OAAA;AAWA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AAMA,IAAAI,WAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,QAAA,GAAAN,OAAA;AACA,IAAAO,KAAA,GAAAP,OAAA;AACA,IAAAQ,QAAA,GAAAR,OAAA;AACA,IAAAS,kBAAA,GAAAT,OAAA;AACA,IAAAU,QAAA,GAAAV,OAAA;AACA,IAAAW,YAAA,GAAAX,OAAA;AACA,IAAAY,SAAA,GAAAZ,OAAA;AACA,IAAAa,aAAA,GAAAb,OAAA;AACA,IAAAc,aAAA,GAAAd,OAAA;AACA,IAAAe,IAAA,GAAAf,OAAA;AAKA,IAAAgB,WAAA,GAAAjB,sBAAA,CAAAC,OAAA;AACA,IAAAiB,aAAA,GAAAlB,sBAAA,CAAAC,OAAA;AACA,IAAAkB,mBAAA,GAAAnB,sBAAA,CAAAC,OAAA;AACA,IAAAmB,iBAAA,GAAApB,sBAAA,CAAAC,OAAA;AACA,IAAAoB,WAAA,GAAArB,sBAAA,CAAAC,OAAA;AACA,IAAAqB,OAAA,GAAAtB,sBAAA,CAAAC,OAAA;AACA,IAAAsB,UAAA,GAAAv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,OAAO,EAAGlD;EAAmB,CAAE,CAAC,EAC1C,CAAE5C,iBAAiB,IACpB,IAAAyC,MAAA,CAAAC,aAAA,EAACtG,OAAO;IACP4G,iBAAiB,EAAGA,iBAAmB;IACvC+C,WAAW,EACV,CAAExF,iBAAiB,IAAI,IAAAkC,MAAA,CAAAC,aAAA,EAACzH,UAAA,CAAAoJ,OAAS;MAAClB,QAAQ,EAAC;IAAM,CAAE;EACnD,CACD,CAED,CAAC;AAEL;AAAC,IAAA6C,QAAA,GAAAC,OAAA,CAAA5B,OAAA,GAEc3F,MAAM","ignoreList":[]}
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.default = void 0;
8
8
  var _react = require("react");
9
- var _classnames = _interopRequireDefault(require("classnames"));
9
+ var _clsx = _interopRequireDefault(require("clsx"));
10
10
  var _element = require("@wordpress/element");
11
11
  var _components = require("@wordpress/components");
12
12
  var _data = require("@wordpress/data");
@@ -49,7 +49,7 @@ function MetaBoxesArea({
49
49
  const isSaving = (0, _data.useSelect)(select => {
50
50
  return select(_store.store).isSavingMetaBoxes();
51
51
  }, []);
52
- const classes = (0, _classnames.default)('edit-post-meta-boxes-area', `is-${location}`, {
52
+ const classes = (0, _clsx.default)('edit-post-meta-boxes-area', `is-${location}`, {
53
53
  'is-loading': isSaving
54
54
  });
55
55
  return (0, _react.createElement)("div", {
@@ -1 +1 @@
1
- {"version":3,"names":["_classnames","_interopRequireDefault","require","_element","_components","_data","_store","MetaBoxesArea","location","container","useRef","formRef","useEffect","current","document","querySelector","appendChild","isSaving","useSelect","select","editPostStore","isSavingMetaBoxes","classes","classnames","_react","createElement","className","Spinner","ref","_default","exports","default"],"sources":["@wordpress/edit-post/src/components/meta-boxes/meta-boxes-area/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useRef, useEffect } from '@wordpress/element';\nimport { Spinner } from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as editPostStore } from '../../../store';\n\n/**\n * Render metabox area.\n *\n * @param {Object} props Component props.\n * @param {string} props.location metabox location.\n * @return {Component} The component to be rendered.\n */\nfunction MetaBoxesArea( { location } ) {\n\tconst container = useRef( null );\n\tconst formRef = useRef( null );\n\n\tuseEffect( () => {\n\t\tformRef.current = document.querySelector(\n\t\t\t'.metabox-location-' + location\n\t\t);\n\n\t\tif ( formRef.current ) {\n\t\t\tcontainer.current.appendChild( formRef.current );\n\t\t}\n\n\t\treturn () => {\n\t\t\tif ( formRef.current ) {\n\t\t\t\tdocument\n\t\t\t\t\t.querySelector( '#metaboxes' )\n\t\t\t\t\t.appendChild( formRef.current );\n\t\t\t}\n\t\t};\n\t}, [ location ] );\n\n\tconst isSaving = useSelect( ( select ) => {\n\t\treturn select( editPostStore ).isSavingMetaBoxes();\n\t}, [] );\n\n\tconst classes = classnames(\n\t\t'edit-post-meta-boxes-area',\n\t\t`is-${ location }`,\n\t\t{\n\t\t\t'is-loading': isSaving,\n\t\t}\n\t);\n\n\treturn (\n\t\t<div className={ classes }>\n\t\t\t{ isSaving && <Spinner /> }\n\t\t\t<div\n\t\t\t\tclassName=\"edit-post-meta-boxes-area__container\"\n\t\t\t\tref={ container }\n\t\t\t/>\n\t\t\t<div className=\"edit-post-meta-boxes-area__clear\" />\n\t\t</div>\n\t);\n}\n\nexport default MetaBoxesArea;\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AAKA,IAAAI,MAAA,GAAAJ,OAAA;AAfA;AACA;AACA;;AAGA;AACA;AACA;;AAKA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASK,aAAaA,CAAE;EAAEC;AAAS,CAAC,EAAG;EACtC,MAAMC,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["_clsx","_interopRequireDefault","require","_element","_components","_data","_store","MetaBoxesArea","location","container","useRef","formRef","useEffect","current","document","querySelector","appendChild","isSaving","useSelect","select","editPostStore","isSavingMetaBoxes","classes","clsx","_react","createElement","className","Spinner","ref","_default","exports","default"],"sources":["@wordpress/edit-post/src/components/meta-boxes/meta-boxes-area/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useRef, useEffect } from '@wordpress/element';\nimport { Spinner } from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as editPostStore } from '../../../store';\n\n/**\n * Render metabox area.\n *\n * @param {Object} props Component props.\n * @param {string} props.location metabox location.\n * @return {Component} The component to be rendered.\n */\nfunction MetaBoxesArea( { location } ) {\n\tconst container = useRef( null );\n\tconst formRef = useRef( null );\n\n\tuseEffect( () => {\n\t\tformRef.current = document.querySelector(\n\t\t\t'.metabox-location-' + location\n\t\t);\n\n\t\tif ( formRef.current ) {\n\t\t\tcontainer.current.appendChild( formRef.current );\n\t\t}\n\n\t\treturn () => {\n\t\t\tif ( formRef.current ) {\n\t\t\t\tdocument\n\t\t\t\t\t.querySelector( '#metaboxes' )\n\t\t\t\t\t.appendChild( formRef.current );\n\t\t\t}\n\t\t};\n\t}, [ location ] );\n\n\tconst isSaving = useSelect( ( select ) => {\n\t\treturn select( editPostStore ).isSavingMetaBoxes();\n\t}, [] );\n\n\tconst classes = clsx( 'edit-post-meta-boxes-area', `is-${ location }`, {\n\t\t'is-loading': isSaving,\n\t} );\n\n\treturn (\n\t\t<div className={ classes }>\n\t\t\t{ isSaving && <Spinner /> }\n\t\t\t<div\n\t\t\t\tclassName=\"edit-post-meta-boxes-area__container\"\n\t\t\t\tref={ container }\n\t\t\t/>\n\t\t\t<div className=\"edit-post-meta-boxes-area__clear\" />\n\t\t</div>\n\t);\n}\n\nexport default MetaBoxesArea;\n"],"mappings":";;;;;;;;AAGA,IAA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,aAAA,EAACrB,WAAA,CAAAuB,OAAO,MAAE,CAAC,EACzB,IAAAH,MAAA,CAAAC,aAAA;IACCC,SAAS,EAAC,sCAAsC;IAChDE,GAAG,EAAGnB;EAAW,CACjB,CAAC,EACF,IAAAe,MAAA,CAAAC,aAAA;IAAKC,SAAS,EAAC;EAAkC,CAAE,CAC/C,CAAC;AAER;AAAC,IAAAG,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEcxB,aAAa","ignoreList":[]}
@@ -7,12 +7,10 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.default = EditPostPreferencesModal;
8
8
  var _react = require("react");
9
9
  var _i18n = require("@wordpress/i18n");
10
- var _compose = require("@wordpress/compose");
11
10
  var _preferences = require("@wordpress/preferences");
12
11
  var _editor = require("@wordpress/editor");
13
12
  var _lockUnlock = require("../../lock-unlock");
14
13
  var _metaBoxesSection = _interopRequireDefault(require("./meta-boxes-section"));
15
- var _enablePublishSidebar = _interopRequireDefault(require("./enable-publish-sidebar"));
16
14
  /**
17
15
  * WordPress dependencies
18
16
  */
@@ -22,23 +20,16 @@ var _enablePublishSidebar = _interopRequireDefault(require("./enable-publish-sid
22
20
  */
23
21
 
24
22
  const {
25
- PreferencesModalSection,
26
23
  PreferenceToggleControl
27
24
  } = (0, _lockUnlock.unlock)(_preferences.privateApis);
28
25
  const {
29
26
  PreferencesModal
30
27
  } = (0, _lockUnlock.unlock)(_editor.privateApis);
31
28
  function EditPostPreferencesModal() {
32
- const isLargeViewport = (0, _compose.useViewportMatch)('medium');
33
29
  const extraSections = {
34
- general: (0, _react.createElement)(_react.Fragment, null, isLargeViewport && (0, _react.createElement)(PreferencesModalSection, {
35
- title: (0, _i18n.__)('Publishing')
36
- }, (0, _react.createElement)(_enablePublishSidebar.default, {
37
- help: (0, _i18n.__)('Review settings, such as visibility and tags.'),
38
- label: (0, _i18n.__)('Enable pre-publish checks')
39
- })), (0, _react.createElement)(_metaBoxesSection.default, {
30
+ general: (0, _react.createElement)(_metaBoxesSection.default, {
40
31
  title: (0, _i18n.__)('Advanced')
41
- })),
32
+ }),
42
33
  appearance: (0, _react.createElement)(PreferenceToggleControl, {
43
34
  scope: "core/edit-post",
44
35
  featureName: "themeStyles",
@@ -1 +1 @@
1
- {"version":3,"names":["_i18n","require","_compose","_preferences","_editor","_lockUnlock","_metaBoxesSection","_interopRequireDefault","_enablePublishSidebar","PreferencesModalSection","PreferenceToggleControl","unlock","preferencesPrivateApis","PreferencesModal","editorPrivateApis","EditPostPreferencesModal","isLargeViewport","useViewportMatch","extraSections","general","_react","createElement","Fragment","title","__","default","help","label","appearance","scope","featureName"],"sources":["@wordpress/edit-post/src/components/preferences-modal/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\n\nimport { __ } from '@wordpress/i18n';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { privateApis as preferencesPrivateApis } from '@wordpress/preferences';\nimport { privateApis as editorPrivateApis } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport MetaBoxesSection from './meta-boxes-section';\nimport EnablePublishSidebarOption from './enable-publish-sidebar';\n\nconst { PreferencesModalSection, PreferenceToggleControl } = unlock(\n\tpreferencesPrivateApis\n);\nconst { PreferencesModal } = unlock( editorPrivateApis );\n\nexport default function EditPostPreferencesModal() {\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\n\tconst extraSections = {\n\t\tgeneral: (\n\t\t\t<>\n\t\t\t\t{ isLargeViewport && (\n\t\t\t\t\t<PreferencesModalSection title={ __( 'Publishing' ) }>\n\t\t\t\t\t\t<EnablePublishSidebarOption\n\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t'Review settings, such as visibility and tags.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tlabel={ __( 'Enable pre-publish checks' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</PreferencesModalSection>\n\t\t\t\t) }\n\t\t\t\t<MetaBoxesSection title={ __( 'Advanced' ) } />\n\t\t\t</>\n\t\t),\n\t\tappearance: (\n\t\t\t<PreferenceToggleControl\n\t\t\t\tscope=\"core/edit-post\"\n\t\t\t\tfeatureName=\"themeStyles\"\n\t\t\t\thelp={ __( 'Make the editor look like your theme.' ) }\n\t\t\t\tlabel={ __( 'Use theme styles' ) }\n\t\t\t/>\n\t\t),\n\t};\n\n\treturn <PreferencesModal extraSections={ extraSections } />;\n}\n"],"mappings":";;;;;;;;AAIA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AAKA,IAAAI,WAAA,GAAAJ,OAAA;AACA,IAAAK,iBAAA,GAAAC,sBAAA,CAAAN,OAAA;AACA,IAAAO,qBAAA,GAAAD,sBAAA,CAAAN,OAAA;AAdA;AACA;AACA;;AAOA;AACA;AACA;;AAKA,MAAM;EAAEQ,uBAAuB;EAAEC;AAAwB,CAAC,GAAG,IAAAC,kBAAM,EAClEC,wBACD,CAAC;AACD,MAAM;EAAEC;AAAiB,CAAC,GAAG,IAAAF,kBAAM,EAAEG,mBAAkB,CAAC;AAEzC,SAASC,wBAAwBA,CAAA,EAAG;EAClD,MAAMC,eAAe,GAAG,IAAAC,yBAAgB,EAAE,QAAS,CAAC;EAEpD,MAAMC,aAAa,GAAG;IACrBC,OAAO,EACN,IAAAC,MAAA,CAAAC,aAAA,EAAAD,MAAA,CAAAE,QAAA,QACGN,eAAe,IAChB,IAAAI,MAAA,CAAAC,aAAA,EAACZ,uBAAuB;MAACc,KAAK,EAAG,IAAAC,QAAE,EAAE,YAAa;IAAG,GACpD,IAAAJ,MAAA,CAAAC,aAAA,EAACb,qBAAA,CAAAiB,OAA0B;MAC1BC,IAAI,EAAG,IAAAF,QAAE,EACR,+CACD,CAAG;MACHG,KAAK,EAAG,IAAAH,QAAE,EAAE,2BAA4B;IAAG,CAC3C,CACuB,CACzB,EACD,IAAAJ,MAAA,CAAAC,aAAA,EAACf,iBAAA,CAAAmB,OAAgB;MAACF,KAAK,EAAG,IAAAC,QAAE,EAAE,UAAW;IAAG,CAAE,CAC7C,CACF;IACDI,UAAU,EACT,IAAAR,MAAA,CAAAC,aAAA,EAACX,uBAAuB;MACvBmB,KAAK,EAAC,gBAAgB;MACtBC,WAAW,EAAC,aAAa;MACzBJ,IAAI,EAAG,IAAAF,QAAE,EAAE,uCAAwC,CAAG;MACtDG,KAAK,EAAG,IAAAH,QAAE,EAAE,kBAAmB;IAAG,CAClC;EAEH,CAAC;EAED,OAAO,IAAAJ,MAAA,CAAAC,aAAA,EAACR,gBAAgB;IAACK,aAAa,EAAGA;EAAe,CAAE,CAAC;AAC5D","ignoreList":[]}
1
+ {"version":3,"names":["_i18n","require","_preferences","_editor","_lockUnlock","_metaBoxesSection","_interopRequireDefault","PreferenceToggleControl","unlock","preferencesPrivateApis","PreferencesModal","editorPrivateApis","EditPostPreferencesModal","extraSections","general","_react","createElement","default","title","__","appearance","scope","featureName","help","label"],"sources":["@wordpress/edit-post/src/components/preferences-modal/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\n\nimport { __ } from '@wordpress/i18n';\nimport { privateApis as preferencesPrivateApis } from '@wordpress/preferences';\nimport { privateApis as editorPrivateApis } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport MetaBoxesSection from './meta-boxes-section';\n\nconst { PreferenceToggleControl } = unlock( preferencesPrivateApis );\nconst { PreferencesModal } = unlock( editorPrivateApis );\n\nexport default function EditPostPreferencesModal() {\n\tconst extraSections = {\n\t\tgeneral: <MetaBoxesSection title={ __( 'Advanced' ) } />,\n\t\tappearance: (\n\t\t\t<PreferenceToggleControl\n\t\t\t\tscope=\"core/edit-post\"\n\t\t\t\tfeatureName=\"themeStyles\"\n\t\t\t\thelp={ __( 'Make the editor look like your theme.' ) }\n\t\t\t\tlabel={ __( 'Use theme styles' ) }\n\t\t\t/>\n\t\t),\n\t};\n\n\treturn <PreferencesModal extraSections={ extraSections } />;\n}\n"],"mappings":";;;;;;;;AAIA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AAKA,IAAAG,WAAA,GAAAH,OAAA;AACA,IAAAI,iBAAA,GAAAC,sBAAA,CAAAL,OAAA;AAZA;AACA;AACA;;AAMA;AACA;AACA;;AAIA,MAAM;EAAEM;AAAwB,CAAC,GAAG,IAAAC,kBAAM,EAAEC,wBAAuB,CAAC;AACpE,MAAM;EAAEC;AAAiB,CAAC,GAAG,IAAAF,kBAAM,EAAEG,mBAAkB,CAAC;AAEzC,SAASC,wBAAwBA,CAAA,EAAG;EAClD,MAAMC,aAAa,GAAG;IACrBC,OAAO,EAAE,IAAAC,MAAA,CAAAC,aAAA,EAACX,iBAAA,CAAAY,OAAgB;MAACC,KAAK,EAAG,IAAAC,QAAE,EAAE,UAAW;IAAG,CAAE,CAAC;IACxDC,UAAU,EACT,IAAAL,MAAA,CAAAC,aAAA,EAACT,uBAAuB;MACvBc,KAAK,EAAC,gBAAgB;MACtBC,WAAW,EAAC,aAAa;MACzBC,IAAI,EAAG,IAAAJ,QAAE,EAAE,uCAAwC,CAAG;MACtDK,KAAK,EAAG,IAAAL,QAAE,EAAE,kBAAmB;IAAG,CAClC;EAEH,CAAC;EAED,OAAO,IAAAJ,MAAA,CAAAC,aAAA,EAACN,gBAAgB;IAACG,aAAa,EAAGA;EAAe,CAAE,CAAC;AAC5D","ignoreList":[]}