@wordpress/edit-post 8.34.0 → 8.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 (148) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/commands/use-commands.js +2 -0
  3. package/build/commands/use-commands.js.map +1 -1
  4. package/build/components/back-button/fullscreen-mode-close.js +5 -3
  5. package/build/components/back-button/fullscreen-mode-close.js.map +1 -1
  6. package/build/components/back-button/index.js +5 -3
  7. package/build/components/back-button/index.js.map +1 -1
  8. package/build/components/browser-url/index.js +2 -0
  9. package/build/components/browser-url/index.js.map +1 -1
  10. package/build/components/editor-initialization/index.js +2 -0
  11. package/build/components/editor-initialization/index.js.map +1 -1
  12. package/build/components/editor-initialization/listener-hooks.js +3 -1
  13. package/build/components/editor-initialization/listener-hooks.js.map +1 -1
  14. package/build/components/init-pattern-modal/index.js +3 -1
  15. package/build/components/init-pattern-modal/index.js.map +1 -1
  16. package/build/components/keyboard-shortcuts/index.js +2 -0
  17. package/build/components/keyboard-shortcuts/index.js.map +1 -1
  18. package/build/components/layout/index.js +12 -29
  19. package/build/components/layout/index.js.map +2 -2
  20. package/build/components/layout/use-should-iframe.js +3 -1
  21. package/build/components/layout/use-should-iframe.js.map +1 -1
  22. package/build/components/meta-boxes/index.js +3 -1
  23. package/build/components/meta-boxes/index.js.map +1 -1
  24. package/build/components/meta-boxes/meta-box-visibility.js +2 -0
  25. package/build/components/meta-boxes/meta-box-visibility.js.map +1 -1
  26. package/build/components/meta-boxes/meta-boxes-area/index.js +3 -1
  27. package/build/components/meta-boxes/meta-boxes-area/index.js.map +1 -1
  28. package/build/components/meta-boxes/use-meta-box-initialization.js +3 -1
  29. package/build/components/meta-boxes/use-meta-box-initialization.js.map +1 -1
  30. package/build/components/more-menu/index.js +5 -3
  31. package/build/components/more-menu/index.js.map +1 -1
  32. package/build/components/more-menu/manage-patterns-menu-item.js +3 -1
  33. package/build/components/more-menu/manage-patterns-menu-item.js.map +1 -1
  34. package/build/components/more-menu/welcome-guide-menu-item.js +3 -1
  35. package/build/components/more-menu/welcome-guide-menu-item.js.map +1 -1
  36. package/build/components/preferences-modal/enable-custom-fields.js +4 -2
  37. package/build/components/preferences-modal/enable-custom-fields.js.map +1 -1
  38. package/build/components/preferences-modal/enable-panel.js +4 -2
  39. package/build/components/preferences-modal/enable-panel.js.map +1 -1
  40. package/build/components/preferences-modal/index.js +5 -3
  41. package/build/components/preferences-modal/index.js.map +1 -1
  42. package/build/components/preferences-modal/meta-boxes-section.js +4 -2
  43. package/build/components/preferences-modal/meta-boxes-section.js.map +1 -1
  44. package/build/components/welcome-guide/default.js +3 -1
  45. package/build/components/welcome-guide/default.js.map +1 -1
  46. package/build/components/welcome-guide/image.js +2 -0
  47. package/build/components/welcome-guide/image.js.map +1 -1
  48. package/build/components/welcome-guide/index.js +3 -1
  49. package/build/components/welcome-guide/index.js.map +1 -1
  50. package/build/components/welcome-guide/template.js +3 -1
  51. package/build/components/welcome-guide/template.js.map +1 -1
  52. package/build/deprecated.js +6 -4
  53. package/build/deprecated.js.map +1 -1
  54. package/build/hooks/use-navigate-to-entity-record.js +2 -0
  55. package/build/hooks/use-navigate-to-entity-record.js.map +1 -1
  56. package/build/index.js +4 -2
  57. package/build/index.js.map +1 -1
  58. package/build/lock-unlock.js +3 -1
  59. package/build/lock-unlock.js.map +1 -1
  60. package/build/store/actions.js +26 -24
  61. package/build/store/actions.js.map +1 -1
  62. package/build/store/constants.js +5 -3
  63. package/build/store/constants.js.map +1 -1
  64. package/build/store/index.js +3 -1
  65. package/build/store/index.js.map +1 -1
  66. package/build/store/reducer.js +3 -1
  67. package/build/store/reducer.js.map +1 -1
  68. package/build/store/selectors.js +27 -25
  69. package/build/store/selectors.js.map +1 -1
  70. package/build/utils/meta-boxes.js +3 -1
  71. package/build/utils/meta-boxes.js.map +1 -1
  72. package/build-module/commands/use-commands.js +1 -0
  73. package/build-module/commands/use-commands.js.map +1 -1
  74. package/build-module/components/back-button/fullscreen-mode-close.js +4 -3
  75. package/build-module/components/back-button/fullscreen-mode-close.js.map +1 -1
  76. package/build-module/components/back-button/index.js +4 -3
  77. package/build-module/components/back-button/index.js.map +1 -1
  78. package/build-module/components/browser-url/index.js +1 -0
  79. package/build-module/components/browser-url/index.js.map +1 -1
  80. package/build-module/components/editor-initialization/index.js +1 -0
  81. package/build-module/components/editor-initialization/index.js.map +1 -1
  82. package/build-module/components/editor-initialization/listener-hooks.js +2 -1
  83. package/build-module/components/editor-initialization/listener-hooks.js.map +1 -1
  84. package/build-module/components/init-pattern-modal/index.js +2 -1
  85. package/build-module/components/init-pattern-modal/index.js.map +1 -1
  86. package/build-module/components/keyboard-shortcuts/index.js +1 -0
  87. package/build-module/components/keyboard-shortcuts/index.js.map +1 -1
  88. package/build-module/components/layout/index.js +11 -29
  89. package/build-module/components/layout/index.js.map +2 -2
  90. package/build-module/components/layout/use-should-iframe.js +2 -1
  91. package/build-module/components/layout/use-should-iframe.js.map +1 -1
  92. package/build-module/components/meta-boxes/index.js +2 -1
  93. package/build-module/components/meta-boxes/index.js.map +1 -1
  94. package/build-module/components/meta-boxes/meta-box-visibility.js +1 -0
  95. package/build-module/components/meta-boxes/meta-box-visibility.js.map +1 -1
  96. package/build-module/components/meta-boxes/meta-boxes-area/index.js +2 -1
  97. package/build-module/components/meta-boxes/meta-boxes-area/index.js.map +1 -1
  98. package/build-module/components/meta-boxes/use-meta-box-initialization.js +2 -1
  99. package/build-module/components/meta-boxes/use-meta-box-initialization.js.map +1 -1
  100. package/build-module/components/more-menu/index.js +4 -3
  101. package/build-module/components/more-menu/index.js.map +1 -1
  102. package/build-module/components/more-menu/manage-patterns-menu-item.js +2 -1
  103. package/build-module/components/more-menu/manage-patterns-menu-item.js.map +1 -1
  104. package/build-module/components/more-menu/welcome-guide-menu-item.js +2 -1
  105. package/build-module/components/more-menu/welcome-guide-menu-item.js.map +1 -1
  106. package/build-module/components/preferences-modal/enable-custom-fields.js +3 -2
  107. package/build-module/components/preferences-modal/enable-custom-fields.js.map +1 -1
  108. package/build-module/components/preferences-modal/enable-panel.js +3 -2
  109. package/build-module/components/preferences-modal/enable-panel.js.map +1 -1
  110. package/build-module/components/preferences-modal/index.js +4 -3
  111. package/build-module/components/preferences-modal/index.js.map +1 -1
  112. package/build-module/components/preferences-modal/meta-boxes-section.js +3 -2
  113. package/build-module/components/preferences-modal/meta-boxes-section.js.map +1 -1
  114. package/build-module/components/welcome-guide/default.js +2 -1
  115. package/build-module/components/welcome-guide/default.js.map +1 -1
  116. package/build-module/components/welcome-guide/image.js +1 -0
  117. package/build-module/components/welcome-guide/image.js.map +1 -1
  118. package/build-module/components/welcome-guide/index.js +2 -1
  119. package/build-module/components/welcome-guide/index.js.map +1 -1
  120. package/build-module/components/welcome-guide/template.js +2 -1
  121. package/build-module/components/welcome-guide/template.js.map +1 -1
  122. package/build-module/deprecated.js +5 -4
  123. package/build-module/deprecated.js.map +1 -1
  124. package/build-module/hooks/use-navigate-to-entity-record.js +1 -0
  125. package/build-module/hooks/use-navigate-to-entity-record.js.map +1 -1
  126. package/build-module/index.js +6 -5
  127. package/build-module/index.js.map +1 -1
  128. package/build-module/lock-unlock.js +2 -1
  129. package/build-module/lock-unlock.js.map +1 -1
  130. package/build-module/store/actions.js +25 -24
  131. package/build-module/store/actions.js.map +1 -1
  132. package/build-module/store/constants.js +4 -3
  133. package/build-module/store/constants.js.map +1 -1
  134. package/build-module/store/index.js +2 -1
  135. package/build-module/store/index.js.map +1 -1
  136. package/build-module/store/reducer.js +2 -1
  137. package/build-module/store/reducer.js.map +1 -1
  138. package/build-module/store/selectors.js +26 -25
  139. package/build-module/store/selectors.js.map +1 -1
  140. package/build-module/utils/meta-boxes.js +2 -1
  141. package/build-module/utils/meta-boxes.js.map +1 -1
  142. package/package.json +33 -33
  143. package/src/components/layout/index.js +5 -30
  144. package/build/components/layout/use-padding-appender.js +0 -72
  145. package/build/components/layout/use-padding-appender.js.map +0 -7
  146. package/build-module/components/layout/use-padding-appender.js +0 -49
  147. package/build-module/components/layout/use-padding-appender.js.map +0 -7
  148. package/src/components/layout/use-padding-appender.js +0 -70
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/preferences-modal/meta-boxes-section.js"],
4
4
  "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { withSelect } from '@wordpress/data';\nimport { store as editorStore } from '@wordpress/editor';\nimport { privateApis as preferencesPrivateApis } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport EnableCustomFieldsOption from './enable-custom-fields';\nimport EnablePanelOption from './enable-panel';\nimport { store as editPostStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nconst { PreferencesModalSection } = unlock( preferencesPrivateApis );\n\nexport function MetaBoxesSection( {\n\tareCustomFieldsRegistered,\n\tmetaBoxes,\n\t...sectionProps\n} ) {\n\t// The 'Custom Fields' meta box is a special case that we handle separately.\n\tconst thirdPartyMetaBoxes = metaBoxes.filter(\n\t\t( { id } ) => id !== 'postcustom'\n\t);\n\n\tif ( ! areCustomFieldsRegistered && thirdPartyMetaBoxes.length === 0 ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PreferencesModalSection { ...sectionProps }>\n\t\t\t{ areCustomFieldsRegistered && (\n\t\t\t\t<EnableCustomFieldsOption label={ __( 'Custom fields' ) } />\n\t\t\t) }\n\t\t\t{ thirdPartyMetaBoxes.map( ( { id, title } ) => (\n\t\t\t\t<EnablePanelOption\n\t\t\t\t\tkey={ id }\n\t\t\t\t\tlabel={ title }\n\t\t\t\t\tpanelName={ `meta-box-${ id }` }\n\t\t\t\t/>\n\t\t\t) ) }\n\t\t</PreferencesModalSection>\n\t);\n}\n\nexport default withSelect( ( select ) => {\n\tconst { getEditorSettings } = select( editorStore );\n\tconst { getAllMetaBoxes } = select( editPostStore );\n\n\treturn {\n\t\t// This setting should not live in the block editor's store.\n\t\tareCustomFieldsRegistered:\n\t\t\tgetEdit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AO,uBAAuB;AAC9B,SAAS,SAAS,qBAAqB;AACvC,SAAS,cAAc;AAmBrB,SAEE,KAFF;AAjBF,IAAM,EAAE,wBAAwB,IAAI,OAAQ,sBAAuB;AAE5D,SAAS,iBAAkB;AAAA,EACjC;AAAA,EACA;AAAA,EACA,GAAG;AACJ,GAAI;AAEH,QAAM,sBAAsB,UAAU;AAAA,IACrC,CAAE,EAAE,GAAG,MAAO,OAAO;AAAA,EACtB;AAEA,MAAK,CAAE,6BAA6B,oBAAoB,WAAW,GAAI;AACtE,WAAO;AAAA,EACR;AAEA,SACC,qBAAC,2BAA0B,GAAG,cAC3B;AAAA,iCACD,oBAAC,4BAAyB,OAAQ,GAAI,eAAgB,GAAI;AAAA,IAEzD,oBAAoB,IAAK,CAAE,EAAE,IAAI,MAAM,MACxC;AAAA,MAAC;AAAA;AAAA,QAEA,OAAQ;AAAA,QACR,WAAY,YAAa,EAAG;AAAA;AAAA,MAFtB;AAAA,IAGP,CACC;AAAA,KACH;AAEF;AAEA,IAAO,6BAAQ,WAAY,CAAE,WAAY;AACxC,QAAM,EAAE,kBAAkB,IAAI,OAAQ,WAAY;AAClD,QAAM,EAAE,gBAAgB,IAAI,OAAQ,aAAc;AAElD,SAAO;AAAA;AAAA,IAEN,2BACC,kBAAkB,EAAE,uBAAuB;AAAA,IAC5C,WAAW,gBAAgB;AAAA,EAC5B;AACD,CAAE,EAAG,gBAAiB;",
6
6
  "names": []
7
7
  }
@@ -1,10 +1,11 @@
1
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
1
+ // packages/edit-post/src/components/welcome-guide/default.js
2
2
  import { useDispatch } from "@wordpress/data";
3
3
  import { ExternalLink, Guide } from "@wordpress/components";
4
4
  import { __ } from "@wordpress/i18n";
5
5
  import { createInterpolateElement } from "@wordpress/element";
6
6
  import WelcomeGuideImage from "./image";
7
7
  import { store as editPostStore } from "../../store";
8
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
8
9
  function WelcomeGuideDefault() {
9
10
  const { toggleFeature } = useDispatch(editPostStore);
10
11
  return /* @__PURE__ */ jsx(
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/welcome-guide/default.js"],
4
4
  "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useDispatch } from '@wordpress/data';\nimport { ExternalLink, Guide } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { createInterpolateElement } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport WelcomeGuideImage from './image';\nimport { store as editPostStore } from '../../store';\n\nexport default function WelcomeGuideDefault() {\n\tconst { toggleFeature } = useDispatch( editPostStore );\n\n\treturn (\n\t\t<Guide\n\t\t\tclassName=\"edit-post-welcome-guide\"\n\t\t\tcontentLabel={ __( 'Welcome to the editor' ) }\n\t\t\tfinishButtonText={ __( 'Get started' ) }\n\t\t\tonFinish={ () => toggleFeature( 'welcomeGuide' ) }\n\t\t\tpages={ [\n\t\t\t\t{\n\t\t\t\t\timage: (\n\t\t\t\t\t\t<WelcomeGuideImage\n\t\t\t\t\t\t\tnonAnimatedSrc=\"https://s.w.org/images/block-editor/welcome-canvas.svg\"\n\t\t\t\t\t\t\tanimatedSrc=\"https://s.w.org/images/block-editor/welcome-canvas.gif\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<h1 className=\"edit-post-welcome-guide__heading\">\n\t\t\t\t\t\t\t\t{ __( 'Welcome to the editor' ) }\n\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t<p className=\"edit-post-welcome-guide__text\">\n\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t'In the WordPress editor, each paragraph, image, or video is presented as a distinct \u201Cblock\u201D of content.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</>\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\timage: (\n\t\t\t\t\t\t<WelcomeGuideImage\n\t\t\t\t\t\t\tnonAnimatedSrc=\"https://s.w.org/images/block-editor/welcome-editor.svg\"\n\t\t\t\t\t\t\tanimatedSrc=\"https://s.w.org/images/block-editor/welcome-editor.gif\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<h1 className=\"edit-post-welcome-guide__heading\">\n\t\t\t\t\t\t\t\t{ __( 'Customize each block' ) }\n\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t<p className=\"edit-post-welcome-guide__text\">\n\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t'Each block comes with its own set of controls for changing things like color, width, and alignment. These will show and hide automatically when you have a block selected.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</>\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\timage: (\n\t\t\t\t\t\t<WelcomeGuideImage\n\t\t\t\t\t\t\tnonAnimatedSrc=\"https://s.w.org/images/block-editor/welcome-library.svg\"\n\t\t\t\t\t\t\tanimatedSrc=\"https://s.w.org/images/block-editor/welcome-library.gif\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<h1 className=\"edit-post-welcome-guide__heading\">\n\t\t\t\t\t\t\t\t{ __( 'Explore all blocks' ) }\n\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t<p className=\"edit-post-welcome-guide__text\">\n\t\t\t\t\t\t\t\t{ createInterpolateElement(\n\t\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t\t'All of the blocks available to you live in the block library. You\u2019ll find it wherever you see the <InserterIconImage /> icon.'\n\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\t\tInserterIconImage: (\n\t\t\t\t\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\t\t\t\t\talt={ __( 'inserter' ) }\n\t\t\t\t\t\t\t\t\t\t\t\tsrc=\"data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='18' height='18' rx='2' fill='%231E1E1E'/%3E%3Cpath d='M9.22727 4V14M4 8.77273H14' stroke='white' stroke-width='1.5'/%3E%3C/svg%3E%0A\"\n\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</p>\n\t\t\t\t\t\t</>\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\timage: (\n\t\t\t\t\t\t<WelcomeGuideImage\n\t\t\t\t\t\t\tnonAnimatedSrc=\"https://s.w.org/images/block-editor/welcome-documentation.svg\"\n\t\t\t\t\t\t\tanimatedSrc=\"https://s.w.org/images/block-editor/welcome-documentation.gif\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<h1 className=\"edit-post-welcome-guide__heading\">\n\t\t\t\t\t\t\t\t{ __( 'Learn more' ) }\n\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t<p className=\"edit-post-welcome-guide__text\">\n\t\t\t\t\t\t\t\t{ createInterpolateElement(\n\t\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t\t\"New to the block editor? Want to learn more about using it? <a>Here's a detailed guide.</a>\"\n\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\t\ta: (\n\t\t\t\t\t\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\t\t\t\t\t\thref={ __(\n\t\t\t\t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ACN;AAAA,oBACD;AAAA;AAAA,gBACD;AAAA,cAEF;AAAA,YACD,GACD;AAAA,aACD;AAAA,QAEF;AAAA,MACD;AAAA;AAAA,EACD;AAEF;",
6
6
  "names": []
7
7
  }
@@ -1,3 +1,4 @@
1
+ // packages/edit-post/src/components/welcome-guide/image.js
1
2
  import { jsx, jsxs } from "react/jsx-runtime";
2
3
  function WelcomeGuideImage({ nonAnimatedSrc, animatedSrc }) {
3
4
  return /* @__PURE__ */ jsxs("picture", { className: "edit-post-welcome-guide__image", children: [
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/welcome-guide/image.js"],
4
4
  "sourcesContent": ["export default function WelcomeGuideImage( { nonAnimatedSrc, animatedSrc } ) {\n\treturn (\n\t\t<picture className=\"edit-post-welcome-guide__image\">\n\t\t\t<source\n\t\t\t\tsrcSet={ nonAnimatedSrc }\n\t\t\t\tmedia=\"(prefers-reduced-motion: reduce)\"\n\t\t\t/>\n\t\t\t<img src={ animatedSrc } width=\"312\" height=\"240\" alt=\"\" />\n\t\t</picture>\n\t);\n}\n"],
5
- "mappings": "AAEE,SACC,KADD;AAFa,SAAR,kBAAoC,EAAE,gBAAgB,YAAY,GAAI;AAC5E,SACC,qBAAC,aAAQ,WAAU,kCAClB;AAAA;AAAA,MAAC;AAAA;AAAA,QACA,QAAS;AAAA,QACT,OAAM;AAAA;AAAA,IACP;AAAA,IACA,oBAAC,SAAI,KAAM,aAAc,OAAM,OAAM,QAAO,OAAM,KAAI,IAAG;AAAA,KAC1D;AAEF;",
5
+ "mappings": ";AAEE,SACC,KADD;AAFa,SAAR,kBAAoC,EAAE,gBAAgB,YAAY,GAAI;AAC5E,SACC,qBAAC,aAAQ,WAAU,kCAClB;AAAA;AAAA,MAAC;AAAA;AAAA,QACA,QAAS;AAAA,QACT,OAAM;AAAA;AAAA,IACP;AAAA,IACA,oBAAC,SAAI,KAAM,aAAc,OAAM,OAAM,QAAO,OAAM,KAAI,IAAG;AAAA,KAC1D;AAEF;",
6
6
  "names": []
7
7
  }
@@ -1,8 +1,9 @@
1
- import { jsx } from "react/jsx-runtime";
1
+ // packages/edit-post/src/components/welcome-guide/index.js
2
2
  import { useSelect } from "@wordpress/data";
3
3
  import WelcomeGuideDefault from "./default";
4
4
  import WelcomeGuideTemplate from "./template";
5
5
  import { store as editPostStore } from "../../store";
6
+ import { jsx } from "react/jsx-runtime";
6
7
  function WelcomeGuide({ postType }) {
7
8
  const { isActive, isEditingTemplate } = useSelect(
8
9
  (select) => {
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/welcome-guide/index.js"],
4
4
  "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport WelcomeGuideDefault from './default';\nimport WelcomeGuideTemplate from './template';\nimport { store as editPostStore } from '../../store';\n\nexport default function WelcomeGuide( { postType } ) {\n\tconst { isActive, isEditingTemplate } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { isFeatureActive } = select( editPostStore );\n\t\t\tconst _isEditingTemplate = postType === 'wp_template';\n\t\t\tconst feature = _isEditingTemplate\n\t\t\t\t? 'welcomeGuideTemplate'\n\t\t\t\t: 'welcomeGuide';\n\n\t\t\treturn {\n\t\t\t\tisActive: isFeatureActive( feature ),\n\t\t\t\tisEditingTemplate: _isEditingTemplate,\n\t\t\t};\n\t\t},\n\t\t[ postType ]\n\t);\n\n\tif ( ! isActive ) {\n\t\treturn null;\n\t}\n\n\treturn isEditingTemplate ? (\n\t\t<WelcomeGuideTemplate />\n\t) : (\n\t\t<WelcomeGuideDefault />\n\t);\n}\n"],
5
- "mappings": "AAkCE;AA/BF,SAAS,iBAAiB;AAK1B,OAAO,yBAAyB;AAChC,OAAO,0BAA0B;AACjC,SAAS,SAAS,qBAAqB;AAExB,SAAR,aAA+B,EAAE,SAAS,GAAI;AACpD,QAAM,EAAE,UAAU,kBAAkB,IAAI;AAAA,IACvC,CAAE,WAAY;AACb,YAAM,EAAE,gBAAgB,IAAI,OAAQ,aAAc;AAClD,YAAM,qBAAqB,aAAa;AACxC,YAAM,UAAU,qBACb,yBACA;AAEH,aAAO;AAAA,QACN,UAAU,gBAAiB,OAAQ;AAAA,QACnC,mBAAmB;AAAA,MACpB;AAAA,IACD;AAAA,IACA,CAAE,QAAS;AAAA,EACZ;AAEA,MAAK,CAAE,UAAW;AACjB,WAAO;AAAA,EACR;AAEA,SAAO,oBACN,oBAAC,wBAAqB,IAEtB,oBAAC,uBAAoB;AAEvB;",
5
+ "mappings": ";AAGA,SAAS,iBAAiB;AAK1B,OAAO,yBAAyB;AAChC,OAAO,0BAA0B;AACjC,SAAS,SAAS,qBAAqB;AAwBrC;AAtBa,SAAR,aAA+B,EAAE,SAAS,GAAI;AACpD,QAAM,EAAE,UAAU,kBAAkB,IAAI;AAAA,IACvC,CAAE,WAAY;AACb,YAAM,EAAE,gBAAgB,IAAI,OAAQ,aAAc;AAClD,YAAM,qBAAqB,aAAa;AACxC,YAAM,UAAU,qBACb,yBACA;AAEH,aAAO;AAAA,QACN,UAAU,gBAAiB,OAAQ;AAAA,QACnC,mBAAmB;AAAA,MACpB;AAAA,IACD;AAAA,IACA,CAAE,QAAS;AAAA,EACZ;AAEA,MAAK,CAAE,UAAW;AACjB,WAAO;AAAA,EACR;AAEA,SAAO,oBACN,oBAAC,wBAAqB,IAEtB,oBAAC,uBAAoB;AAEvB;",
6
6
  "names": []
7
7
  }
@@ -1,9 +1,10 @@
1
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
1
+ // packages/edit-post/src/components/welcome-guide/template.js
2
2
  import { useDispatch } from "@wordpress/data";
3
3
  import { Guide } from "@wordpress/components";
4
4
  import { __ } from "@wordpress/i18n";
5
5
  import WelcomeGuideImage from "./image";
6
6
  import { store as editPostStore } from "../../store";
7
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
7
8
  function WelcomeGuideTemplate() {
8
9
  const { toggleFeature } = useDispatch(editPostStore);
9
10
  return /* @__PURE__ */ jsx(
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/welcome-guide/template.js"],
4
4
  "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useDispatch } from '@wordpress/data';\nimport { Guide } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport WelcomeGuideImage from './image';\nimport { store as editPostStore } from '../../store';\n\nexport default function WelcomeGuideTemplate() {\n\tconst { toggleFeature } = useDispatch( editPostStore );\n\n\treturn (\n\t\t<Guide\n\t\t\tclassName=\"edit-template-welcome-guide\"\n\t\t\tcontentLabel={ __( 'Welcome to the template editor' ) }\n\t\t\tfinishButtonText={ __( 'Get started' ) }\n\t\t\tonFinish={ () => toggleFeature( 'welcomeGuideTemplate' ) }\n\t\t\tpages={ [\n\t\t\t\t{\n\t\t\t\t\timage: (\n\t\t\t\t\t\t<WelcomeGuideImage\n\t\t\t\t\t\t\tnonAnimatedSrc=\"https://s.w.org/images/block-editor/welcome-template-editor.svg\"\n\t\t\t\t\t\t\tanimatedSrc=\"https://s.w.org/images/block-editor/welcome-template-editor.gif\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<h1 className=\"edit-post-welcome-guide__heading\">\n\t\t\t\t\t\t\t\t{ __( 'Welcome to the template editor' ) }\n\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t<p className=\"edit-post-welcome-guide__text\">\n\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t'Templates help define the layout of the site. You can customize all aspects of your posts and pages using blocks and patterns in this editor.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</>\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t] }\n\t\t/>\n\t);\n}\n"],
5
- "mappings": "AAyBM,SAMA,UANA,KAMA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;AAAA,YACD,GACD;AAAA,aACD;AAAA,QAEF;AAAA,MACD;AAAA;AAAA,EACD;AAEF;",
6
6
  "names": []
7
7
  }
@@ -1,4 +1,4 @@
1
- import { jsx } from "react/jsx-runtime";
1
+ // packages/edit-post/src/deprecated.js
2
2
  import {
3
3
  privateApis as editorPrivateApis,
4
4
  PluginBlockSettingsMenuItem as EditorPluginBlockSettingsMenuItem,
@@ -13,11 +13,12 @@ import {
13
13
  import { getPath } from "@wordpress/url";
14
14
  import deprecated from "@wordpress/deprecated";
15
15
  import { unlock } from "./lock-unlock";
16
- const { PluginPostExcerpt } = unlock(editorPrivateApis);
17
- const isSiteEditor = getPath(window.location.href)?.includes(
16
+ import { jsx } from "react/jsx-runtime";
17
+ var { PluginPostExcerpt } = unlock(editorPrivateApis);
18
+ var isSiteEditor = getPath(window.location.href)?.includes(
18
19
  "site-editor.php"
19
20
  );
20
- const deprecateSlot = (name) => {
21
+ var deprecateSlot = (name) => {
21
22
  deprecated(`wp.editPost.${name}`, {
22
23
  since: "6.6",
23
24
  alternative: `wp.editor.${name}`
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../src/deprecated.js"],
4
4
  "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 { getPath } from '@wordpress/url';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from './lock-unlock';\nconst { PluginPostExcerpt } = unlock( editorPrivateApis );\n\nconst isSiteEditor = getPath( window.location.href )?.includes(\n\t'site-editor.php'\n);\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\tif ( isSiteEditor ) {\n\t\treturn null;\n\t}\n\tdeprecateSlot( 'PluginBlockSettingsMenuItem' );\n\treturn <EditorPluginBlockSettingsMenuItem { ...props } />;\n}\n\n/**\n * @see PluginDocumentSettingPanel in @wordpress/editor package.\n */\nexport function PluginDocumentSettingPanel( props ) {\n\tif ( isSiteEditor ) {\n\t\treturn null;\n\t}\n\tdeprecateSlot( 'PluginDocumentSettingPanel' );\n\treturn <EditorPluginDocumentSettingPanel { ...props } />;\n}\n\n/**\n * @see PluginMoreMenuItem in @wordpress/editor package.\n */\nexport function PluginMoreMenuItem( props ) {\n\tif ( isSiteEditor ) {\n\t\treturn null;\n\t}\n\tdeprecateSlot( 'PluginMoreMenuItem' );\n\treturn <EditorPluginMoreMenuItem { ...props } />;\n}\n\n/**\n * @see PluginPrePublishPanel in @wordpress/editor package.\n */\nexport function PluginPrePublishPanel( props ) {\n\tif ( isSiteEditor ) {\n\t\treturn null;\n\t}\n\tdeprecateSlot( 'PluginPrePublishPanel' );\n\treturn <EditorPluginPrePublishPanel { ...props } />;\n}\n\n/**\n * @see PluginPostPublishPanel in @wordpress/editor package.\n */\nexport function PluginPostPublishPanel( props ) {\n\tif ( isSiteEditor ) {\n\t\treturn null;\n\t}\n\tdeprecateSlot( 'PluginPostPublishPanel' );\n\treturn <EditorPluginPostPublishPanel { ...props } />;\n}\n\n/**\n * @see PluginPostStatusInfo in @wordpress/editor package.\n */\nexport function PluginPostStatusInfo( props ) {\n\tif ( isSiteEditor ) {\n\t\treturn null;\n\t}\n\tdeprecateSlot( 'PluginPostStatusInfo' );\n\treturn <EditorPluginPostStatusInfo { ...props } />;\n}\n\n/**\n * @see PluginSidebar in @wordpress/editor package.\n */\nexport function PluginSidebar( props ) {\n\tif ( isSiteEditor ) {\n\t\treturn null;\n\t}\n\tdeprecateSlot( 'PluginSidebar' );\n\treturn <EditorPluginSidebar { ...props } />;\n}\n\n/**\n * @see PluginSidebarMoreMenuItem in @wordpress/editor package.\n */\nexport function PluginSidebarMoreMenuItem( props ) {\n\tif ( isSiteEditor ) {\n\t\treturn null;\n\t}\n\tdeprecateSlot( 'PluginSidebarMoreMenuItem' );\n\treturn <EditorPluginSidebarMoreMenuItem { ...props } />;\n}\n\n/**\n * @see PluginPostExcerpt in @wordpress/editor package.\n */\nexport function __experimentalPluginPostExcerpt() {\n\tif ( isSiteEditor ) {\n\t\treturn null;\n\t}\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"],
5
- "mappings": "AA2CQ;AAxCR;AAAA,EACC,eAAe;AAAA,EACf,+BAA+B;AAAA,EAC/B,8BAA8B;AAAA,EAC9B,sBAAsB;AAAA,EACtB,yBAAyB;AAAA,EACzB,0BAA0B;AAAA,EAC1B,wBAAwB;AAAA,EACxB,iBAAiB;AAAA,EACjB,6BAA6B;AAAA,OACvB;AACP,SAAS,eAAe;AACxB,OAAO,gBAAgB;AAKvB,SAAS,cAAc;AACvB,MAAM,EAAE,kBAAkB,IAAI,OAAQ,iBAAkB;AAExD,MAAM,eAAe,QAAS,OAAO,SAAS,IAAK,GAAG;AAAA,EACrD;AACD;AAEA,MAAM,gBAAgB,CAAE,SAAU;AACjC,aAAY,eAAgB,IAAK,IAAI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WAAO;AAAA,EACR;AACA,gBAAe,wBAAyB;AACxC,SAAO,oBAAC,gCAA+B,GAAG,OAAQ;AACnD;AAKO,SAAS,qBAAsB,OAAQ;AAC7C,MAAK,cAAe;AACnB,WAAO;AAAA,EACR;AACA,gBAAe,sBAAuB;AACtC,SAAO,oBAAC,8BAA6B,GAAG,OAAQ;AACjD;AAKO,SAAS,cAAe,OAAQ;AACtC,MAAK,cAAe;AACnB,WAAO;AAAA,EACR;AACA,gBAAe,eAAgB;AAC/B,SAAO,oBAAC,uBAAsB,GAAG,OAAQ;AAC1C;AAKO,SAAS,0BAA2B,OAAQ;AAClD,MAAK,cAAe;AACnB,WAAO;AAAA,EACR;AACA,gBAAe,2BAA4B;AAC3C,SAAO,oBAAC,mCAAkC,GAAG,OAAQ;AACtD;AAKO,SAAS,kCAAkC;AACjD,MAAK,cAAe;AACnB,WAAO;AAAA,EACR;AACA,aAAY,+CAA+C;AAAA,IAC1D,OAAO;AAAA,IACP,MAAM;AAAA,IACN,MAAM;AAAA,EACP,CAAE;AACF,SAAO;AACR;",
6
6
  "names": []
7
7
  }
@@ -1,3 +1,4 @@
1
+ // packages/edit-post/src/hooks/use-navigate-to-entity-record.js
1
2
  import { useCallback, useReducer } from "@wordpress/element";
2
3
  import { useSelect, useDispatch } from "@wordpress/data";
3
4
  import { store as editorStore } from "@wordpress/editor";
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/hooks/use-navigate-to-entity-record.js"],
4
4
  "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useCallback, useReducer } from '@wordpress/element';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as editorStore } from '@wordpress/editor';\n\n/**\n * A hook that records the 'entity' history in the post editor as a user\n * navigates between editing a post and editing the post template or patterns.\n *\n * Implemented as a stack, so a little similar to the browser history API.\n *\n * Used to control displaying UI elements like the back button.\n *\n * @param {number} initialPostId The post id of the post when the editor loaded.\n * @param {string} initialPostType The post type of the post when the editor loaded.\n * @param {string} defaultRenderingMode The rendering mode to switch to when navigating.\n *\n * @return {Object} An object containing the `currentPost` variable and\n * `onNavigateToEntityRecord` and `onNavigateToPreviousEntityRecord` functions.\n */\nexport default function useNavigateToEntityRecord(\n\tinitialPostId,\n\tinitialPostType,\n\tdefaultRenderingMode\n) {\n\tconst [ postHistory, dispatch ] = useReducer(\n\t\t( historyState, { type, post, previousRenderingMode } ) => {\n\t\t\tif ( type === 'push' ) {\n\t\t\t\treturn [ ...historyState, { post, previousRenderingMode } ];\n\t\t\t}\n\t\t\tif ( type === 'pop' ) {\n\t\t\t\t// Try to leave one item in the history.\n\t\t\t\tif ( historyState.length > 1 ) {\n\t\t\t\t\treturn historyState.slice( 0, -1 );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn historyState;\n\t\t},\n\t\t[\n\t\t\t{\n\t\t\t\tpost: { postId: initialPostId, postType: initialPostType },\n\t\t\t},\n\t\t]\n\t);\n\n\tconst { post, previousRenderingMode } =\n\t\tpostHistory[ postHistory.length - 1 ];\n\n\tconst { getRenderingMode } = useSelect( editorStore );\n\tconst { setRenderingMode } = useDispatch( editorStore );\n\n\tconst onNavigateToEntityRecord = useCallback(\n\t\t( params ) => {\n\t\t\tdispatch( {\n\t\t\t\ttype: 'push',\n\t\t\t\tpost: { postId: params.postId, postType: params.postType },\n\t\t\t\t// Save the current rendering mode so we can restore it when navigating back.\n\t\t\t\tpreviousRenderingMode: getRenderingMode(),\n\t\t\t} );\n\t\t\tsetRenderingMode( defaultRenderingMode );\n\t\t},\n\t\t[ getRenderingMode, setRenderingMode, defaultRenderingMode ]\n\t);\n\n\tconst onNavigateToPreviousEntityRecord = useCallback( () => {\n\t\tdispatch( { type: 'pop' } );\n\t\tif ( previousRenderingMode ) {\n\t\t\tsetRenderingMode( previousRenderingMode );\n\t\t}\n\t}, [ setRenderingMode, previousRenderingMode ] );\n\n\treturn {\n\t\tcurrentPost: post,\n\t\tonNavigateToEntityRecord,\n\t\tonNavigateToPreviousE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M,MAAM,CAAE;AAC1B,QAAK,uBAAwB;AAC5B,uBAAkB,qBAAsB;AAAA,IACzC;AAAA,EACD,GAAG,CAAE,kBAAkB,qBAAsB,CAAE;AAE/C,SAAO;AAAA,IACN,aAAa;AAAA,IACb;AAAA,IACA,kCACC,YAAY,SAAS,IAClB,mCACA;AAAA,EACL;AACD;",
6
6
  "names": ["post", "previousRenderingMode"]
7
7
  }
@@ -1,4 +1,4 @@
1
- import { jsx } from "react/jsx-runtime";
1
+ // packages/edit-post/src/index.js
2
2
  import { store as blocksStore } from "@wordpress/blocks";
3
3
  import {
4
4
  registerCoreBlocks,
@@ -18,7 +18,11 @@ import {
18
18
  } from "@wordpress/editor";
19
19
  import Layout from "./components/layout";
20
20
  import { unlock } from "./lock-unlock";
21
- const {
21
+ import { default as default2 } from "./components/back-button/fullscreen-mode-close";
22
+ import { store } from "./store";
23
+ export * from "./deprecated";
24
+ import { jsx } from "react/jsx-runtime";
25
+ var {
22
26
  BackButton: __experimentalMainDashboardButton,
23
27
  registerCoreBlockBindingsSources
24
28
  } = unlock(editorPrivateApis);
@@ -108,9 +112,6 @@ function reinitializeEditor() {
108
112
  version: "6.3"
109
113
  });
110
114
  }
111
- import { default as default2 } from "./components/back-button/fullscreen-mode-close";
112
- import { store } from "./store";
113
- export * from "./deprecated";
114
115
  export {
115
116
  default2 as __experimentalFullscreenModeClose,
116
117
  __experimentalMainDashboardButton,
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../src/index.js"],
4
4
  "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, StrictMode } 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\tstore as editorStore,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport Layout from './components/layout';\nimport { unlock } from './lock-unlock';\n\nconst {\n\tBackButton: __experimentalMainDashboardButton,\n\tregisterCoreBlockBindingsSources,\n} = unlock( 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\teditorTool: 'edit',\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\tenableChoosePatternModal: true,\n\t\tisPublishSidebarEnabled: true,\n\t} );\n\n\tif ( window.__experimentalMediaProcessing ) {\n\t\tdispatch( preferencesStore ).setDefaults( 'core/media', {\n\t\t\trequireApproval: true,\n\t\t\toptimizeOnUpload: true,\n\t\t} );\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\tregisterCoreBlockBindingsSources();\n\tregisterLegacyWidgetBlock( { inserter: false } );\n\tregisterWidgetGroupBlock( { inserter: false } );\n\tif ( globalThis.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<StrictMode>\n\t\t\t<Layout\n\t\t\t\tsettings={ settings }\n\t\t\t\tpostId={ postId }\n\t\t\t\tpostType={ postType }\n\t\t\t\tinitialEdits={ initialEdits }\n\t\t\t/>\n\t\t</StrictMode>\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/back-button/fullscreen-mode-close';\nexport { __experimentalMainDashboardButton };\nexport { store } from './store';\nexport * from './deprecated';\n"],
5
- "mappings": "AAwJG;AArJH,SAAS,SAAS,mBAAmB;AACrC;AAAA,EACC;AAAA,EACA;AAAA,OACM;AACP,OAAO,gBAAgB;AACvB,SAAS,YAAY,kBAAkB;AACvC,SAAS,UAAU,cAAc;AACjC,SAAS,SAAS,wBAAwB;AAC1C;AAAA,EACC;AAAA,EACA;AAAA,OACM;AACP;AAAA,EACC,SAAS;AAAA,EACT,eAAe;AAAA,OACT;AAKP,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,2BAA0B,EAAE,UAAU,MAAM,CAAE;AAC9C,MAAK,WAAW,qBAAsB;AACrC,iDAA8C;AAAA,MAC7C,iBAAiB,SAAS;AAAA,IAC3B,CAAE;AAAA,EACH;AAGA,QAAM,eACL,SAAS,eAAe,eAAe,cAAc;AACtD,MAAK,iBAAiB,aAAc;AAEnC,YAAQ;AAAA,MACP;AAAA,IACD;AAAA,EACD;AASA,QAAM,WAAW,OAAO,UAAU,UAAU,QAAS,QAAS,MAAM;AACpE,MAAK,UAAW;AACf,WAAO,iBAAkB,UAAU,CAAE,UAAW;AAC/C,YAAM,wBAAwB,SAAS;AAAA,QACtC;AAAA,MACD,EAAG,CAAE;AACL,UAAK,MAAM,WAAW,UAAW;AAGhC,YAAK,OAAO,UAAU,KAAM;AAC3B,gCAAsB,YACrB,sBAAsB,YAAY,OAAO;AAAA,QAC3C;AAEA,YACC,SAAS,uBAAwB,gBAAiB,EAAG,CAAE,GACtD;AACD,iBAAO,SAAU,GAAG,CAAE;AAAA,QACvB;AAAA,MACD;AAAA,IACD,CAAE;AAAA,EACH;AAGA,SAAO,iBAAkB,YAAY,CAAE,MAAO,EAAE,eAAe,GAAG,KAAM;AACxE,SAAO,iBAAkB,QAAQ,CAAE,MAAO,EAAE,eAAe,GAAG,KAAM;AAEpE,OAAK;AAAA,IACJ,oBAAC,cACA;AAAA,MAAC;AAAA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA;AAAA,IACD,GACD;AAAA,EACD;AAEA,SAAO;AACR;AAKO,SAAS,qBAAqB;AACpC,aAAY,kCAAkC;AAAA,IAC7C,OAAO;AAAA,IACP,SAAS;AAAA,EACV,CAAE;AACH;",
6
6
  "names": ["default"]
7
7
  }
@@ -1,5 +1,6 @@
1
+ // packages/edit-post/src/lock-unlock.js
1
2
  import { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from "@wordpress/private-apis";
2
- const { lock, unlock } = __dangerousOptInToUnstableAPIsOnlyForCoreModules(
3
+ var { lock, unlock } = __dangerousOptInToUnstableAPIsOnlyForCoreModules(
3
4
  "I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.",
4
5
  "@wordpress/edit-post"
5
6
  );
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../src/lock-unlock.js"],
4
4
  "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/private-apis';\n\nexport const { lock, unlock } =\n\t__dangerousOptInToUnstableAPIsOnlyForCoreModules(\n\t\t'I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.',\n\t\t'@wordpress/edit-post'\n\t);\n"],
5
- "mappings": "AAGA,SAAS,wDAAwD;AAE1D,MAAM,EAAE,MAAM,OAAO,IAC3B;AAAA,EACC;AAAA,EACA;AACD;",
5
+ "mappings": ";AAGA,SAAS,wDAAwD;AAE1D,IAAM,EAAE,MAAM,OAAO,IAC3B;AAAA,EACC;AAAA,EACA;AACD;",
6
6
  "names": []
7
7
  }
@@ -1,3 +1,4 @@
1
+ // packages/edit-post/src/store/actions.js
1
2
  import apiFetch from "@wordpress/api-fetch";
2
3
  import { store as preferencesStore } from "@wordpress/preferences";
3
4
  import {
@@ -11,76 +12,76 @@ import { store as noticesStore } from "@wordpress/notices";
11
12
  import { __ } from "@wordpress/i18n";
12
13
  import { getMetaBoxContainer } from "../utils/meta-boxes";
13
14
  import { unlock } from "../lock-unlock";
14
- const { interfaceStore } = unlock(editorPrivateApis);
15
- const openGeneralSidebar = (name) => ({ registry }) => {
15
+ var { interfaceStore } = unlock(editorPrivateApis);
16
+ var openGeneralSidebar = (name) => ({ registry }) => {
16
17
  registry.dispatch(interfaceStore).enableComplementaryArea("core", name);
17
18
  };
18
- const closeGeneralSidebar = () => ({ registry }) => registry.dispatch(interfaceStore).disableComplementaryArea("core");
19
- const openModal = (name) => ({ registry }) => {
19
+ var closeGeneralSidebar = () => ({ registry }) => registry.dispatch(interfaceStore).disableComplementaryArea("core");
20
+ var openModal = (name) => ({ registry }) => {
20
21
  deprecated("select( 'core/edit-post' ).openModal( name )", {
21
22
  since: "6.3",
22
23
  alternative: "select( 'core/interface').openModal( name )"
23
24
  });
24
25
  return registry.dispatch(interfaceStore).openModal(name);
25
26
  };
26
- const closeModal = () => ({ registry }) => {
27
+ var closeModal = () => ({ registry }) => {
27
28
  deprecated("select( 'core/edit-post' ).closeModal()", {
28
29
  since: "6.3",
29
30
  alternative: "select( 'core/interface').closeModal()"
30
31
  });
31
32
  return registry.dispatch(interfaceStore).closeModal();
32
33
  };
33
- const openPublishSidebar = () => ({ registry }) => {
34
+ var openPublishSidebar = () => ({ registry }) => {
34
35
  deprecated("dispatch( 'core/edit-post' ).openPublishSidebar", {
35
36
  since: "6.6",
36
37
  alternative: "dispatch( 'core/editor').openPublishSidebar"
37
38
  });
38
39
  registry.dispatch(editorStore).openPublishSidebar();
39
40
  };
40
- const closePublishSidebar = () => ({ registry }) => {
41
+ var closePublishSidebar = () => ({ registry }) => {
41
42
  deprecated("dispatch( 'core/edit-post' ).closePublishSidebar", {
42
43
  since: "6.6",
43
44
  alternative: "dispatch( 'core/editor').closePublishSidebar"
44
45
  });
45
46
  registry.dispatch(editorStore).closePublishSidebar();
46
47
  };
47
- const togglePublishSidebar = () => ({ registry }) => {
48
+ var togglePublishSidebar = () => ({ registry }) => {
48
49
  deprecated("dispatch( 'core/edit-post' ).togglePublishSidebar", {
49
50
  since: "6.6",
50
51
  alternative: "dispatch( 'core/editor').togglePublishSidebar"
51
52
  });
52
53
  registry.dispatch(editorStore).togglePublishSidebar();
53
54
  };
54
- const toggleEditorPanelEnabled = (panelName) => ({ registry }) => {
55
+ var toggleEditorPanelEnabled = (panelName) => ({ registry }) => {
55
56
  deprecated("dispatch( 'core/edit-post' ).toggleEditorPanelEnabled", {
56
57
  since: "6.5",
57
58
  alternative: "dispatch( 'core/editor').toggleEditorPanelEnabled"
58
59
  });
59
60
  registry.dispatch(editorStore).toggleEditorPanelEnabled(panelName);
60
61
  };
61
- const toggleEditorPanelOpened = (panelName) => ({ registry }) => {
62
+ var toggleEditorPanelOpened = (panelName) => ({ registry }) => {
62
63
  deprecated("dispatch( 'core/edit-post' ).toggleEditorPanelOpened", {
63
64
  since: "6.5",
64
65
  alternative: "dispatch( 'core/editor').toggleEditorPanelOpened"
65
66
  });
66
67
  registry.dispatch(editorStore).toggleEditorPanelOpened(panelName);
67
68
  };
68
- const removeEditorPanel = (panelName) => ({ registry }) => {
69
+ var removeEditorPanel = (panelName) => ({ registry }) => {
69
70
  deprecated("dispatch( 'core/edit-post' ).removeEditorPanel", {
70
71
  since: "6.5",
71
72
  alternative: "dispatch( 'core/editor').removeEditorPanel"
72
73
  });
73
74
  registry.dispatch(editorStore).removeEditorPanel(panelName);
74
75
  };
75
- const toggleFeature = (feature) => ({ registry }) => registry.dispatch(preferencesStore).toggle("core/edit-post", feature);
76
- const switchEditorMode = (mode) => ({ registry }) => {
76
+ var toggleFeature = (feature) => ({ registry }) => registry.dispatch(preferencesStore).toggle("core/edit-post", feature);
77
+ var switchEditorMode = (mode) => ({ registry }) => {
77
78
  deprecated("dispatch( 'core/edit-post' ).switchEditorMode", {
78
79
  since: "6.6",
79
80
  alternative: "dispatch( 'core/editor').switchEditorMode"
80
81
  });
81
82
  registry.dispatch(editorStore).switchEditorMode(mode);
82
83
  };
83
- const togglePinnedPluginItem = (pluginName) => ({ registry }) => {
84
+ var togglePinnedPluginItem = (pluginName) => ({ registry }) => {
84
85
  const isPinned = registry.select(interfaceStore).isItemPinned("core", pluginName);
85
86
  registry.dispatch(interfaceStore)[isPinned ? "unpinItem" : "pinItem"]("core", pluginName);
86
87
  };
@@ -91,10 +92,10 @@ function updatePreferredStyleVariations() {
91
92
  });
92
93
  return { type: "NOTHING" };
93
94
  }
94
- const showBlockTypes = (blockNames) => ({ registry }) => {
95
+ var showBlockTypes = (blockNames) => ({ registry }) => {
95
96
  unlock(registry.dispatch(editorStore)).showBlockTypes(blockNames);
96
97
  };
97
- const hideBlockTypes = (blockNames) => ({ registry }) => {
98
+ var hideBlockTypes = (blockNames) => ({ registry }) => {
98
99
  unlock(registry.dispatch(editorStore)).hideBlockTypes(blockNames);
99
100
  };
100
101
  function setAvailableMetaBoxesPerLocation(metaBoxesPerLocation) {
@@ -103,7 +104,7 @@ function setAvailableMetaBoxesPerLocation(metaBoxesPerLocation) {
103
104
  metaBoxesPerLocation
104
105
  };
105
106
  }
106
- const requestMetaBoxUpdates = () => async ({ registry, select, dispatch }) => {
107
+ var requestMetaBoxUpdates = () => async ({ registry, select, dispatch }) => {
107
108
  dispatch({
108
109
  type: "REQUEST_META_BOX_UPDATES"
109
110
  });
@@ -160,7 +161,7 @@ function metaBoxUpdatesFailure() {
160
161
  type: "META_BOX_UPDATES_FAILURE"
161
162
  };
162
163
  }
163
- const __experimentalSetPreviewDeviceType = (deviceType) => ({ registry }) => {
164
+ var __experimentalSetPreviewDeviceType = (deviceType) => ({ registry }) => {
164
165
  deprecated(
165
166
  "dispatch( 'core/edit-post' ).__experimentalSetPreviewDeviceType",
166
167
  {
@@ -171,14 +172,14 @@ const __experimentalSetPreviewDeviceType = (deviceType) => ({ registry }) => {
171
172
  );
172
173
  registry.dispatch(editorStore).setDeviceType(deviceType);
173
174
  };
174
- const setIsInserterOpened = (value) => ({ registry }) => {
175
+ var setIsInserterOpened = (value) => ({ registry }) => {
175
176
  deprecated("dispatch( 'core/edit-post' ).setIsInserterOpened", {
176
177
  since: "6.5",
177
178
  alternative: "dispatch( 'core/editor').setIsInserterOpened"
178
179
  });
179
180
  registry.dispatch(editorStore).setIsInserterOpened(value);
180
181
  };
181
- const setIsListViewOpened = (isOpen) => ({ registry }) => {
182
+ var setIsListViewOpened = (isOpen) => ({ registry }) => {
182
183
  deprecated("dispatch( 'core/edit-post' ).setIsListViewOpened", {
183
184
  since: "6.5",
184
185
  alternative: "dispatch( 'core/editor').setIsListViewOpened"
@@ -198,8 +199,8 @@ function __unstableCreateTemplate() {
198
199
  });
199
200
  return { type: "NOTHING" };
200
201
  }
201
- let metaBoxesInitialized = false;
202
- const initializeMetaBoxes = () => ({ registry, select, dispatch }) => {
202
+ var metaBoxesInitialized = false;
203
+ var initializeMetaBoxes = () => ({ registry, select, dispatch }) => {
203
204
  const isEditorReady = registry.select(editorStore).__unstableIsEditorReady();
204
205
  if (!isEditorReady) {
205
206
  return;
@@ -225,14 +226,14 @@ const initializeMetaBoxes = () => ({ registry, select, dispatch }) => {
225
226
  type: "META_BOXES_INITIALIZED"
226
227
  });
227
228
  };
228
- const toggleDistractionFree = () => ({ registry }) => {
229
+ var toggleDistractionFree = () => ({ registry }) => {
229
230
  deprecated("dispatch( 'core/edit-post' ).toggleDistractionFree", {
230
231
  since: "6.6",
231
232
  alternative: "dispatch( 'core/editor').toggleDistractionFree"
232
233
  });
233
234
  registry.dispatch(editorStore).toggleDistractionFree();
234
235
  };
235
- const toggleFullscreenMode = () => ({ registry }) => {
236
+ var toggleFullscreenMode = () => ({ registry }) => {
236
237
  const isFullscreen = registry.select(preferencesStore).get("core/edit-post", "fullscreenMode");
237
238
  registry.dispatch(preferencesStore).toggle("core/edit-post", "fullscreenMode");
238
239
  registry.dispatch(noticesStore).createInfoNotice(
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/store/actions.js"],
4
4
  "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport apiFetch from '@wordpress/api-fetch';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport {\n\tstore as editorStore,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\nimport deprecated from '@wordpress/deprecated';\nimport { addAction } from '@wordpress/hooks';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { getMetaBoxContainer } from '../utils/meta-boxes';\nimport { unlock } from '../lock-unlock';\n\nconst { interfaceStore } = unlock( editorPrivateApis );\n\n/**\n * Returns an action object used in signalling that the user opened an editor sidebar.\n *\n * @param {?string} name Sidebar name to be opened.\n */\nexport const openGeneralSidebar =\n\t( name ) =>\n\t( { registry } ) => {\n\t\tregistry\n\t\t\t.dispatch( interfaceStore )\n\t\t\t.enableComplementaryArea( 'core', name );\n\t};\n\n/**\n * Returns an action object signalling that the user closed the sidebar.\n */\nexport const closeGeneralSidebar =\n\t() =>\n\t( { registry } ) =>\n\t\tregistry.dispatch( interfaceStore ).disableComplementaryArea( 'core' );\n\n/**\n * Returns an action object used in signalling that the user opened a modal.\n *\n * @deprecated since WP 6.3 use `core/interface` store's action with the same name instead.\n *\n *\n * @param {string} name A string that uniquely identifies the modal.\n *\n * @return {Object} Action object.\n */\nexport const openModal =\n\t( name ) =>\n\t( { registry } ) => {\n\t\tdeprecated( \"select( 'core/edit-post' ).openModal( name )\", {\n\t\t\tsince: '6.3',\n\t\t\talternative: \"select( 'core/interface').openModal( name )\",\n\t\t} );\n\t\treturn registry.dispatch( interfaceStore ).openModal( name );\n\t};\n\n/**\n * Returns an action object signalling that the user closed a modal.\n *\n * @deprecated since WP 6.3 use `core/interface` store's action with the same name instead.\n *\n * @return {Object} Action object.\n */\nexport const closeModal =\n\t() =>\n\t( { registry } ) => {\n\t\tdeprecated( \"select( 'core/edit-post' ).closeModal()\", {\n\t\t\tsince: '6.3',\n\t\t\talternative: \"select( 'core/interface').closeModal()\",\n\t\t} );\n\t\treturn registry.dispatch( interfaceStore ).closeModal();\n\t};\n\n/**\n * Returns an action object used in signalling that the user opened the publish\n * sidebar.\n * @deprecated\n *\n * @return {Object} Action object\n */\nexport const openPublishSidebar =\n\t() =>\n\t( { registry } ) => {\n\t\tdeprecated( \"dispatch( 'core/edit-post' ).openPublishSidebar\", {\n\t\t\tsince: '6.6',\n\t\t\talternative: \"dispatch( 'core/editor').openPublishSidebar\",\n\t\t} );\n\t\tregistry.dispatch( editorStore ).openPublishSidebar();\n\t};\n\n/**\n * Returns an action object used in signalling that the user closed the\n * publish sidebar.\n * @deprecated\n *\n * @return {Object} Action object.\n */\nexport const closePublishSidebar =\n\t() =>\n\t( { registry } ) => {\n\t\tdeprecated( \"dispatch( 'core/edit-post' ).closePublishSidebar\", {\n\t\t\tsince: '6.6',\n\t\t\talternative: \"dispatch( 'core/editor').closePublishSidebar\",\n\t\t} );\n\t\tregistry.dispatch( editorStore ).closePublishSidebar();\n\t};\n\n/**\n * Returns an action object used in signalling that the user toggles the publish sidebar.\n * @deprecated\n *\n * @return {Object} Action object\n */\nexport const togglePublishSidebar =\n\t() =>\n\t( { registry } ) => {\n\t\tdeprecated( \"dispatch( 'core/edit-post' ).togglePublishSidebar\", {\n\t\t\tsince: '6.6',\n\t\t\talternative: \"dispatch( 'core/editor').togglePublishSidebar\",\n\t\t} );\n\t\tregistry.dispatch( editorStore ).togglePublishSidebar();\n\t};\n\n/**\n * Returns an action object used to enable or disable a panel in the editor.\n *\n * @deprecated\n *\n * @param {string} panelName A string that identifies the panel to enable or disable.\n *\n * @return {Object} Action object.\n */\nexport const toggleEditorPanelEnabled =\n\t( panelName ) =>\n\t( { registry } ) => {\n\t\tdeprecated( \"dispatch( 'core/edit-post' ).toggleEditorPanelEnabled\", {\n\t\t\tsince: '6.5',\n\t\t\talternative: \"dispatch( 'core/editor').toggleEditorPanelEnabled\",\n\t\t} );\n\t\tregistry.dispatch( editorStore ).toggleEditorPanelEnabled( panelName );\n\t};\n\n/**\n * Opens a closed panel and closes an open panel.\n *\n * @deprecated\n *\n * @param {string} panelName A string that identifies the panel to open or close.\n */\nexport const toggleEditorPanelOpened =\n\t( panelName ) =>\n\t( { registry } ) => {\n\t\tdeprecated( \"dispatch( 'core/edit-post' ).toggleEditorPanelOpened\", {\n\t\t\tsince: '6.5',\n\t\t\talternative: \"dispatch( 'core/editor').toggleEditorPanelOpened\",\n\t\t} );\n\t\tregistry.dispatch( editorStore ).toggleEditorPanelOpened( panelName );\n\t};\n\n/**\n * Returns an action object used to remove a panel from the editor.\n *\n * @deprecated\n *\n * @param {string} panelName A string that identifies the panel to remove.\n *\n * @return {Object} Action object.\n */\nexport const removeEditorPanel =\n\t( panelName ) =>\n\t( { registry } ) => {\n\t\tdeprecated( \"dispatch( 'core/edit-post' ).removeEditorPanel\", {\n\t\t\tsince: '6.5',\n\t\t\talternative: \"dispatch( 'core/editor').removeEditorPanel\",\n\t\t} );\n\t\tregistry.dispatch( editorStore ).removeEditorPanel( panelName );\n\t};\n\n/**\n * Triggers an action used to toggle a feature flag.\n *\n * @param {string} feature Feature name.\n */\nexport const toggleFeature =\n\t( feature ) =>\n\t( { registry } ) =>\n\t\tregistry\n\t\t\t.dispatch( preferencesStore )\n\t\t\t.toggle( 'core/edit-post', feature );\n\n/**\n * Triggers an action used to switch editor mode.\n *\n * @deprecated\n *\n * @param {string} mode The editor mode.\n */\nexport const switchEditorMode =\n\t( mode ) =>\n\t( { registry } ) => {\n\t\tdeprecated( \"dispatch( 'core/edit-post' ).switchEditorMode\", {\n\t\t\tsince: '6.6',\n\t\t\talternative: \"dispatch( 'core/editor').switchEditorMode\",\n\t\t} );\n\t\tregistry.dispatch( editorStore ).switchEditorMode( mode );\n\t};\n\n/**\n * Triggers an action object used to toggle a plugin name flag.\n *\n * @param {string} pluginName Plugin name.\n */\nexport const togglePinnedPluginItem =\n\t( pluginName ) =>\n\t( { registry } ) => {\n\t\tconst isPinned = registry\n\t\t\t.select( interfaceStore )\n\t\t\t.isItemPinned( 'core', pluginName );\n\n\t\tregistry\n\t\t\t.dispatch( interfaceStore )\n\t\t\t[ isPinned ? 'unpinItem' : 'pinItem' ]( 'core', pluginName );\n\t};\n\n/**\n * Returns an action object used in signaling that a style should be auto-applied when a block is created.\n *\n * @deprecated\n */\nexport function updatePreferredStyleVariations() {\n\tdeprecated( \"dispatch( 'core/edit-post' ).updatePreferredStyleVariations\", {\n\t\tsince: '6.6',\n\t\thint: 'Preferred Style Variations are not supported anymore.',\n\t} );\n\treturn { type: 'NOTHING' };\n}\n\n/**\n * Update the provided block types to be visible.\n *\n * @param {string[]} blockNames Names of block types to show.\n */\nexport const showBlockTypes =\n\t( blockNames ) =>\n\t( { registry } ) => {\n\t\tunlock( registry.dispatch( editorStore ) ).showBlockTypes( blockNames );\n\t};\n\n/**\n * Update the provided block types to be hidden.\n *\n * @param {string[]} blockNames Names of block types to hide.\n */\nexport const hideBlockTypes =\n\t( blockNames ) =>\n\t( { registry } ) => {\n\t\tunlock( registry.dispatch( editorStore ) ).hideBlockTypes( blockNames );\n\t};\n\n/**\n * Stores info about which Meta boxes are available in which location.\n *\n * @param {Object} metaBoxesPerLocation Meta boxes per location.\n */\nexport function setAvailableMetaBoxesPerLocation( metaBoxesPerLocation ) {\n\treturn {\n\t\ttype: 'SET_META_BOXES_PER_LOCATIONS',\n\t\tmetaBoxesPerLocation,\n\t};\n}\n\n/**\n * Update a metabox.\n */\nexport const requestMetaBoxUpdates =\n\t() =>\n\tasync ( { registry, select, dispatch } ) => {\n\t\tdispatch( {\n\t\t\ttype: 'REQUEST_META_BOX_UPDATES',\n\t\t} );\n\n\t\t// Saves the wp_editor fields.\n\t\tif ( window.tinyMCE ) {\n\t\t\twindow.tinyMCE.triggerSave();\n\t\t}\n\n\t\t// We gather the base form data.\n\t\tconst baseFormData = new window.FormData(\n\t\t\tdocument.querySelector( '.metabox-base-form' )\n\t\t);\n\n\t\tconst postId = baseFormData.get( 'post_ID' );\n\t\tconst postType = baseFormData.get( 'post_type' );\n\n\t\t// Additional data needed for backward compatibility.\n\t\t// If we do not provide this data, the post will be overridden with the default values.\n\t\t// We cannot rely on getCurrentPost because right now on the editor we may be editing a pattern or a template.\n\t\t// We need to retrieve the post that the base form data is referring to.\n\t\tconst post = registry\n\t\t\t.select( coreStore )\n\t\t\t.getEditedEntityRecord( 'postType', postType, postId );\n\t\tconst additionalData = [\n\t\t\tpost.comment_status\n\t\t\t\t? [ 'comment_status', post.comment_status ]\n\t\t\t\t: false,\n\t\t\tpost.ping_status ? [ 'ping_status', post.ping_status ] : false,\n\t\t\tpost.sticky ? [ 'sticky', post.sticky ] : false,\n\t\t\tpost.author ? [ 'post_author', post.author ] : false,\n\t\t].filter( Boolean );\n\n\t\t// We gather all the metaboxes locations.\n\t\tconst activeMetaBoxLocations = select.getActiveMetaBoxLocations();\n\t\tconst formDataToMerge = [\n\t\t\tbaseFormData,\n\t\t\t...activeMetaBoxLocations.map(\n\t\t\t\t( location ) =>\n\t\t\t\t\tnew window.FormData( getMetaBoxContainer( location ) )\n\t\t\t),\n\t\t];\n\n\t\t// Merge all form data objects into a single one.\n\t\tconst formData = formDataToMerge.reduce( ( memo, currentFormData ) => {\n\t\t\tfor ( const [ key, value ] of currentFormData ) {\n\t\t\t\tmemo.append( key, value );\n\t\t\t}\n\t\t\treturn memo;\n\t\t}, new window.FormData() );\n\t\tadditionalData.forEach( ( [ key, value ] ) =>\n\t\t\tformData.append( key, value )\n\t\t);\n\n\t\ttry {\n\t\t\t// Save the metaboxes.\n\t\t\tawait apiFetch( {\n\t\t\t\turl: window._wpMetaBoxUrl,\n\t\t\t\tmethod: 'POST',\n\t\t\t\tbody: formData,\n\t\t\t\tparse: false,\n\t\t\t} );\n\t\t\tdispatch.metaBoxUpdatesSuccess();\n\t\t} catch {\n\t\t\tdispatch.metaBoxUpdatesFailure();\n\t\t}\n\t};\n\n/**\n * Returns an action object used to signal a successful meta box update.\n *\n * @return {Object} Action object.\n */\nexport function metaBoxUpdatesSuccess() {\n\treturn {\n\t\ttype: 'META_BOX_UPDATES_SUCCESS',\n\t};\n}\n\n/**\n * Returns an action object used to signal a failed meta box update.\n *\n * @return {Object} Action object.\n */\nexport function metaBoxUpdatesFailure() {\n\treturn {\n\t\ttype: 'META_BOX_UPDATES_FAILURE',\n\t};\n}\n\n/**\n * Action that changes the width of the editing canvas.\n *\n * @deprecated\n *\n * @param {string} deviceType\n */\nexport const __experimentalSetPreviewDeviceType =\n\t( deviceType ) =>\n\t( { registry } ) => {\n\t\tdeprecated(\n\t\t\t\"dispatch( 'core/edit-post' ).__experimentalSetPreviewDeviceType\",\n\t\t\t{\n\t\t\t\tsince: '6.5',\n\t\t\t\tversion: '6.7',\n\t\t\t\thint: 'registry.dispatch( editorStore ).setDeviceType',\n\t\t\t}\n\t\t);\n\t\tregistry.dispatch( editorStore ).setDeviceType( deviceType );\n\t};\n\n/**\n * Returns an action object used to open/close the inserter.\n *\n * @deprecated\n *\n * @param {boolean|Object} value Whether the inserter should be opened (true) or closed (false).\n */\nexport const setIsInserterOpened =\n\t( value ) =>\n\t( { registry } ) => {\n\t\tdeprecated( \"dispatch( 'core/edit-post' ).setIsInserterOpened\", {\n\t\t\tsince: '6.5',\n\t\t\talternative: \"dispatch( 'core/editor').setIsInserterOpened\",\n\t\t} );\n\t\tregistry.dispatch( editorStore ).setIsInserterOpened( value );\n\t};\n\n/**\n * Returns an action object used to open/close the list view.\n *\n * @deprecated\n *\n * @param {boolean} isOpen A boolean representing whether the list view should be opened or closed.\n */\nexport const setIsListViewOpened =\n\t( isOpen ) =>\n\t( { registry } ) => {\n\t\tdeprecated( \"dispatch( 'core/edit-post' ).setIsListViewOpened\", {\n\t\t\tsince: '6.5',\n\t\t\talternative: \"dispatch( 'core/editor').setIsListViewOpened\",\n\t\t} );\n\t\tregistry.dispatch( editorStore ).setIsListViewOpened( isOpen );\n\t};\n\n/**\n * Returns an action object used to switch to template editing.\n *\n * @deprecated\n */\nexport function setIsEditingTemplate() {\n\tdeprecated( \"dispatch( 'core/edit-post' ).setIsEditingTemplate\", {\n\t\tsince: '6.5',\n\t\talternative: \"dispatch( 'core/editor').setRenderingMode\",\n\t} );\n\treturn { type: 'NOTHING' };\n}\n\n/**\n * Create a block based template.\n *\n * @deprecated\n */\nexport function __unstableCreateTemplate() {\n\tdeprecated( \"dispatch( 'core/edit-post' ).__unstableCreateTemplate\", {\n\t\tsince: '6.5',\n\t} );\n\treturn { type: 'NOTHING' };\n}\n\nlet metaBoxesInitialized = false;\n\n/**\n * Initializes WordPress `postboxes` script and the logic for saving meta boxes.\n */\nexport const initializeMetaBoxes =\n\t() =>\n\t( { registry, select, dispatch } ) => {\n\t\tconst isEditorReady = registry\n\t\t\t.select( editorStore )\n\t\t\t.__unstableIsEditorReady();\n\n\t\tif ( ! isEditorReady ) {\n\t\t\treturn;\n\t\t}\n\t\t// Only initialize once.\n\t\tif ( metaBoxesInitialized ) {\n\t\t\treturn;\n\t\t}\n\t\tconst postType = registry.select( editorStore ).getCurrentPostType();\n\t\tif ( window.postboxes.page !== postType ) {\n\t\t\twindow.postboxes.add_postbox_toggles( postType );\n\t\t}\n\n\t\tmetaBoxesInitialized = true;\n\n\t\t// Save metaboxes on save completion, except for autosaves.\n\t\taddAction(\n\t\t\t'editor.savePost',\n\t\t\t'core/edit-post/save-metaboxes',\n\t\t\tasync ( post, options ) => {\n\t\t\t\tif ( ! options.isAutosave && select.hasMetaBoxes() ) {\n\t\t\t\t\tawait dispatch.requestMetaBoxUpdates();\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\n\t\tdispatch( {\n\t\t\ttype: 'META_BOXES_INITIALIZED',\n\t\t} );\n\t};\n\n/**\n * Action that toggles Distraction free mode.\n * Distraction free mode expects there are no sidebars, as due to the\n * z-index values set, you can't close sidebars.\n *\n * @deprecated\n */\nexport const toggleDistractionFree =\n\t() =>\n\t( { registry } ) => {\n\t\tdeprecated( \"dispatch( 'core/edit-post' ).toggleDistractionFree\", {\n\t\t\tsince: '6.6',\n\t\t\talternative: \"dispatch( 'core/editor').toggleDistractionFree\",\n\t\t} );\n\t\tregistry.dispatch( editorStore ).toggleDistractionFree();\n\t};\n\n/**\n * Action that toggles the Fullscreen Mode view option.\n */\nexport const toggleFullscreenMode =\n\t() =>\n\t( { registry } ) => {\n\t\tconst isFullscreen = registry\n\t\t\t.select( preferencesStore )\n\t\t\t.get( 'core/edit-post', 'fullscreenMode' );\n\n\t\tregistry\n\t\t\t.dispatch( preferencesStore )\n\t\t\t.toggle( 'core/edit-post', 'fullscreenMode' );\n\n\t\tregistry\n\t\t\t.dispatch( noticesStore )\n\t\t\t.createInfoNotice(\n\t\t\t\tisFullscreen\n\t\t\t\t\t? __( 'Fullscreen mode deactivated.' )\n\t\t\t\t\t: __( 'Fullscreen mode activated.' ),\n\t\t\t\t{\n\t\t\t\t\tid: 'core/edit-post/toggle-fullscreen-mode/notice',\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\tactions: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlabel: __( 'Undo' ),\n\n\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\tregistry\n\t\t\t\t\t\t\t\t\t.dispatch( preferencesStore )\n\t\t\t\t\t\t\t\t\t.toggle(\n\t\t\t\t\t\t\t\t\t\t'core/edit-post',\n\t\t\t\t\t\t\t\t\t\t'fullscreenMode'\n\t\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}\n\t\t\t);\n\t};\n"],
5
- "mappings": "AAGA,OAAO,cAAc;AACrB,SAAS,SAAS,wBAAwB;AAC1C;AAAA,EACC,SAAS;AAAA,EACT,eAAe;AAAA,OACT;AACP,OAAO,gBAAgB;AACvB,SAAS,iBAAiB;AAC1B,SAAS,SAAS,iBAAiB;AACnC,SAAS,SAAS,oBAAoB;AACtC,SAAS,UAAU;AAKnB,SAAS,2BAA2B;AACpC,SAAS,cAAc;AAEvB,MAAM,EAAE,eAAe,IAAI,OAAQ,iBAAkB;AAO9C,MAAM,qBACZ,CAAE,SACF,CAAE,EAAE,SAAS,MAAO;AACnB,WACE,SAAU,cAAe,EACzB,wBAAyB,QAAQ,IAAK;AACzC;AAKM,MAAM,sBACZ,MACA,CAAE,EAAE,SAAS,MACZ,SAAS,SAAU,cAAe,EAAE,yBAA0B,MAAO;AAYhE,MAAM,YACZ,CAAE,SACF,CAAE,EAAE,SAAS,MAAO;AACnB,aAAY,gDAAgD;AAAA,IAC3D,OAAO;AAAA,IACP,aAAa;AAAA,EACd,CAAE;AACF,SA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;AAAA,IACA;AAAA,IACA,OAAQ,MAAM,YAAa;AAC1B,UAAK,CAAE,QAAQ,cAAc,OAAO,aAAa,GAAI;AACpD,cAAM,SAAS,sBAAsB;AAAA,MACtC;AAAA,IACD;AAAA,EACD;AAEA,WAAU;AAAA,IACT,MAAM;AAAA,EACP,CAAE;AACH;AASM,IAAM,wBACZ,MACA,CAAE,EAAE,SAAS,MAAO;AACnB,aAAY,sDAAsD;AAAA,IACjE,OAAO;AAAA,IACP,aAAa;AAAA,EACd,CAAE;AACF,WAAS,SAAU,WAAY,EAAE,sBAAsB;AACxD;AAKM,IAAM,uBACZ,MACA,CAAE,EAAE,SAAS,MAAO;AACnB,QAAM,eAAe,SACnB,OAAQ,gBAAiB,EACzB,IAAK,kBAAkB,gBAAiB;AAE1C,WACE,SAAU,gBAAiB,EAC3B,OAAQ,kBAAkB,gBAAiB;AAE7C,WACE,SAAU,YAAa,EACvB;AAAA,IACA,eACG,GAAI,8BAA+B,IACnC,GAAI,4BAA6B;AAAA,IACpC;AAAA,MACC,IAAI;AAAA,MACJ,MAAM;AAAA,MACN,SAAS;AAAA,QACR;AAAA,UACC,OAAO,GAAI,MAAO;AAAA,UAElB,SAAS,MAAM;AACd,qBACE,SAAU,gBAAiB,EAC3B;AAAA,cACA;AAAA,cACA;AAAA,YACD;AAAA,UACF;AAAA,QACD;AAAA,MACD;AAAA,IACD;AAAA,EACD;AACF;",
6
6
  "names": []
7
7
  }
@@ -1,6 +1,7 @@
1
- const STORE_NAME = "core/edit-post";
2
- const VIEW_AS_LINK_SELECTOR = "#wp-admin-bar-view a";
3
- const VIEW_AS_PREVIEW_LINK_SELECTOR = "#wp-admin-bar-preview a";
1
+ // packages/edit-post/src/store/constants.js
2
+ var STORE_NAME = "core/edit-post";
3
+ var VIEW_AS_LINK_SELECTOR = "#wp-admin-bar-view a";
4
+ var VIEW_AS_PREVIEW_LINK_SELECTOR = "#wp-admin-bar-preview a";
4
5
  export {
5
6
  STORE_NAME,
6
7
  VIEW_AS_LINK_SELECTOR,
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/store/constants.js"],
4
4
  "sourcesContent": ["/**\n * The identifier for the data store.\n *\n * @type {string}\n */\nexport const STORE_NAME = 'core/edit-post';\n\n/**\n * CSS selector string for the admin bar view post link anchor tag.\n *\n * @type {string}\n */\nexport const VIEW_AS_LINK_SELECTOR = '#wp-admin-bar-view a';\n\n/**\n * CSS selector string for the admin bar preview post link anchor tag.\n *\n * @type {string}\n */\nexport const VIEW_AS_PREVIEW_LINK_SELECTOR = '#wp-admin-bar-preview a';\n"],
5
- "mappings": "AAKO,MAAM,aAAa;AAOnB,MAAM,wBAAwB;AAO9B,MAAM,gCAAgC;",
5
+ "mappings": ";AAKO,IAAM,aAAa;AAOnB,IAAM,wBAAwB;AAO9B,IAAM,gCAAgC;",
6
6
  "names": []
7
7
  }
@@ -1,9 +1,10 @@
1
+ // packages/edit-post/src/store/index.js
1
2
  import { createReduxStore, register } from "@wordpress/data";
2
3
  import reducer from "./reducer";
3
4
  import * as actions from "./actions";
4
5
  import * as selectors from "./selectors";
5
6
  import { STORE_NAME } from "./constants";
6
- const store = createReduxStore(STORE_NAME, {
7
+ var store = createReduxStore(STORE_NAME, {
7
8
  reducer,
8
9
  actions,
9
10
  selectors
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/store/index.js"],
4
4
  "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { createReduxStore, register } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport reducer from './reducer';\nimport * as actions from './actions';\nimport * as selectors from './selectors';\nimport { STORE_NAME } from './constants';\n\n/**\n * Store definition for the edit post namespace.\n *\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore\n *\n * @type {Object}\n */\nexport const store = createReduxStore( STORE_NAME, {\n\treducer,\n\tactions,\n\tselectors,\n} );\nregister( store );\n"],
5
- "mappings": "AAGA,SAAS,kBAAkB,gBAAgB;AAK3C,OAAO,aAAa;AACpB,YAAY,aAAa;AACzB,YAAY,eAAe;AAC3B,SAAS,kBAAkB;AASpB,MAAM,QAAQ,iBAAkB,YAAY;AAAA,EAClD;AAAA,EACA;AAAA,EACA;AACD,CAAE;AACF,SAAU,KAAM;",
5
+ "mappings": ";AAGA,SAAS,kBAAkB,gBAAgB;AAK3C,OAAO,aAAa;AACpB,YAAY,aAAa;AACzB,YAAY,eAAe;AAC3B,SAAS,kBAAkB;AASpB,IAAM,QAAQ,iBAAkB,YAAY;AAAA,EAClD;AAAA,EACA;AAAA,EACA;AACD,CAAE;AACF,SAAU,KAAM;",
6
6
  "names": []
7
7
  }
@@ -1,3 +1,4 @@
1
+ // packages/edit-post/src/store/reducer.js
1
2
  import { combineReducers } from "@wordpress/data";
2
3
  function isSavingMetaBoxes(state = false, action) {
3
4
  switch (action.type) {
@@ -48,7 +49,7 @@ function metaBoxesInitialized(state = false, action) {
48
49
  }
49
50
  return state;
50
51
  }
51
- const metaBoxes = combineReducers({
52
+ var metaBoxes = combineReducers({
52
53
  isSaving: isSavingMetaBoxes,
53
54
  locations: metaBoxLocations,
54
55
  initialized: metaBoxesInitialized
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/store/reducer.js"],
4
4
  "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { combineReducers } from '@wordpress/data';\n\n/**\n * Reducer keeping track of the meta boxes isSaving state.\n * A \"true\" value means the meta boxes saving request is in-flight.\n *\n *\n * @param {boolean} state Previous state.\n * @param {Object} action Action Object.\n *\n * @return {Object} Updated state.\n */\nexport function isSavingMetaBoxes( state = false, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'REQUEST_META_BOX_UPDATES':\n\t\t\treturn true;\n\t\tcase 'META_BOX_UPDATES_SUCCESS':\n\t\tcase 'META_BOX_UPDATES_FAILURE':\n\t\t\treturn false;\n\t\tdefault:\n\t\t\treturn state;\n\t}\n}\n\nfunction mergeMetaboxes( metaboxes = [], newMetaboxes ) {\n\tconst mergedMetaboxes = [ ...metaboxes ];\n\tfor ( const metabox of newMetaboxes ) {\n\t\tconst existing = mergedMetaboxes.findIndex(\n\t\t\t( box ) => box.id === metabox.id\n\t\t);\n\t\tif ( existing !== -1 ) {\n\t\t\tmergedMetaboxes[ existing ] = metabox;\n\t\t} else {\n\t\t\tmergedMetaboxes.push( metabox );\n\t\t}\n\t}\n\treturn mergedMetaboxes;\n}\n\n/**\n * Reducer keeping track of the meta boxes per location.\n *\n * @param {boolean} state Previous state.\n * @param {Object} action Action Object.\n *\n * @return {Object} Updated state.\n */\nexport function metaBoxLocations( state = {}, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_META_BOXES_PER_LOCATIONS': {\n\t\t\tconst newState = { ...state };\n\t\t\tfor ( const [ location, metaboxes ] of Object.entries(\n\t\t\t\taction.metaBoxesPerLocation\n\t\t\t) ) {\n\t\t\t\tnewState[ location ] = mergeMetaboxes(\n\t\t\t\t\tnewState[ location ],\n\t\t\t\t\tmetaboxes\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn newState;\n\t\t}\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer tracking whether meta boxes are initialized.\n *\n * @param {boolean} state\n * @param {Object} action\n *\n * @return {boolean} Updated state.\n */\nfunction metaBoxesInitialized( state = false, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'META_BOXES_INITIALIZED':\n\t\t\treturn true;\n\t}\n\treturn state;\n}\n\nconst metaBoxes = combineReducers( {\n\tisSaving: isSavingMetaBoxes,\n\tlocations: metaBoxLocations,\n\tinitialized: metaBoxesInitialized,\n} );\n\nexport default combineReducers( {\n\tmetaBoxes,\n} );\n"],
5
- "mappings": "AAGA,SAAS,uBAAuB;AAYzB,SAAS,kBAAmB,QAAQ,OAAO,QAAS;AAC1D,UAAS,OAAO,MAAO;AAAA,IACtB,KAAK;AACJ,aAAO;AAAA,IACR,KAAK;AAAA,IACL,KAAK;AACJ,aAAO;AAA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