@wordpress/edit-post 8.8.8 → 8.10.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 (76) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/build/components/back-button/fullscreen-mode-close.js +2 -4
  3. package/build/components/back-button/fullscreen-mode-close.js.map +1 -1
  4. package/build/components/init-pattern-modal/index.js +3 -12
  5. package/build/components/init-pattern-modal/index.js.map +1 -1
  6. package/build/components/layout/index.js +24 -30
  7. package/build/components/layout/index.js.map +1 -1
  8. package/build/components/layout/use-padding-appender.js +19 -16
  9. package/build/components/layout/use-padding-appender.js.map +1 -1
  10. package/build/components/meta-boxes/meta-box-visibility.js.map +1 -1
  11. package/build/components/meta-boxes/meta-boxes-area/index.js.map +1 -1
  12. package/build/components/preferences-modal/enable-custom-fields.js +2 -5
  13. package/build/components/preferences-modal/enable-custom-fields.js.map +1 -1
  14. package/build/components/preferences-modal/meta-boxes-section.js.map +1 -1
  15. package/build/deprecated.js.map +1 -1
  16. package/build/index.js +2 -4
  17. package/build/index.js.map +1 -1
  18. package/build/store/actions.js +1 -1
  19. package/build/store/actions.js.map +1 -1
  20. package/build/store/private-selectors.js.map +1 -1
  21. package/build/store/selectors.js +1 -1
  22. package/build/store/selectors.js.map +1 -1
  23. package/build/utils/meta-boxes.js.map +1 -1
  24. package/build-module/components/back-button/fullscreen-mode-close.js +2 -4
  25. package/build-module/components/back-button/fullscreen-mode-close.js.map +1 -1
  26. package/build-module/components/header/header-toolbar/index.native.js +1 -2
  27. package/build-module/components/header/header-toolbar/index.native.js.map +1 -1
  28. package/build-module/components/init-pattern-modal/index.js +5 -16
  29. package/build-module/components/init-pattern-modal/index.js.map +1 -1
  30. package/build-module/components/layout/index.js +25 -33
  31. package/build-module/components/layout/index.js.map +1 -1
  32. package/build-module/components/layout/index.native.js +1 -3
  33. package/build-module/components/layout/index.native.js.map +1 -1
  34. package/build-module/components/layout/use-padding-appender.js +20 -16
  35. package/build-module/components/layout/use-padding-appender.js.map +1 -1
  36. package/build-module/components/meta-boxes/index.js +1 -3
  37. package/build-module/components/meta-boxes/index.js.map +1 -1
  38. package/build-module/components/meta-boxes/meta-box-visibility.js.map +1 -1
  39. package/build-module/components/meta-boxes/meta-boxes-area/index.js +1 -2
  40. package/build-module/components/meta-boxes/meta-boxes-area/index.js.map +1 -1
  41. package/build-module/components/more-menu/index.js +1 -3
  42. package/build-module/components/more-menu/index.js.map +1 -1
  43. package/build-module/components/preferences-modal/enable-custom-fields.js +3 -8
  44. package/build-module/components/preferences-modal/enable-custom-fields.js.map +1 -1
  45. package/build-module/components/preferences-modal/meta-boxes-section.js +1 -2
  46. package/build-module/components/preferences-modal/meta-boxes-section.js.map +1 -1
  47. package/build-module/components/welcome-guide/default.js +1 -3
  48. package/build-module/components/welcome-guide/default.js.map +1 -1
  49. package/build-module/components/welcome-guide/image.js +1 -2
  50. package/build-module/components/welcome-guide/image.js.map +1 -1
  51. package/build-module/components/welcome-guide/template.js +1 -3
  52. package/build-module/components/welcome-guide/template.js.map +1 -1
  53. package/build-module/deprecated.js.map +1 -1
  54. package/build-module/index.js +2 -4
  55. package/build-module/index.js.map +1 -1
  56. package/build-module/store/actions.js +1 -1
  57. package/build-module/store/actions.js.map +1 -1
  58. package/build-module/store/private-selectors.js.map +1 -1
  59. package/build-module/store/selectors.js +1 -1
  60. package/build-module/store/selectors.js.map +1 -1
  61. package/build-module/utils/meta-boxes.js.map +1 -1
  62. package/build-style/classic-rtl.css +10 -1
  63. package/build-style/classic.css +10 -1
  64. package/build-style/style-rtl.css +10 -1
  65. package/build-style/style.css +10 -1
  66. package/package.json +32 -32
  67. package/src/components/back-button/fullscreen-mode-close.js +1 -2
  68. package/src/components/back-button/test/__snapshots__/fullscreen-mode-close.js.snap +1 -1
  69. package/src/components/init-pattern-modal/index.js +5 -12
  70. package/src/components/layout/index.js +21 -32
  71. package/src/components/layout/use-padding-appender.js +21 -18
  72. package/src/components/preferences-modal/enable-custom-fields.js +1 -3
  73. package/src/components/preferences-modal/test/__snapshots__/enable-custom-fields.js.snap +2 -2
  74. package/src/index.js +0 -2
  75. package/src/store/actions.js +1 -1
  76. package/src/store/selectors.js +1 -1
@@ -5,21 +5,19 @@ import { useRegistry } from '@wordpress/data';
5
5
  import { useRefEffect } from '@wordpress/compose';
6
6
  import { store as blockEditorStore } from '@wordpress/block-editor';
7
7
  import { isUnmodifiedDefaultBlock } from '@wordpress/blocks';
8
- export function usePaddingAppender() {
8
+
9
+ // Ruleset to add space for the typewriter effect. When typing in the last
10
+ // block, there needs to be room to scroll up.
11
+ const CSS = ':root :where(.editor-styles-wrapper)::after {content: ""; display: block; height: 40vh;}';
12
+ export function usePaddingAppender(enabled) {
9
13
  const registry = useRegistry();
10
- return useRefEffect(node => {
14
+ const effect = useRefEffect(node => {
11
15
  function onMouseDown(event) {
12
- if (event.target !== node) {
13
- return;
14
- }
15
- const {
16
- ownerDocument
17
- } = node;
18
- const {
19
- defaultView
20
- } = ownerDocument;
21
- const pseudoHeight = defaultView.parseInt(defaultView.getComputedStyle(node, ':after').height, 10);
22
- if (!pseudoHeight) {
16
+ if (event.target !== node &&
17
+ // Tests for the parent element because in the iframed editor if the click is
18
+ // below the padding the target will be the parent element (html) and should
19
+ // still be treated as intent to append.
20
+ event.target !== node.parentElement) {
23
21
  return;
24
22
  }
25
23
 
@@ -32,7 +30,7 @@ export function usePaddingAppender() {
32
30
  if (event.clientY < lastChildRect.bottom) {
33
31
  return;
34
32
  }
35
- event.stopPropagation();
33
+ event.preventDefault();
36
34
  const blockOrder = registry.select(blockEditorStore).getBlockOrder('');
37
35
  const lastBlockClientId = blockOrder[blockOrder.length - 1];
38
36
  const lastBlock = registry.select(blockEditorStore).getBlock(lastBlockClientId);
@@ -46,10 +44,16 @@ export function usePaddingAppender() {
46
44
  insertDefaultBlock();
47
45
  }
48
46
  }
49
- node.addEventListener('mousedown', onMouseDown);
47
+ const {
48
+ ownerDocument
49
+ } = node;
50
+ // Adds the listener on the document so that in the iframed editor clicks below the
51
+ // padding can be handled as they too should be treated as intent to append.
52
+ ownerDocument.addEventListener('mousedown', onMouseDown);
50
53
  return () => {
51
- node.removeEventListener('mousedown', onMouseDown);
54
+ ownerDocument.removeEventListener('mousedown', onMouseDown);
52
55
  };
53
56
  }, [registry]);
57
+ return enabled ? [effect, CSS] : [];
54
58
  }
55
59
  //# sourceMappingURL=use-padding-appender.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["useRegistry","useRefEffect","store","blockEditorStore","isUnmodifiedDefaultBlock","usePaddingAppender","registry","node","onMouseDown","event","target","ownerDocument","defaultView","pseudoHeight","parseInt","getComputedStyle","height","lastChild","lastElementChild","lastChildRect","getBoundingClientRect","clientY","bottom","stopPropagation","blockOrder","select","getBlockOrder","lastBlockClientId","length","lastBlock","getBlock","selectBlock","insertDefaultBlock","dispatch","addEventListener","removeEventListener"],"sources":["@wordpress/edit-post/src/components/layout/use-padding-appender.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useRegistry } from '@wordpress/data';\nimport { useRefEffect } from '@wordpress/compose';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { isUnmodifiedDefaultBlock } from '@wordpress/blocks';\n\nexport function usePaddingAppender() {\n\tconst registry = useRegistry();\n\treturn useRefEffect(\n\t\t( node ) => {\n\t\t\tfunction onMouseDown( event ) {\n\t\t\t\tif ( event.target !== node ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst { ownerDocument } = node;\n\t\t\t\tconst { defaultView } = ownerDocument;\n\n\t\t\t\tconst pseudoHeight = defaultView.parseInt(\n\t\t\t\t\tdefaultView.getComputedStyle( node, ':after' ).height,\n\t\t\t\t\t10\n\t\t\t\t);\n\n\t\t\t\tif ( ! pseudoHeight ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Only handle clicks under the last child.\n\t\t\t\tconst lastChild = node.lastElementChild;\n\t\t\t\tif ( ! lastChild ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst lastChildRect = lastChild.getBoundingClientRect();\n\t\t\t\tif ( event.clientY < lastChildRect.bottom ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tevent.stopPropagation();\n\n\t\t\t\tconst blockOrder = registry\n\t\t\t\t\t.select( blockEditorStore )\n\t\t\t\t\t.getBlockOrder( '' );\n\t\t\t\tconst lastBlockClientId = blockOrder[ blockOrder.length - 1 ];\n\n\t\t\t\tconst lastBlock = registry\n\t\t\t\t\t.select( blockEditorStore )\n\t\t\t\t\t.getBlock( lastBlockClientId );\n\t\t\t\tconst { selectBlock, insertDefaultBlock } =\n\t\t\t\t\tregistry.dispatch( blockEditorStore );\n\n\t\t\t\tif ( lastBlock && isUnmodifiedDefaultBlock( lastBlock ) ) {\n\t\t\t\t\tselectBlock( lastBlockClientId );\n\t\t\t\t} else {\n\t\t\t\t\tinsertDefaultBlock();\n\t\t\t\t}\n\t\t\t}\n\t\t\tnode.addEventListener( 'mousedown', onMouseDown );\n\t\t\treturn () => {\n\t\t\t\tnode.removeEventListener( 'mousedown', onMouseDown );\n\t\t\t};\n\t\t},\n\t\t[ registry ]\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,WAAW,QAAQ,iBAAiB;AAC7C,SAASC,YAAY,QAAQ,oBAAoB;AACjD,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,yBAAyB;AACnE,SAASC,wBAAwB,QAAQ,mBAAmB;AAE5D,OAAO,SAASC,kBAAkBA,CAAA,EAAG;EACpC,MAAMC,QAAQ,GAAGN,WAAW,CAAC,CAAC;EAC9B,OAAOC,YAAY,CAChBM,IAAI,IAAM;IACX,SAASC,WAAWA,CAAEC,KAAK,EAAG;MAC7B,IAAKA,KAAK,CAACC,MAAM,KAAKH,IAAI,EAAG;QAC5B;MACD;MAEA,MAAM;QAAEI;MAAc,CAAC,GAAGJ,IAAI;MAC9B,MAAM;QAAEK;MAAY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3,"names":["useRegistry","useRefEffect","store","blockEditorStore","isUnmodifiedDefaultBlock","CSS","usePaddingAppender","enabled","registry","effect","node","onMouseDown","event","target","parentElement","lastChild","lastElementChild","lastChildRect","getBoundingClientRect","clientY","bottom","preventDefault","blockOrder","select","getBlockOrder","lastBlockClientId","length","lastBlock","getBlock","selectBlock","insertDefaultBlock","dispatch","ownerDocument","addEventListener","removeEventListener"],"sources":["@wordpress/edit-post/src/components/layout/use-padding-appender.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useRegistry } from '@wordpress/data';\nimport { useRefEffect } from '@wordpress/compose';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { isUnmodifiedDefaultBlock } from '@wordpress/blocks';\n\n// Ruleset to add space for the typewriter effect. When typing in the last\n// block, there needs to be room to scroll up.\nconst CSS =\n\t':root :where(.editor-styles-wrapper)::after {content: \"\"; display: block; height: 40vh;}';\n\nexport function usePaddingAppender( enabled ) {\n\tconst registry = useRegistry();\n\tconst effect = useRefEffect(\n\t\t( node ) => {\n\t\t\tfunction onMouseDown( event ) {\n\t\t\t\tif (\n\t\t\t\t\tevent.target !== node &&\n\t\t\t\t\t// Tests for the parent element because in the iframed editor if the click is\n\t\t\t\t\t// below the padding the target will be the parent element (html) and should\n\t\t\t\t\t// still be treated as intent to append.\n\t\t\t\t\tevent.target !== node.parentElement\n\t\t\t\t) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Only handle clicks under the last child.\n\t\t\t\tconst lastChild = node.lastElementChild;\n\t\t\t\tif ( ! lastChild ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst lastChildRect = lastChild.getBoundingClientRect();\n\t\t\t\tif ( event.clientY < lastChildRect.bottom ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tevent.preventDefault();\n\n\t\t\t\tconst blockOrder = registry\n\t\t\t\t\t.select( blockEditorStore )\n\t\t\t\t\t.getBlockOrder( '' );\n\t\t\t\tconst lastBlockClientId = blockOrder[ blockOrder.length - 1 ];\n\n\t\t\t\tconst lastBlock = registry\n\t\t\t\t\t.select( blockEditorStore )\n\t\t\t\t\t.getBlock( lastBlockClientId );\n\t\t\t\tconst { selectBlock, insertDefaultBlock } =\n\t\t\t\t\tregistry.dispatch( blockEditorStore );\n\n\t\t\t\tif ( lastBlock && isUnmodifiedDefaultBlock( lastBlock ) ) {\n\t\t\t\t\tselectBlock( lastBlockClientId );\n\t\t\t\t} else {\n\t\t\t\t\tinsertDefaultBlock();\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst { ownerDocument } = node;\n\t\t\t// Adds the listener on the document so that in the iframed editor clicks below the\n\t\t\t// padding can be handled as they too should be treated as intent to append.\n\t\t\townerDocument.addEventListener( 'mousedown', onMouseDown );\n\t\t\treturn () => {\n\t\t\t\townerDocument.removeEventListener( 'mousedown', onMouseDown );\n\t\t\t};\n\t\t},\n\t\t[ registry ]\n\t);\n\treturn enabled ? [ effect, CSS ] : [];\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,WAAW,QAAQ,iBAAiB;AAC7C,SAASC,YAAY,QAAQ,oBAAoB;AACjD,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,yBAAyB;AACnE,SAASC,wBAAwB,QAAQ,mBAAmB;;AAE5D;AACA;AACA,MAAMC,GAAG,GACR,0FAA0F;AAE3F,OAAO,SAASC,kBAAkBA,CAAEC,OAAO,EAAG;EAC7C,MAAMC,QAAQ,GAAGR,WAAW,CAAC,CAAC;EAC9B,MAAMS,MAAM,GAAGR,YAAY,CACxBS,IAAI,IAAM;IACX,SAASC,WAAWA,CAAEC,KAAK,EAAG;MAC7B,IACCA,KAAK,CAACC,MAAM,KAAKH,IAAI;MACrB;MACA;MACA;MACAE,KAAK,CAACC,MAAM,KAAKH,IAAI,CAACI,aAAa,EAClC;QACD;MACD;;MAEA;MACA,MAAMC,SAAS,GAAGL,IAAI,CAACM,gBAAgB;MACvC,IAAK,CAAED,SAAS,EAAG;QAClB;MACD;MAEA,MAAME,aAAa,GAAGF,SAAS,CAACG,qBAAqB,CAAC,CAAC;MACvD,IAAKN,KAAK,CAACO,OAAO,GAAGF,aAAa,CAACG,MAAM,EAAG;QAC3C;MACD;MAEAR,KAAK,CAACS,cAAc,CAAC,CAAC;MAEtB,MAAMC,UAAU,GAAGd,QAAQ,CACzBe,MAAM,CAAEpB,gBAAiB,CAAC,CAC1BqB,aAAa,CAAE,EAAG,CAAC;MACrB,MAAMC,iBAAiB,GAAGH,UAAU,CAAEA,UAAU,CAACI,MAAM,GAAG,CAAC,CAAE;MAE7D,MAAMC,SAAS,GAAGnB,QAAQ,CACxBe,MAAM,CAAEpB,gBAAiB,CAAC,CAC1ByB,QAAQ,CAAEH,iBAAkB,CAAC;MAC/B,MAAM;QAAEI,WAAW;QAAEC;MAAmB,CAAC,GACxCtB,QAAQ,CAACuB,QAAQ,CAAE5B,gBAAiB,CAAC;MAEtC,IAAKwB,SAAS,IAAIvB,wBAAwB,CAAEuB,SAAU,CAAC,EAAG;QACzDE,WAAW,CAAEJ,iBAAkB,CAAC;MACjC,CAAC,MAAM;QACNK,kBAAkB,CAAC,CAAC;MACrB;IACD;IACA,MAAM;MAAEE;IAAc,CAAC,GAAGtB,IAAI;IAC9B;IACA;IACAsB,aAAa,CAACC,gBAAgB,CAAE,WAAW,EAAEtB,WAAY,CAAC;IAC1D,OAAO,MAAM;MACZqB,aAAa,CAACE,mBAAmB,CAAE,WAAW,EAAEvB,WAAY,CAAC;IAC9D,CAAC;EACF,CAAC,EACD,CAAEH,QAAQ,CACX,CAAC;EACD,OAAOD,OAAO,GAAG,CAAEE,MAAM,EAAEJ,GAAG,CAAE,GAAG,EAAE;AACtC","ignoreList":[]}
@@ -11,9 +11,7 @@ import { store as editorStore } from '@wordpress/editor';
11
11
  import MetaBoxesArea from './meta-boxes-area';
12
12
  import MetaBoxVisibility from './meta-box-visibility';
13
13
  import { store as editPostStore } from '../../store';
14
- import { jsx as _jsx } from "react/jsx-runtime";
15
- import { Fragment as _Fragment } from "react/jsx-runtime";
16
- import { jsxs as _jsxs } from "react/jsx-runtime";
14
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
17
15
  export default function MetaBoxes({
18
16
  location
19
17
  }) {
@@ -1 +1 @@
1
- {"version":3,"names":["useSelect","useRegistry","useEffect","store","editorStore","MetaBoxesArea","MetaBoxVisibility","editPostStore","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","MetaBoxes","location","registry","metaBoxes","areMetaBoxesInitialized","isEditorReady","select","__unstableIsEditorReady","getMetaBoxesPerLocation","_areMetaBoxesInitialized","hasMetaBoxes","length","dispatch","initializeMetaBoxes","children","map","id"],"sources":["@wordpress/edit-post/src/components/meta-boxes/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect, useRegistry } from '@wordpress/data';\nimport { useEffect } from '@wordpress/element';\nimport { store as editorStore } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport MetaBoxesArea from './meta-boxes-area';\nimport MetaBoxVisibility from './meta-box-visibility';\nimport { store as editPostStore } from '../../store';\n\nexport default function MetaBoxes( { location } ) {\n\tconst registry = useRegistry();\n\tconst { metaBoxes, areMetaBoxesInitialized, isEditorReady } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { __unstableIsEditorReady } = select( editorStore );\n\t\t\tconst {\n\t\t\t\tgetMetaBoxesPerLocation,\n\t\t\t\tareMetaBoxesInitialized: _areMetaBoxesInitialized,\n\t\t\t} = select( editPostStore );\n\t\t\treturn {\n\t\t\t\tmetaBoxes: getMetaBoxesPerLocation( location ),\n\t\t\t\tareMetaBoxesInitialized: _areMetaBoxesInitialized(),\n\t\t\t\tisEditorReady: __unstableIsEditorReady(),\n\t\t\t};\n\t\t},\n\t\t[ location ]\n\t);\n\n\tconst hasMetaBoxes = !! metaBoxes?.length;\n\n\t// When editor is ready, initialize postboxes (wp core script) and metabox\n\t// saving. This initializes all meta box locations, not just this specific\n\t// one.\n\tuseEffect( () => {\n\t\tif ( isEditorReady && hasMetaBoxes && ! areMetaBoxesInitialized ) {\n\t\t\tregistry.dispatch( editPostStore ).initializeMetaBoxes();\n\t\t}\n\t}, [ isEditorReady, hasMetaBoxes, areMetaBoxesInitialized ] );\n\n\tif ( ! areMetaBoxesInitialized ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t{ ( metaBoxes ?? [] ).map( ( { id } ) => (\n\t\t\t\t<MetaBoxVisibility key={ id } id={ id } />\n\t\t\t) ) }\n\t\t\t<MetaBoxesArea location={ location } />\n\t\t</>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SAASC,SAAS,QAAQ,oBAAoB;AAC9C,SAASC,KAAK,IAAIC,WAAW,QAAQ,mBAAmB;;AAExD;AACA;AACA;AACA,OAAOC,aAAa,MAAM,mBAAmB;AAC7C,OAAOC,iBAAiB,MAAM,uBAAuB;AACrD,SAASH,KAAK,IAAII,aAAa,QAAQ,aAAa;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,QAAA,IAAAC,SAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAErD,eAAe,SAASC,SAASA,CAAE;EAAEC;AAAS,CAAC,EAAG;EACjD,MAAMC,QAAQ,GAAGf,WAAW,CAAC,CAAC;EAC9B,MAAM;IAAEgB,SAAS;IAAEC,uBAAuB;IAAEC;EAAc,CAAC,GAAGnB,SAAS,CACpEoB,MAAM,IAAM;IACb,MAAM;MAAEC;IAAwB,CAAC,GAAGD,MAAM,CAAEhB,WAAY,CAAC;IACzD,MAAM;MACLkB,uBAAuB;MACvBJ,uBAAuB,EAAEK;IAC1B,CAAC,GAAGH,MAAM,CAAEb,aAAc,CAAC;IAC3B,OAAO;MACNU,SAAS,EAAEK,uBAAuB,CAAEP,QAAS,CAAC;MAC9CG,uBAAuB,EAAEK,wBAAwB,CAAC,CAAC;MACnDJ,aAAa,EAAEE,uBAAuB,CAAC;IACxC,CAAC;EACF,CAAC,EACD,CAAEN,QAAQ,CACX,CAAC;EAED,MAAMS,YAAY,GAAG,CAAC,CAAEP,SAAS,EAAEQ,MAAM;;EAEzC;EACA;EACA;EACAvB,SAAS,CAAE,MAAM;IAChB,IAAKiB,aAAa,IAAIK,YAAY,IAAI,CAAEN,uBAAuB,EAAG;MACjEF,QAAQ,CAACU,QAAQ,CAAEnB,aAAc,CAAC,CAACoB,mBAAmB,CAAC,CAAC;IACzD;EACD,CAAC,EAAE,CAAER,aAAa,EAAEK,YAAY,EAAEN,uBAAuB,CAAG,CAAC;EAE7D,IAAK,CAAEA,uBAAuB,EAAG;IAChC,OAAO,IAAI;EACZ;EAEA,oBACCL,KAAA,CAAAF,SAAA;IAAAiB,QAAA,GACG,CAAEX,SAAS,aAATA,SAAS,cAATA,SAAS,GAAI,EAAE,EAAGY,GAAG,CAAE,CAAE;MAAEC;IAAG,CAAC,kBAClCrB,IAAA,CAACH,iBAAiB;MAAYwB,EAAE,EAAGA;IAAI,GAAdA,EAAgB,CACxC,CAAC,eACHrB,IAAA,CAACJ,aAAa;MAACU,QAAQ,EAAGA;IAAU,CAAE,CAAC;EAAA,CACtC,CAAC;AAEL","ignoreList":[]}
1
+ {"version":3,"names":["useSelect","useRegistry","useEffect","store","editorStore","MetaBoxesArea","MetaBoxVisibility","editPostStore","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","MetaBoxes","location","registry","metaBoxes","areMetaBoxesInitialized","isEditorReady","select","__unstableIsEditorReady","getMetaBoxesPerLocation","_areMetaBoxesInitialized","hasMetaBoxes","length","dispatch","initializeMetaBoxes","children","map","id"],"sources":["@wordpress/edit-post/src/components/meta-boxes/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect, useRegistry } from '@wordpress/data';\nimport { useEffect } from '@wordpress/element';\nimport { store as editorStore } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport MetaBoxesArea from './meta-boxes-area';\nimport MetaBoxVisibility from './meta-box-visibility';\nimport { store as editPostStore } from '../../store';\n\nexport default function MetaBoxes( { location } ) {\n\tconst registry = useRegistry();\n\tconst { metaBoxes, areMetaBoxesInitialized, isEditorReady } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { __unstableIsEditorReady } = select( editorStore );\n\t\t\tconst {\n\t\t\t\tgetMetaBoxesPerLocation,\n\t\t\t\tareMetaBoxesInitialized: _areMetaBoxesInitialized,\n\t\t\t} = select( editPostStore );\n\t\t\treturn {\n\t\t\t\tmetaBoxes: getMetaBoxesPerLocation( location ),\n\t\t\t\tareMetaBoxesInitialized: _areMetaBoxesInitialized(),\n\t\t\t\tisEditorReady: __unstableIsEditorReady(),\n\t\t\t};\n\t\t},\n\t\t[ location ]\n\t);\n\n\tconst hasMetaBoxes = !! metaBoxes?.length;\n\n\t// When editor is ready, initialize postboxes (wp core script) and metabox\n\t// saving. This initializes all meta box locations, not just this specific\n\t// one.\n\tuseEffect( () => {\n\t\tif ( isEditorReady && hasMetaBoxes && ! areMetaBoxesInitialized ) {\n\t\t\tregistry.dispatch( editPostStore ).initializeMetaBoxes();\n\t\t}\n\t}, [ isEditorReady, hasMetaBoxes, areMetaBoxesInitialized ] );\n\n\tif ( ! areMetaBoxesInitialized ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t{ ( metaBoxes ?? [] ).map( ( { id } ) => (\n\t\t\t\t<MetaBoxVisibility key={ id } id={ id } />\n\t\t\t) ) }\n\t\t\t<MetaBoxesArea location={ location } />\n\t\t</>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SAASC,SAAS,QAAQ,oBAAoB;AAC9C,SAASC,KAAK,IAAIC,WAAW,QAAQ,mBAAmB;;AAExD;AACA;AACA;AACA,OAAOC,aAAa,MAAM,mBAAmB;AAC7C,OAAOC,i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,IAAA,CAACH,iBAAiB;MAAYwB,EAAE,EAAGA;IAAI,GAAdA,EAAgB,CACxC,CAAC,eACHrB,IAAA,CAACJ,aAAa;MAACU,QAAQ,EAAGA;IAAU,CAAE,CAAC;EAAA,CACtC,CAAC;AAEL","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["Component","withSelect","store","editorStore","MetaBoxVisibility","componentDidMount","updateDOM","componentDidUpdate","prevProps","props","isVisible","id","element","document","getElementById","classList","remove","add","render","select","isEditorPanelEnabled"],"sources":["@wordpress/edit-post/src/components/meta-boxes/meta-box-visibility.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { withSelect } from '@wordpress/data';\nimport { store as editorStore } from '@wordpress/editor';\n\nclass MetaBoxVisibility extends Component {\n\tcomponentDidMount() {\n\t\tthis.updateDOM();\n\t}\n\n\tcomponentDidUpdate( prevProps ) {\n\t\tif ( this.props.isVisible !== prevProps.isVisible ) {\n\t\t\tthis.updateDOM();\n\t\t}\n\t}\n\n\tupdateDOM() {\n\t\tconst { id, isVisible } = this.props;\n\n\t\tconst element = document.getElementById( id );\n\t\tif ( ! element ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( isVisible ) {\n\t\t\telement.classList.remove( 'is-hidden' );\n\t\t} else {\n\t\t\telement.classList.add( 'is-hidden' );\n\t\t}\n\t}\n\n\trender() {\n\t\treturn null;\n\t}\n}\n\nexport default withSelect( ( select, { id } ) => ( {\n\tisVisible: select( editorStore ).isEditorPanelEnabled( `meta-box-${ id }` ),\n} ) )( MetaBoxVisibility );\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,oBAAoB;AAC9C,SAASC,UAAU,QAAQ,iBAAiB;AAC5C,SAASC,KAAK,IAAIC,WAAW,QAAQ,mBAAmB;AAExD,MAAMC,iBAAiB,SAASJ,SAAS,CAAC;EACzCK,iBAAiBA,CAAA,EAAG;IACnB,IAAI,CAACC,SAAS,CAAC,CAAC;EACjB;EAEAC,kBAAkBA,CAAEC,SAAS,EAAG;IAC/B,IAAK,IAAI,CAACC,KAAK,CAACC,SAAS,KAAKF,SAAS,CAACE,SAAS,EAAG;MACnD,IAAI,CAACJ,SAAS,CAAC,CAAC;IACjB;EACD;EAEAA,SAASA,CAAA,EAAG;IACX,MAAM;MAAEK,EAAE;MAAED;IAAU,CAAC,GAAG,IAAI,CAACD,KAAK;IAEpC,MAAMG,OAAO,GAAGC,QAAQ,CAACC,cAAc,CAAEH,EAAG,CAAC;IAC7C,IAAK,CAAEC,OAAO,EAAG;MAChB;IACD;IAEA,IAAKF,SAAS,EAAG;MAChBE,OAAO,CAACG,SAAS,CAACC,MAAM,CAAE,WAAY,CAAC;IACxC,CAAC,MAAM;MACNJ,OAAO,CAACG,SAAS,CAACE,GAAG,CAAE,WAAY,CAAC;IACrC;EACD;EAEAC,MAAMA,CAAA,EAAG;IACR,OAAO,IAAI;EACZ;AACD;AAEA,eAAejB,UAAU,CAAE,CAAEkB,MAAM,EAAE;EAAER;AAAG,CAAC,MAAQ;EAClDD,SAAS,EAAES,MAAM,CAAEhB,WAAY,CAAC,CAACiB,oBAAoB,CAAG,YAAYT,EAAI,EAAE;AAC3E,CAAC,CAAG,CAAC,CAAEP,iBAAkB,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["Component","withSelect","store","editorStore","MetaBoxVisibility","componentDidMount","updateDOM","componentDidUpdate","prevProps","props","isVisible","id","element","document","getElementById","classList","remove","add","render","select","isEditorPanelEnabled"],"sources":["@wordpress/edit-post/src/components/meta-boxes/meta-box-visibility.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { withSelect } from '@wordpress/data';\nimport { store as editorStore } from '@wordpress/editor';\n\nclass MetaBoxVisibility extends Component {\n\tcomponentDidMount() {\n\t\tthis.updateDOM();\n\t}\n\n\tcomponentDidUpdate( prevProps ) {\n\t\tif ( this.props.isVisible !== prevProps.isVisible ) {\n\t\t\tthis.updateDOM();\n\t\t}\n\t}\n\n\tupdateDOM() {\n\t\tconst { id, isVisible } = this.props;\n\n\t\tconst element = document.getElementById( id );\n\t\tif ( ! element ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( isVisible ) {\n\t\t\telement.classList.remove( 'is-hidden' );\n\t\t} else {\n\t\t\telement.classList.add( 'is-hidden' );\n\t\t}\n\t}\n\n\trender() {\n\t\treturn null;\n\t}\n}\n\nexport default withSelect( ( select, { id } ) => ( {\n\tisVisible: select( editorStore ).isEditorPanelEnabled( `meta-box-${ id }` ),\n} ) )( MetaBoxVisibility );\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,oBAAoB;AAC9C,SAASC,UAAU,QAAQ,iBAAiB;AAC5C,SAASC,KAAK,IAAIC,WAAW,QAAQ,mBAAmB;AAExD,MAAMC,iBAAiB,SAASJ,SAAS,CAAC;EACzCK,iBAAiBA,CAAA,EAAG;IACnB,IAAI,CAACC,SAAS,CAAC,CAAC;EACjB;EAEAC,kBAAkBA,CAAEC,SAAS,EAAG;IAC/B,IAAK,IAAI,CAACC,KAAK,CAACC,SAAS,KAAKF,SAAS,CAACE,SAAS,EAAG;MACnD,IAAI,CAACJ,SAAS,CAAC,CAAC;IACjB;EACD;EAEAA,SAASA,CAAA,EAAG;IACX,MAAM;MAAEK,EAAE;MAAED;IAAU,CAAC,GAAG,IAAI,CAACD,KAAK;IAEpC,MAAMG,OAAO,GAAGC,QAAQ,CAACC,cAAc,CAAEH,EAAG,CAAC;IAC7C,IAAK,CAAEC,OAAO,EAAG;MAChB;IACD;IAEA,IAAKF,SAAS,EAAG;MAChBE,OAAO,CAACG,SAAS,CAACC,MAAM,CAAE,WAAY,CAAC;IACxC,CAAC,MAAM;MACNJ,OAAO,CAACG,SAAS,CAACE,GAAG,CAAE,WAAY,CAAC;IACrC;EACD;EAEAC,MAAMA,CAAA,EAAG;IACR,OAAO,IAAI;EACZ;AACD;AAEA,eAAejB,UAAU,CAAE,CAAEkB,MAAM,EAAE;EAAER;AAAG,CAAC,MAAQ;EAClDD,SAAS,EAAES,MAAM,CAAEhB,WAAY,CAAC,CAACiB,oBAAoB,CAAE,YAAaT,EAAE,EAAI;AAC3E,CAAC,CAAG,CAAC,CAAEP,iBAAkB,CAAC","ignoreList":[]}
@@ -22,8 +22,7 @@ import { store as editPostStore } from '../../../store';
22
22
  * @param {string} props.location metabox location.
23
23
  * @return {Component} The component to be rendered.
24
24
  */
25
- import { jsx as _jsx } from "react/jsx-runtime";
26
- import { jsxs as _jsxs } from "react/jsx-runtime";
25
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
27
26
  function MetaBoxesArea({
28
27
  location
29
28
  }) {
@@ -1 +1 @@
1
- {"version":3,"names":["clsx","useRef","useEffect","Spinner","useSelect","store","editPostStore","jsx","_jsx","jsxs","_jsxs","MetaBoxesArea","location","container","formRef","current","document","querySelector","appendChild","isSaving","select","isSavingMetaBoxes","classes","className","children","ref"],"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":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,MAAM,EAAEC,SAAS,QAAQ,oBAAoB;AACtD,SAASC,OAAO,QAAQ,uBAAuB;AAC/C,SAASC,SAAS,QAAQ,iBAAiB;;AAE3C;AACA;AACA;AACA,SAASC,KAAK,IAAIC,aAAa,QAAQ,gBAAgB;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA;AANA,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAOA,SAASC,aAAaA,CAAE;EAAEC;AAAS,CAAC,EAAG;EACtC,MAAMC,SAAS,GAAGZ,MAAM,CAAE,IAAK,CAAC;EAChC,MAAMa,OAAO,GAAGb,MAAM,CAAE,IAAK,CAAC;EAE9BC,SAAS,CAAE,MAAM;IAChBY,OAAO,CAACC,OAAO,GAAGC,QAAQ,CAACC,aAAa,CACvC,oBAAoB,GAAGL,QACxB,CAAC;IAED,IAAKE,OAAO,CAACC,OAAO,EAAG;MACtBF,SAAS,CAACE,OAAO,CAACG,WAAW,CAAEJ,OAAO,CAACC,OAAQ,CAAC;IACjD;IAEA,OAAO,MAAM;MACZ,IAAKD,OAAO,CAACC,OAAO,EAAG;QACtBC,QAAQ,CACNC,aAAa,CAAE,YAAa,CAAC,CAC7BC,WAAW,CAAEJ,OAAO,CAACC,OAAQ,CAAC;MACjC;IACD,CAAC;EACF,CAAC,EAAE,CAAEH,QAAQ,CAAG,CAAC;EAEjB,MAAMO,QAAQ,GAAGf,SAAS,CAAIgB,MAAM,IAAM;IACzC,OAAOA,MAAM,CAAEd,aAAc,CAAC,CAACe,iBAAiB,CAAC,CAAC;EACnD,CAAC,EAAE,EAAG,CAAC;EAEP,MAAMC,OAAO,GAAGtB,IAAI,CAAE,2BAA2B,EAAG,MAAMY,QAAU,EAAC,EAAE;IACtE,YAAY,EAAEO;EACf,CAAE,CAAC;EAEH,oBACCT,KAAA;IAAKa,SAAS,EAAGD,OAAS;IAAAE,QAAA,GACvBL,QAAQ,iBAAIX,IAAA,CAACL,OAAO,IAAE,CAAC,eACzBK,IAAA;MACCe,SAAS,EAAC,sCAAsC;MAChDE,GAAG,EAAGZ;IAAW,CACjB,CAAC,eACFL,IAAA;MAAKe,SAAS,EAAC;IAAkC,CAAE,CAAC;EAAA,CAChD,CAAC;AAER;AAEA,eAAeZ,aAAa","ignoreList":[]}
1
+ {"version":3,"names":["clsx","useRef","useEffect","Spinner","useSelect","store","editPostStore","jsx","_jsx","jsxs","_jsxs","MetaBoxesArea","location","container","formRef","current","document","querySelector","appendChild","isSaving","select","isSavingMetaBoxes","classes","className","children","ref"],"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":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,MAAM,EAAEC,SAAS,QAAQ,oBAAoB;AACtD,SAASC,OAAO,QAAQ,uBAAuB;AAC/C,SAASC,SAAS,QAAQ,iBAAiB;;AAE3C;AACA;AACA;AACA,SAASC,KAAK,IAAIC,aAAa,QAAQ,gBAAgB;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA;AANA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAOA,SAASC,aAAaA,CAAE;EAAEC;AAAS,CAAC,EAAG;EACtC,MAAMC,SAAS,GAAGZ,MAAM,CAAE,IAAK,CAAC;EAChC,MAAMa,OAAO,GAAGb,MAAM,CAAE,IAAK,CAAC;EAE9BC,SAAS,CAAE,MAAM;IAChBY,OAAO,CAACC,OAAO,GAAGC,QAAQ,CAACC,aAAa,CACvC,oBAAoB,GAAGL,QACxB,CAAC;IAED,IAAKE,OAAO,CAACC,OAAO,EAAG;MACtBF,SAAS,CAACE,OAAO,CAACG,WAAW,CAAEJ,OAAO,CAACC,OAAQ,CAAC;IACjD;IAEA,OAAO,MAAM;MACZ,IAAKD,OAAO,CAACC,OAAO,EAAG;QACtBC,QAAQ,CACNC,aAAa,CAAE,YAAa,CAAC,CAC7BC,WAAW,CAAEJ,OAAO,CAACC,OAAQ,CAAC;MACjC;IACD,CAAC;EACF,CAAC,EAAE,CAAEH,QAAQ,CAAG,CAAC;EAEjB,MAAMO,QAAQ,GAAGf,SAAS,CAAIgB,MAAM,IAAM;IACzC,OAAOA,MAAM,CAAEd,aAAc,CAAC,CAACe,iBAAiB,CAAC,CAAC;EACnD,CAAC,EAAE,EAAG,CAAC;EAEP,MAAMC,OAAO,GAAGtB,IAAI,CAAE,2BAA2B,EAAE,MAAOY,QAAQ,EAAG,EAAE;IACtE,YAAY,EAAEO;EACf,CAAE,CAAC;EAEH,oBACCT,KAAA;IAAKa,SAAS,EAAGD,OAAS;IAAAE,QAAA,GACvBL,QAAQ,iBAAIX,IAAA,CAACL,OAAO,IAAE,CAAC,eACzBK,IAAA;MACCe,SAAS,EAAC,sCAAsC;MAChDE,GAAG,EAAGZ;IAAW,CACjB,CAAC,eACFL,IAAA;MAAKe,SAAS,EAAC;IAAkC,CAAE,CAAC;EAAA,CAChD,CAAC;AAER;AAEA,eAAeZ,aAAa","ignoreList":[]}
@@ -14,9 +14,7 @@ import { unlock } from '../../lock-unlock';
14
14
  import ManagePatternsMenuItem from './manage-patterns-menu-item';
15
15
  import WelcomeGuideMenuItem from './welcome-guide-menu-item';
16
16
  import EditPostPreferencesModal from '../preferences-modal';
17
- import { jsx as _jsx } from "react/jsx-runtime";
18
- import { jsxs as _jsxs } from "react/jsx-runtime";
19
- import { Fragment as _Fragment } from "react/jsx-runtime";
17
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
20
18
  const {
21
19
  ToolsMoreMenuGroup,
22
20
  ViewMoreMenuGroup
@@ -1 +1 @@
1
- {"version":3,"names":["__","useViewportMatch","privateApis","editorPrivateApis","PreferenceToggleMenuItem","displayShortcut","unlock","ManagePatternsMenuItem","WelcomeGuideMenuItem","EditPostPreferencesModal","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","ToolsMoreMenuGroup","ViewMoreMenuGroup","MoreMenu","isLargeViewport","children","scope","name","label","info","messageActivated","messageDeactivated","shortcut","secondary"],"sources":["@wordpress/edit-post/src/components/more-menu/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { privateApis as editorPrivateApis } from '@wordpress/editor';\nimport { PreferenceToggleMenuItem } from '@wordpress/preferences';\nimport { displayShortcut } from '@wordpress/keycodes';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport ManagePatternsMenuItem from './manage-patterns-menu-item';\nimport WelcomeGuideMenuItem from './welcome-guide-menu-item';\nimport EditPostPreferencesModal from '../preferences-modal';\n\nconst { ToolsMoreMenuGroup, ViewMoreMenuGroup } = unlock( editorPrivateApis );\n\nconst MoreMenu = () => {\n\tconst isLargeViewport = useViewportMatch( 'large' );\n\n\treturn (\n\t\t<>\n\t\t\t{ isLargeViewport && (\n\t\t\t\t<ViewMoreMenuGroup>\n\t\t\t\t\t<PreferenceToggleMenuItem\n\t\t\t\t\t\tscope=\"core/edit-post\"\n\t\t\t\t\t\tname=\"fullscreenMode\"\n\t\t\t\t\t\tlabel={ __( 'Fullscreen mode' ) }\n\t\t\t\t\t\tinfo={ __( 'Show and hide the admin user interface' ) }\n\t\t\t\t\t\tmessageActivated={ __( 'Fullscreen mode activated' ) }\n\t\t\t\t\t\tmessageDeactivated={ __(\n\t\t\t\t\t\t\t'Fullscreen mode deactivated'\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tshortcut={ displayShortcut.secondary( 'f' ) }\n\t\t\t\t\t/>\n\t\t\t\t</ViewMoreMenuGroup>\n\t\t\t) }\n\t\t\t<ToolsMoreMenuGroup>\n\t\t\t\t<ManagePatternsMenuItem />\n\t\t\t\t<WelcomeGuideMenuItem />\n\t\t\t</ToolsMoreMenuGroup>\n\t\t\t<EditPostPreferencesModal />\n\t\t</>\n\t);\n};\n\nexport default MoreMenu;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,gBAAgB,QAAQ,oBAAoB;AACrD,SAASC,WAAW,IAAIC,iBAAiB,QAAQ,mBAAmB;AACpE,SAASC,wBAAwB,QAAQ,wBAAwB;AACjE,SAASC,eAAe,QAAQ,qBAAqB;;AAErD;AACA;AACA;AACA,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,OAAOC,sBAAsB,MAAM,6BAA6B;AAChE,OAAOC,oBAAoB,MAAM,2BAA2B;AAC5D,OAAOC,wBAAwB,MAAM,sBAAsB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAAA,SAAAC,QAAA,IAAAC,SAAA;AAE5D,MAAM;EAAEC,kBAAkB;EAAEC;AAAkB,CAAC,GAAGX,MAAM,CAAEH,iBAAkB,CAAC;AAE7E,MAAMe,QAAQ,GAAGA,CAAA,KAAM;EACtB,MAAMC,eAAe,GAAGlB,gBAAgB,CAAE,OAAQ,CAAC;EAEnD,oBACCY,KAAA,CAAAE,SAAA;IAAAK,QAAA,GACGD,eAAe,iBAChBR,IAAA,CAACM,iBAAiB;MAAAG,QAAA,eACjBT,IAAA,CAACP,wBAAwB;QACxBiB,KAAK,EAAC,gBAAgB;QACtBC,IAAI,EAAC,gBAAgB;QACrBC,KAAK,EAAGvB,EAAE,CAAE,iBAAkB,CAAG;QACjCwB,IAAI,EAAGxB,EAAE,CAAE,wCAAyC,CAAG;QACvDyB,gBAAgB,EAAGzB,EAAE,CAAE,2BAA4B,CAAG;QACtD0B,kBAAkB,EAAG1B,EAAE,CACtB,6BACD,CAAG;QACH2B,QAAQ,EAAGtB,eAAe,CAACuB,SAAS,CAAE,GAAI;MAAG,CAC7C;IAAC,CACgB,CACnB,eACDf,KAAA,CAACG,kBAAkB;MAAAI,QAAA,gBAClBT,IAAA,CAACJ,sBAAsB,IAAE,CAAC,eAC1BI,IAAA,CAACH,oBAAoB,IAAE,CAAC;IAAA,CACL,CAAC,eACrBG,IAAA,CAACF,wBAAwB,IAAE,CAAC;EAAA,CAC3B,CAAC;AAEL,CAAC;AAED,eAAeS,QAAQ","ignoreList":[]}
1
+ {"version":3,"names":["__","useViewportMatch","privateApis","editorPrivateApis","PreferenceToggleMenuItem","displayShortcut","unlock","ManagePatternsMenuItem","WelcomeGuideMenuItem","EditPostPreferencesModal","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","ToolsMoreMenuGroup","ViewMoreMenuGroup","MoreMenu","isLargeViewport","children","scope","name","label","info","messageActivated","messageDeactivated","shortcut","secondary"],"sources":["@wordpress/edit-post/src/components/more-menu/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { privateApis as editorPrivateApis } from '@wordpress/editor';\nimport { PreferenceToggleMenuItem } from '@wordpress/preferences';\nimport { displayShortcut } from '@wordpress/keycodes';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport ManagePatternsMenuItem from './manage-patterns-menu-item';\nimport WelcomeGuideMenuItem from './welcome-guide-menu-item';\nimport EditPostPreferencesModal from '../preferences-modal';\n\nconst { ToolsMoreMenuGroup, ViewMoreMenuGroup } = unlock( editorPrivateApis );\n\nconst MoreMenu = () => {\n\tconst isLargeViewport = useViewportMatch( 'large' );\n\n\treturn (\n\t\t<>\n\t\t\t{ isLargeViewport && (\n\t\t\t\t<ViewMoreMenuGroup>\n\t\t\t\t\t<PreferenceToggleMenuItem\n\t\t\t\t\t\tscope=\"core/edit-post\"\n\t\t\t\t\t\tname=\"fullscreenMode\"\n\t\t\t\t\t\tlabel={ __( 'Fullscreen mode' ) }\n\t\t\t\t\t\tinfo={ __( 'Show and hide the admin user interface' ) }\n\t\t\t\t\t\tmessageActivated={ __( 'Fullscreen mode activated' ) }\n\t\t\t\t\t\tmessageDeactivated={ __(\n\t\t\t\t\t\t\t'Fullscreen mode deactivated'\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tshortcut={ displayShortcut.secondary( 'f' ) }\n\t\t\t\t\t/>\n\t\t\t\t</ViewMoreMenuGroup>\n\t\t\t) }\n\t\t\t<ToolsMoreMenuGroup>\n\t\t\t\t<ManagePatternsMenuItem />\n\t\t\t\t<WelcomeGuideMenuItem />\n\t\t\t</ToolsMoreMenuGroup>\n\t\t\t<EditPostPreferencesModal />\n\t\t</>\n\t);\n};\n\nexport default MoreMenu;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,gBAAgB,QAAQ,oBAAoB;AACrD,SAASC,WAAW,IAAIC,iBAAiB,QAAQ,mBAAmB;AACpE,SAASC,wBAAwB,QAAQ,wBAAwB;AACjE,SAASC,eAAe,QAAQ,qBAAqB;;AAErD;AACA;AACA;AACA,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,OAAOC,sBAAsB,MAAM,6BAA6B;AAChE,OAAOC,oBAAoB,MAAM,2BAA2B;AAC5D,OAAOC,wBAAwB,MAAM,sBAAsB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA,EAAAC,QAAA,IAAAC,SAAA;AAE5D,MAAM;EAAEC,kBAAkB;EAAEC;AAAkB,CAAC,GAAGX,MAAM,CAAEH,iBAAkB,CAAC;AAE7E,MAAMe,QAAQ,GAAGA,CAAA,KAAM;EACtB,MAAMC,eAAe,GAAGlB,gBAAgB,CAAE,OAAQ,CAAC;EAEnD,oBACCY,KAAA,CAAAE,SAAA;IAAAK,QAAA,GACGD,eAAe,iBAChBR,IAAA,CAACM,iBAAiB;MAAAG,QAAA,eACjBT,IAAA,CAACP,wBAAwB;QACxBiB,KAAK,EAAC,gBAAgB;QACtBC,IAAI,EAAC,gBAAgB;QACrBC,KAAK,EAAGvB,EAAE,CAAE,iBAAkB,CAAG;QACjCwB,IAAI,EAAGxB,EAAE,CAAE,wCAAyC,CAAG;QACvDyB,gBAAgB,EAAGzB,EAAE,CAAE,2BAA4B,CAAG;QACtD0B,kBAAkB,EAAG1B,EAAE,CACtB,6BACD,CAAG;QACH2B,QAAQ,EAAGtB,eAAe,CAACuB,SAAS,CAAE,GAAI;MAAG,CAC7C;IAAC,CACgB,CACnB,eACDf,KAAA,CAACG,kBAAkB;MAAAI,QAAA,gBAClBT,IAAA,CAACJ,sBAAsB,IAAE,CAAC,eAC1BI,IAAA,CAACH,oBAAoB,IAAE,CAAC;IAAA,CACL,CAAC,eACrBG,IAAA,CAACF,wBAAwB,IAAE,CAAC;EAAA,CAC3B,CAAC;AAEL,CAAC;AAED,eAAeS,QAAQ","ignoreList":[]}
@@ -13,9 +13,7 @@ import { getPathAndQueryString } from '@wordpress/url';
13
13
  * Internal dependencies
14
14
  */
15
15
  import { unlock } from '../../lock-unlock';
16
- import { jsx as _jsx } from "react/jsx-runtime";
17
- import { Fragment as _Fragment } from "react/jsx-runtime";
18
- import { jsxs as _jsxs } from "react/jsx-runtime";
16
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
19
17
  const {
20
18
  PreferenceBaseOption
21
19
  } = unlock(preferencesPrivateApis);
@@ -34,11 +32,8 @@ export function CustomFieldsConfirmation({
34
32
  children: [/*#__PURE__*/_jsx("p", {
35
33
  className: "edit-post-preferences-modal__custom-fields-confirmation-message",
36
34
  children: __('A page reload is required for this change. Make sure your content is saved before reloading.')
37
- }), /*#__PURE__*/_jsx(Button
38
- // TODO: Switch to `true` (40px size) if possible
39
- , {
40
- __next40pxDefaultSize: false,
41
- className: "edit-post-preferences-modal__custom-fields-confirmation-button",
35
+ }), /*#__PURE__*/_jsx(Button, {
36
+ __next40pxDefaultSize: true,
42
37
  variant: "secondary",
43
38
  isBusy: isReloading,
44
39
  accessibleWhenDisabled: true,
@@ -1 +1 @@
1
- {"version":3,"names":["useState","__","Button","withSelect","store","editorStore","privateApis","preferencesPrivateApis","getPathAndQueryString","unlock","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","PreferenceBaseOption","submitCustomFieldsForm","customFieldsForm","document","getElementById","querySelector","setAttribute","window","location","href","submit","CustomFieldsConfirmation","willEnable","isReloading","setIsReloading","children","className","__next40pxDefaultSize","variant","isBusy","accessibleWhenDisabled","disabled","onClick","EnableCustomFieldsOption","label","areCustomFieldsEnabled","isChecked","setIsChecked","onChange","select","getEditorSettings","enableCustomFields"],"sources":["@wordpress/edit-post/src/components/preferences-modal/enable-custom-fields.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useState } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { withSelect } from '@wordpress/data';\nimport { store as editorStore } from '@wordpress/editor';\nimport { privateApis as preferencesPrivateApis } from '@wordpress/preferences';\nimport { getPathAndQueryString } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\nconst { PreferenceBaseOption } = unlock( preferencesPrivateApis );\n\nfunction submitCustomFieldsForm() {\n\tconst customFieldsForm = document.getElementById(\n\t\t'toggle-custom-fields-form'\n\t);\n\n\t// Ensure the referrer values is up to update with any\n\tcustomFieldsForm\n\t\t.querySelector( '[name=\"_wp_http_referer\"]' )\n\t\t.setAttribute( 'value', getPathAndQueryString( window.location.href ) );\n\n\tcustomFieldsForm.submit();\n}\n\nexport function CustomFieldsConfirmation( { willEnable } ) {\n\tconst [ isReloading, setIsReloading ] = useState( false );\n\treturn (\n\t\t<>\n\t\t\t<p className=\"edit-post-preferences-modal__custom-fields-confirmation-message\">\n\t\t\t\t{ __(\n\t\t\t\t\t'A page reload is required for this change. Make sure your content is saved before reloading.'\n\t\t\t\t) }\n\t\t\t</p>\n\t\t\t<Button\n\t\t\t\t// TODO: Switch to `true` (40px size) if possible\n\t\t\t\t__next40pxDefaultSize={ false }\n\t\t\t\tclassName=\"edit-post-preferences-modal__custom-fields-confirmation-button\"\n\t\t\t\tvariant=\"secondary\"\n\t\t\t\tisBusy={ isReloading }\n\t\t\t\taccessibleWhenDisabled\n\t\t\t\tdisabled={ isReloading }\n\t\t\t\tonClick={ () => {\n\t\t\t\t\tsetIsReloading( true );\n\t\t\t\t\tsubmitCustomFieldsForm();\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t{ willEnable\n\t\t\t\t\t? __( 'Show & Reload Page' )\n\t\t\t\t\t: __( 'Hide & Reload Page' ) }\n\t\t\t</Button>\n\t\t</>\n\t);\n}\n\nexport function EnableCustomFieldsOption( { label, areCustomFieldsEnabled } ) {\n\tconst [ isChecked, setIsChecked ] = useState( areCustomFieldsEnabled );\n\n\treturn (\n\t\t<PreferenceBaseOption\n\t\t\tlabel={ label }\n\t\t\tisChecked={ isChecked }\n\t\t\tonChange={ setIsChecked }\n\t\t>\n\t\t\t{ isChecked !== areCustomFieldsEnabled && (\n\t\t\t\t<CustomFieldsConfirmation willEnable={ isChecked } />\n\t\t\t) }\n\t\t</PreferenceBaseOption>\n\t);\n}\n\nexport default withSelect( ( select ) => ( {\n\tareCustomFieldsEnabled:\n\t\t!! select( editorStore ).getEditorSettings().enableCustomFields,\n} ) )( EnableCustomFieldsOption );\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,QAAQ,QAAQ,oBAAoB;AAC7C,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,SAASC,UAAU,QAAQ,iBAAiB;AAC5C,SAASC,KAAK,IAAIC,WAAW,QAAQ,mBAAmB;AACxD,SAASC,WAAW,IAAIC,sBAAsB,QAAQ,wBAAwB;A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ACR,CAAC;AAEL;AAEA,OAAO,SAASsC,wBAAwBA,CAAE;EAAEC,KAAK;EAAEC;AAAuB,CAAC,EAAG;EAC7E,MAAM,CAAEC,SAAS,EAAEC,YAAY,CAAE,GAAG3C,QAAQ,CAAEyC,sBAAuB,CAAC;EAEtE,oBACC9B,IAAA,CAACK,oBAAoB;IACpBwB,KAAK,EAAGA,KAAO;IACfE,SAAS,EAAGA,SAAW;IACvBE,QAAQ,EAAGD,YAAc;IAAAZ,QAAA,EAEvBW,SAAS,KAAKD,sBAAsB,iBACrC9B,IAAA,CAACgB,wBAAwB;MAACC,UAAU,EAAGc;IAAW,CAAE;EACpD,CACoB,CAAC;AAEzB;AAEA,eAAevC,UAAU,CAAI0C,MAAM,KAAQ;EAC1CJ,sBAAsB,EACrB,CAAC,CAAEI,MAAM,CAAExC,WAAY,CAAC,CAACyC,iBAAiB,CAAC,CAAC,CAACC;AAC/C,CAAC,CAAG,CAAC,CAAER,wBAAyB,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["useState","__","Button","withSelect","store","editorStore","privateApis","preferencesPrivateApis","getPathAndQueryString","unlock","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","PreferenceBaseOption","submitCustomFieldsForm","customFieldsForm","document","getElementById","querySelector","setAttribute","window","location","href","submit","CustomFieldsConfirmation","willEnable","isReloading","setIsReloading","children","className","__next40pxDefaultSize","variant","isBusy","accessibleWhenDisabled","disabled","onClick","EnableCustomFieldsOption","label","areCustomFieldsEnabled","isChecked","setIsChecked","onChange","select","getEditorSettings","enableCustomFields"],"sources":["@wordpress/edit-post/src/components/preferences-modal/enable-custom-fields.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useState } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { withSelect } from '@wordpress/data';\nimport { store as editorStore } from '@wordpress/editor';\nimport { privateApis as preferencesPrivateApis } from '@wordpress/preferences';\nimport { getPathAndQueryString } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\nconst { PreferenceBaseOption } = unlock( preferencesPrivateApis );\n\nfunction submitCustomFieldsForm() {\n\tconst customFieldsForm = document.getElementById(\n\t\t'toggle-custom-fields-form'\n\t);\n\n\t// Ensure the referrer values is up to update with any\n\tcustomFieldsForm\n\t\t.querySelector( '[name=\"_wp_http_referer\"]' )\n\t\t.setAttribute( 'value', getPathAndQueryString( window.location.href ) );\n\n\tcustomFieldsForm.submit();\n}\n\nexport function CustomFieldsConfirmation( { willEnable } ) {\n\tconst [ isReloading, setIsReloading ] = useState( false );\n\treturn (\n\t\t<>\n\t\t\t<p className=\"edit-post-preferences-modal__custom-fields-confirmation-message\">\n\t\t\t\t{ __(\n\t\t\t\t\t'A page reload is required for this change. Make sure your content is saved before reloading.'\n\t\t\t\t) }\n\t\t\t</p>\n\t\t\t<Button\n\t\t\t\t__next40pxDefaultSize\n\t\t\t\tvariant=\"secondary\"\n\t\t\t\tisBusy={ isReloading }\n\t\t\t\taccessibleWhenDisabled\n\t\t\t\tdisabled={ isReloading }\n\t\t\t\tonClick={ () => {\n\t\t\t\t\tsetIsReloading( true );\n\t\t\t\t\tsubmitCustomFieldsForm();\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t{ willEnable\n\t\t\t\t\t? __( 'Show & Reload Page' )\n\t\t\t\t\t: __( 'Hide & Reload Page' ) }\n\t\t\t</Button>\n\t\t</>\n\t);\n}\n\nexport function EnableCustomFieldsOption( { label, areCustomFieldsEnabled } ) {\n\tconst [ isChecked, setIsChecked ] = useState( areCustomFieldsEnabled );\n\n\treturn (\n\t\t<PreferenceBaseOption\n\t\t\tlabel={ label }\n\t\t\tisChecked={ isChecked }\n\t\t\tonChange={ setIsChecked }\n\t\t>\n\t\t\t{ isChecked !== areCustomFieldsEnabled && (\n\t\t\t\t<CustomFieldsConfirmation willEnable={ isChecked } />\n\t\t\t) }\n\t\t</PreferenceBaseOption>\n\t);\n}\n\nexport default withSelect( ( select ) => ( {\n\tareCustomFieldsEnabled:\n\t\t!! select( editorStore ).getEditorSettings().enableCustomFields,\n} ) )( EnableCustomFieldsOption );\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,QAAQ,QAAQ,oBAAoB;AAC7C,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,SAASC,UAAU,QAAQ,iBAAiB;AAC5C,SAASC,KAAK,IAAIC,WAAW,QAAQ,mBAAmB;AACxD,SAASC,WAAW,IAAIC,sBAAsB,QAAQ,wBAAwB;AAC9E,SAASC,qBAAqB,QAAQ,gBAAgB;;AAEtD;AACA;AACA;AACA,SAASC,MAAM,QAAQ,mBAAmB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,QAAA,IAAAC,SAAA,EAAAC,IAAA,IAAAC,KAAA;AAE3C,MAAM;EAAEC;AAAqB,CAAC,GAAGP,MAAM,CAAEF,sBAAuB,CAAC;AAEjE,SAASU,sBAAsBA,CAAA,EAAG;EACjC,MAAMC,gBAAgB,GAAGC,QAAQ,CAACC,cAAc,CAC/C,2BACD,CAAC;;EAED;EACAF,gBAAgB,CACdG,aAAa,CAAE,2BAA4B,CAAC,CAC5CC,YAAY,CAAE,OAAO,EAAEd,qBAAqB,CAAEe,MAAM,CAACC,QAAQ,CAACC,IAAK,CAAE,CAAC;EAExEP,gBAAgB,CAACQ,MAAM,CAAC,CAAC;AAC1B;AAEA,OAAO,SAASC,wBAAwBA,CAAE;EAAEC;AAAW,CAAC,EAAG;EAC1D,MAAM,CAAEC,WAAW,EAAEC,cAAc,CAAE,GAAG9B,QAAQ,CAAE,KAAM,CAAC;EACzD,oBACCe,KAAA,CAAAF,SAAA;IAAAkB,QAAA,gBACCpB,IAAA;MAAGqB,SAAS,EAAC,iEAAiE;MAAAD,QAAA,EAC3E9B,EAAE,CACH,8FACD;IAAC,CACC,CAAC,eACJU,IAAA,CAACT,MAAM;MACN+B,qBAAqB;MACrBC,OAAO,EAAC,WAAW;MACnBC,MAAM,EAAGN,WAAa;MACtBO,sBAAsB;MACtBC,QAAQ,EAAGR,WAAa;MACxBS,OAAO,EAAGA,CAAA,KAAM;QACfR,cAAc,CAAE,IAAK,CAAC;QACtBb,sBAAsB,CAAC,CAAC;MACzB,CAAG;MAAAc,QAAA,EAEDH,UAAU,GACT3B,EAAE,CAAE,oBAAqB,CAAC,GAC1BA,EAAE,CAAE,oBAAqB;IAAC,CACtB,CAAC;EAAA,CACR,CAAC;AAEL;AAEA,OAAO,SAASsC,wBAAwBA,CAAE;EAAEC,KAAK;EAAEC;AAAuB,CAAC,EAAG;EAC7E,MAAM,CAAEC,SAAS,EAAEC,YAAY,CAAE,GAAG3C,QAAQ,CAAEyC,sBAAuB,CAAC;EAEtE,oBACC9B,IAAA,CAACK,oBAAoB;IACpBwB,KAAK,EAAGA,KAAO;IACfE,SAAS,EAAGA,SAAW;IACvBE,QAAQ,EAAGD,YAAc;IAAAZ,QAAA,EAEvBW,SAAS,KAAKD,sBAAsB,iBACrC9B,IAAA,CAACgB,wBAAwB;MAACC,UAAU,EAAGc;IAAW,CAAE;EACpD,CACoB,CAAC;AAEzB;AAEA,eAAevC,UAAU,CAAI0C,MAAM,KAAQ;EAC1CJ,sBAAsB,EACrB,CAAC,CAAEI,MAAM,CAAExC,WAAY,CAAC,CAACyC,iBAAiB,CAAC,CAAC,CAACC;AAC/C,CAAC,CAAG,CAAC,CAAER,wBAAyB,CAAC","ignoreList":[]}
@@ -13,8 +13,7 @@ import EnableCustomFieldsOption from './enable-custom-fields';
13
13
  import EnablePanelOption from './enable-panel';
14
14
  import { store as editPostStore } from '../../store';
15
15
  import { unlock } from '../../lock-unlock';
16
- import { jsx as _jsx } from "react/jsx-runtime";
17
- import { jsxs as _jsxs } from "react/jsx-runtime";
16
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
18
17
  const {
19
18
  PreferencesModalSection
20
19
  } = unlock(preferencesPrivateApis);
@@ -1 +1 @@
1
- {"version":3,"names":["__","withSelect","store","editorStore","privateApis","preferencesPrivateApis","EnableCustomFieldsOption","EnablePanelOption","editPostStore","unlock","jsx","_jsx","jsxs","_jsxs","PreferencesModalSection","MetaBoxesSection","areCustomFieldsRegistered","metaBoxes","sectionProps","thirdPartyMetaBoxes","filter","id","length","children","label","map","title","panelName","select","getEditorSettings","getAllMetaBoxes","enableCustomFields","undefined"],"sources":["@wordpress/edit-post/src/components/preferences-modal/meta-boxes-section.js"],"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\tgetEditorSettings().enableCustomFields !== undefined,\n\t\tmetaBoxes: getAllMetaBoxes(),\n\t};\n} )( MetaBoxesSection );\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,UAAU,QAAQ,iBAAiB;AAC5C,SAASC,KAAK,IAAIC,WAAW,QAAQ,mBAAmB;AACxD,SAASC,WAAW,IAAIC,sBAAsB,QAAQ,wBAAwB;;AAE9E;AACA;AACA;AACA,OAAOC,wBAAwB,MAAM,wBAAwB;AAC7D,OAAOC,iBAAiB,MAAM,gBAAgB;AAC9C,SAASL,KAAK,IAAIM,aAAa,QAAQ,aAAa;AACpD,SAASC,MAAM,QAAQ,mBAAmB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAE3C,MAAM;EAAEC;AAAwB,CAAC,GAAGL,MAAM,CAAEJ,sBAAuB,CAAC;AAEpE,OAAO,SAASU,gBAAgBA,CAAE;EACjCC,yBAAyB;EACzBC,SAAS;EACT,GAAGC;AACJ,CAAC,EAAG;EACH;EACA,MAAMC,mBAAmB,GAAGF,SAAS,CAACG,MAAM,CAC3C,CAAE;IAAEC;EAAG,CAAC,KAAMA,EAAE,KAAK,YACtB,CAAC;EAED,IAAK,CAAEL,yBAAyB,IAAIG,mBAAmB,CAACG,MAAM,KAAK,CAAC,EAAG;IACtE,OAAO,IAAI;EACZ;EAEA,oBACCT,KAAA,CAACC,uBAAuB;IAAA,GAAMI,YAAY;IAAAK,QAAA,GACvCP,yBAAyB,iBAC1BL,IAAA,CAACL,wBAAwB;MAACkB,KAAK,EAAGxB,EAAE,CAAE,eAAgB;IAAG,CAAE,CAC3D,EACCmB,mBAAmB,CAACM,GAAG,CAAE,CAAE;MAAEJ,EAAE;MAAEK;IAAM,CAAC,kBACzCf,IAAA,CAACJ,iBAAiB;MAEjBiB,KAAK,EAAGE,KAAO;MACfC,SAAS,EAAI,YAAYN,EAAI;IAAG,GAF1BA,EAGN,CACA,CAAC;EAAA,CACqB,CAAC;AAE5B;AAEA,eAAepB,UAAU,CAAI2B,MAAM,IAAM;EACxC,MAAM;IAAEC;EAAkB,CAAC,GAAGD,MAAM,CAAEzB,WAAY,CAAC;EACnD,MAAM;IAAE2B;EAAgB,CAAC,GAAGF,MAAM,CAAEpB,aAAc,CAAC;EAEnD,OAAO;IACN;IACAQ,yBAAyB,EACxBa,iBAAiB,CAAC,CAAC,CAACE,kBAAkB,KAAKC,SAAS;IACrDf,SAAS,EAAEa,eAAe,CAAC;EAC5B,CAAC;AACF,CAAE,CAAC,CAAEf,gBAAiB,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["__","withSelect","store","editorStore","privateApis","preferencesPrivateApis","EnableCustomFieldsOption","EnablePanelOption","editPostStore","unlock","jsx","_jsx","jsxs","_jsxs","PreferencesModalSection","MetaBoxesSection","areCustomFieldsRegistered","metaBoxes","sectionProps","thirdPartyMetaBoxes","filter","id","length","children","label","map","title","panelName","select","getEditorSettings","getAllMetaBoxes","enableCustomFields","undefined"],"sources":["@wordpress/edit-post/src/components/preferences-modal/meta-boxes-section.js"],"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\tgetEditorSettings().enableCustomFields !== undefined,\n\t\tmetaBoxes: getAllMetaBoxes(),\n\t};\n} )( MetaBoxesSection );\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,UAAU,QAAQ,iBAAiB;AAC5C,SAASC,KAAK,IAAIC,WAAW,QAAQ,mBAAmB;AACxD,SAASC,WAAW,IAAIC,sBAAsB,QAAQ,wBAAwB;;AAE9E;AACA;AACA;AACA,OAAOC,wBAAwB,MAAM,wBAAwB;AAC7D,OAAOC,iBAAiB,MAAM,gBAAgB;AAC9C,SAASL,KAAK,IAAIM,aAAa,QAAQ,aAAa;AACpD,SAASC,MAAM,QAAQ,mBAAmB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAE3C,MAAM;EAAEC;AAAwB,CAAC,GAAGL,MAAM,CAAEJ,sBAAuB,CAAC;AAEpE,OAAO,SAASU,gBAAgBA,CAAE;EACjCC,yBAAyB;EACzBC,SAAS;EACT,GAAGC;AACJ,CAAC,EAAG;EACH;EACA,MAAMC,mBAAmB,GAAGF,SAAS,CAACG,MAAM,CAC3C,CAAE;IAAEC;EAAG,CAAC,KAAMA,EAAE,KAAK,YACtB,CAAC;EAED,IAAK,CAAEL,yBAAyB,IAAIG,mBAAmB,CAACG,MAAM,KAAK,CAAC,EAAG;IACtE,OAAO,IAAI;EACZ;EAEA,oBACCT,KAAA,CAACC,uBAAuB;IAAA,GAAMI,YAAY;IAAAK,QAAA,GACvCP,yBAAyB,iBAC1BL,IAAA,CAACL,wBAAwB;MAACkB,KAAK,EAAGxB,EAAE,CAAE,eAAgB;IAAG,CAAE,CAC3D,EACCmB,mBAAmB,CAACM,GAAG,CAAE,CAAE;MAAEJ,EAAE;MAAEK;IAAM,CAAC,kBACzCf,IAAA,CAACJ,iBAAiB;MAEjBiB,KAAK,EAAGE,KAAO;MACfC,SAAS,EAAG,YAAaN,EAAE;IAAK,GAF1BA,EAGN,CACA,CAAC;EAAA,CACqB,CAAC;AAE5B;AAEA,eAAepB,UAAU,CAAI2B,MAAM,IAAM;EACxC,MAAM;IAAEC;EAAkB,CAAC,GAAGD,MAAM,CAAEzB,WAAY,CAAC;EACnD,MAAM;IAAE2B;EAAgB,CAAC,GAAGF,MAAM,CAAEpB,aAAc,CAAC;EAEnD,OAAO;IACN;IACAQ,yBAAyB,EACxBa,iBAAiB,CAAC,CAAC,CAACE,kBAAkB,KAAKC,SAAS;IACrDf,SAAS,EAAEa,eAAe,CAAC;EAC5B,CAAC;AACF,CAAE,CAAC,CAAEf,gBAAiB,CAAC","ignoreList":[]}
@@ -11,9 +11,7 @@ import { createInterpolateElement } from '@wordpress/element';
11
11
  */
12
12
  import WelcomeGuideImage from './image';
13
13
  import { store as editPostStore } from '../../store';
14
- import { jsx as _jsx } from "react/jsx-runtime";
15
- import { Fragment as _Fragment } from "react/jsx-runtime";
16
- import { jsxs as _jsxs } from "react/jsx-runtime";
14
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
17
15
  export default function WelcomeGuideDefault() {
18
16
  const {
19
17
  toggleFeature
@@ -1 +1 @@
1
- {"version":3,"names":["useDispatch","ExternalLink","Guide","__","createInterpolateElement","WelcomeGuideImage","store","editPostStore","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","WelcomeGuideDefault","toggleFeature","className","contentLabel","finishButtonText","onFinish","pages","image","nonAnimatedSrc","animatedSrc","content","children","InserterIconImage","alt","src","a","href"],"sources":["@wordpress/edit-post/src/components/welcome-guide/default.js"],"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 block 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 block 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 “block” 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{ __( 'Make each block your own' ) }\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{ __( 'Get to know the block library' ) }\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’ll 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 how to use the block 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{ 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\t\t\t\t\t\t\t\t\t'https://wordpress.org/documentation/article/wordpress-block-editor/'\n\t\t\t\t\t\t\t\t\t\t\t\t) }\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] }\n\t\t/>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,WAAW,QAAQ,iBAAiB;AAC7C,SAASC,YAAY,EAAEC,KAAK,QAAQ,uBAAuB;AAC3D,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,wBAAwB,QAAQ,oBAAoB;;AAE7D;AACA;AACA;AACA,OAAOC,iBAAiB,MAAM,SAAS;AACvC,SAASC,KAAK,IAAIC,aAAa,QAAQ,aAAa;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,QAAA,IAAAC,SAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAErD,eAAe,SAASC,mBAAmBA,CAAA,EAAG;EAC7C,MAAM;IAAEC;EAAc,CAAC,GAAGf,WAAW,CAAEO,aAAc,CAAC;EAEtD,oBACCE,IAAA,CAACP,KAAK;IACLc,SAAS,EAAC,yBAAyB;IACnCC,YAAY,EAAGd,EAAE,CAAE,6BAA8B,CAAG;IACpDe,gBAAgB,EAAGf,EAAE,CAAE,aAAc,CAAG;IACxCgB,QAAQ,EAAGA,CAAA,KAAMJ,aAAa,CAAE,cA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,UAAW,CAAG;cACxByB,GAAG,EAAC;YAA2Q,CAC/Q;UAEH,CACD;QAAC,CACC,CAAC;MAAA,CACH;IAEJ,CAAC,EACD;MACCP,KAAK,eACJZ,IAAA,CAACJ,iBAAiB;QACjBiB,cAAc,EAAC,+DAA+D;QAC9EC,WAAW,EAAC;MAA+D,CAC3E,CACD;MACDC,OAAO,eACNX,KAAA,CAAAF,SAAA;QAAAc,QAAA,gBACChB,IAAA;UAAIO,SAAS,EAAC,kCAAkC;UAAAS,QAAA,EAC7CtB,EAAE,CAAE,mCAAoC;QAAC,CACxC,CAAC,eACLM,IAAA;UAAGO,SAAS,EAAC,+BAA+B;UAAAS,QAAA,EACzCrB,wBAAwB,CACzBD,EAAE,CACD,6FACD,CAAC,EACD;YACC0B,CAAC,eACApB,IAAA,CAACR,YAAY;cACZ6B,IAAI,EAAG3B,EAAE,CACR,qEACD;YAAG,CACH;UAEH,CACD;QAAC,CACC,CAAC;MAAA,CACH;IAEJ,CAAC;EACC,CACH,CAAC;AAEJ","ignoreList":[]}
1
+ {"version":3,"names":["useDispatch","ExternalLink","Guide","__","createInterpolateElement","WelcomeGuideImage","store","editPostStore","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","WelcomeGuideDefault","toggleFeature","className","contentLabel","finishButtonText","onFinish","pages","image","nonAnimatedSrc","animatedSrc","content","children","InserterIconImage","alt","src","a","href"],"sources":["@wordpress/edit-post/src/components/welcome-guide/default.js"],"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 block 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 block 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 “block” 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{ __( 'Make each block your own' ) }\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{ __( 'Get to know the block library' ) }\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’ll 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 how to use the block 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{ 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\t\t\t\t\t\t\t\t\t'https://wordpress.org/documentation/article/wordpress-block-editor/'\n\t\t\t\t\t\t\t\t\t\t\t\t) }\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] }\n\t\t/>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,WAAW,QAAQ,iBAAiB;AAC7C,SAASC,YAAY,EAAEC,KAAK,QAAQ,uBAAuB;AAC3D,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,wBAAwB,QAAQ,oBAAo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,EAAE,CACH,4KACD;QAAC,CACC,CAAC;MAAA,CACH;IAEJ,CAAC,EACD;MACCkB,KAAK,eACJZ,IAAA,CAACJ,iBAAiB;QACjBiB,cAAc,EAAC,yDAAyD;QACxEC,WAAW,EAAC;MAAyD,CACrE,CACD;MACDC,OAAO,eACNX,KAAA,CAAAF,SAAA;QAAAc,QAAA,gBACChB,IAAA;UAAIO,SAAS,EAAC,kCAAkC;UAAAS,QAAA,EAC7CtB,EAAE,CAAE,+BAAgC;QAAC,CACpC,CAAC,eACLM,IAAA;UAAGO,SAAS,EAAC,+BAA+B;UAAAS,QAAA,EACzCrB,wBAAwB,CACzBD,EAAE,CACD,+HACD,CAAC,EACD;YACCuB,iBAAiB,eAChBjB,IAAA;cACCkB,GAAG,EAAGxB,EAAE,CAAE,UAAW,CAAG;cACxByB,GAAG,EAAC;YAA2Q,CAC/Q;UAEH,CACD;QAAC,CACC,CAAC;MAAA,CACH;IAEJ,CAAC,EACD;MACCP,KAAK,eACJZ,IAAA,CAACJ,iBAAiB;QACjBiB,cAAc,EAAC,+DAA+D;QAC9EC,WAAW,EAAC;MAA+D,CAC3E,CACD;MACDC,OAAO,eACNX,KAAA,CAAAF,SAAA;QAAAc,QAAA,gBACChB,IAAA;UAAIO,SAAS,EAAC,kCAAkC;UAAAS,QAAA,EAC7CtB,EAAE,CAAE,mCAAoC;QAAC,CACxC,CAAC,eACLM,IAAA;UAAGO,SAAS,EAAC,+BAA+B;UAAAS,QAAA,EACzCrB,wBAAwB,CACzBD,EAAE,CACD,6FACD,CAAC,EACD;YACC0B,CAAC,eACApB,IAAA,CAACR,YAAY;cACZ6B,IAAI,EAAG3B,EAAE,CACR,qEACD;YAAG,CACH;UAEH,CACD;QAAC,CACC,CAAC;MAAA,CACH;IAEJ,CAAC;EACC,CACH,CAAC;AAEJ","ignoreList":[]}
@@ -1,5 +1,4 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
2
  export default function WelcomeGuideImage({
4
3
  nonAnimatedSrc,
5
4
  animatedSrc
@@ -1 +1 @@
1
- {"version":3,"names":["WelcomeGuideImage","nonAnimatedSrc","animatedSrc","_jsxs","className","children","_jsx","srcSet","media","src","width","height","alt"],"sources":["@wordpress/edit-post/src/components/welcome-guide/image.js"],"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"],"mappings":";;AAAA,eAAe,SAASA,iBAAiBA,CAAE;EAAEC,cAAc;EAAEC;AAAY,CAAC,EAAG;EAC5E,oBACCC,KAAA;IAASC,SAAS,EAAC,gCAAgC;IAAAC,QAAA,gBAClDC,IAAA;MACCC,MAAM,EAAGN,cAAgB;MACzBO,KAAK,EAAC;IAAkC,CACxC,CAAC,eACFF,IAAA;MAAKG,GAAG,EAAGP,WAAa;MAACQ,KAAK,EAAC,KAAK;MAACC,MAAM,EAAC,KAAK;MAACC,GAAG,EAAC;IAAE,CAAE,CAAC;EAAA,CACnD,CAAC;AAEZ","ignoreList":[]}
1
+ {"version":3,"names":["WelcomeGuideImage","nonAnimatedSrc","animatedSrc","_jsxs","className","children","_jsx","srcSet","media","src","width","height","alt"],"sources":["@wordpress/edit-post/src/components/welcome-guide/image.js"],"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"],"mappings":";AAAA,eAAe,SAASA,iBAAiBA,CAAE;EAAEC,cAAc;EAAEC;AAAY,CAAC,EAAG;EAC5E,oBACCC,KAAA;IAASC,SAAS,EAAC,gCAAgC;IAAAC,QAAA,gBAClDC,IAAA;MACCC,MAAM,EAAGN,cAAgB;MACzBO,KAAK,EAAC;IAAkC,CACxC,CAAC,eACFF,IAAA;MAAKG,GAAG,EAAGP,WAAa;MAACQ,KAAK,EAAC,KAAK;MAACC,MAAM,EAAC,KAAK;MAACC,GAAG,EAAC;IAAE,CAAE,CAAC;EAAA,CACnD,CAAC;AAEZ","ignoreList":[]}
@@ -10,9 +10,7 @@ import { __ } from '@wordpress/i18n';
10
10
  */
11
11
  import WelcomeGuideImage from './image';
12
12
  import { store as editPostStore } from '../../store';
13
- import { jsx as _jsx } from "react/jsx-runtime";
14
- import { Fragment as _Fragment } from "react/jsx-runtime";
15
- import { jsxs as _jsxs } from "react/jsx-runtime";
13
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
16
14
  export default function WelcomeGuideTemplate() {
17
15
  const {
18
16
  toggleFeature
@@ -1 +1 @@
1
- {"version":3,"names":["useDispatch","Guide","__","WelcomeGuideImage","store","editPostStore","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","WelcomeGuideTemplate","toggleFeature","className","contentLabel","finishButtonText","onFinish","pages","image","nonAnimatedSrc","animatedSrc","content","children"],"sources":["@wordpress/edit-post/src/components/welcome-guide/template.js"],"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"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,WAAW,QAAQ,iBAAiB;AAC7C,SAASC,KAAK,QAAQ,uBAAuB;AAC7C,SAASC,EAAE,QAAQ,iBAAiB;;AAEpC;AACA;AACA;AACA,OAAOC,iBAAiB,MAAM,SAAS;AACvC,SAASC,KAAK,IAAIC,aAAa,QAAQ,aAAa;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,QAAA,IAAAC,SAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAErD,eAAe,SAASC,oBAAoBA,CAAA,EAAG;EAC9C,MAAM;IAAEC;EAAc,CAAC,GAAGb,WAAW,CAAEK,aAAc,CAAC;EAEtD,oBACCE,IAAA,CAACN,KAAK;IACLa,SAAS,EAAC,6BAA6B;IACvCC,YAAY,EAAGb,EAAE,CAAE,gCAAiC,CAAG;IACvDc,gBAAgB,EAAGd,EAAE,CAAE,aAAc,CAAG;IACxCe,QAAQ,EAAGA,CAAA,KAAMJ,aAAa,CAAE,sBAAuB,CAAG;IAC1DK,KAAK,EAAG,CACP;MACCC,KAAK,eACJZ,IAAA,CAACJ,iBAAiB;QACjBiB,cAAc,EAAC,iEAAiE;QAChFC,WAAW,EAAC;MAAiE,CAC7E,CACD;MACDC,OAAO,eACNX,KAAA,CAAAF,SAAA;QAAAc,QAAA,gBACChB,IAAA;UAAIO,SAAS,EAAC,kCAAkC;UAAAS,QAAA,EAC7CrB,EAAE,CAAE,gCAAiC;QAAC,CACrC,CAAC,eACLK,IAAA;UAAGO,SAAS,EAAC,+BAA+B;UAAAS,QAAA,EACzCrB,EAAE,CACH,+IACD;QAAC,CACC,CAAC;MAAA,CACH;IAEJ,CAAC;EACC,CACH,CAAC;AAEJ","ignoreList":[]}
1
+ {"version":3,"names":["useDispatch","Guide","__","WelcomeGuideImage","store","editPostStore","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","WelcomeGuideTemplate","toggleFeature","className","contentLabel","finishButtonText","onFinish","pages","image","nonAnimatedSrc","animatedSrc","content","children"],"sources":["@wordpress/edit-post/src/components/welcome-guide/template.js"],"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"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,WAAW,QAAQ,iBAAiB;AAC7C,SAASC,KAAK,QAAQ,uBAAuB;AAC7C,SAASC,EAAE,QAAQ,iBAAiB;;AAEpC;AACA;AACA;AACA,OAAOC,iBAAiB,MAAM,SAAS;AACvC,SAASC,KAAK,IAAIC,aAAa,QAAQ,aAAa;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,QAAA,IAAAC,SAAA,EAAAC,IAAA,IAAAC,KAAA;AAErD,eAAe,SAASC,oBAAoBA,CAAA,EAAG;EAC9C,MAAM;IAAEC;EAAc,CAAC,GAAGb,WAAW,CAAEK,aAAc,CAAC;EAEtD,oBACCE,IAAA,CAACN,KAAK;IACLa,SAAS,EAAC,6BAA6B;IACvCC,YAAY,EAAGb,EAAE,CAAE,gCAAiC,CAAG;IACvDc,gBAAgB,EAAGd,EAAE,CAAE,aAAc,CAAG;IACxCe,QAAQ,EAAGA,CAAA,KAAMJ,aAAa,CAAE,sBAAuB,CAAG;IAC1DK,KAAK,EAAG,CACP;MACCC,KAAK,eACJZ,IAAA,CAACJ,iBAAiB;QACjBiB,cAAc,EAAC,iEAAiE;QAChFC,WAAW,EAAC;MAAiE,CAC7E,CACD;MACDC,OAAO,eACNX,KAAA,CAAAF,SAAA;QAAAc,QAAA,gBACChB,IAAA;UAAIO,SAAS,EAAC,kCAAkC;UAAAS,QAAA,EAC7CrB,EAAE,CAAE,gCAAiC;QAAC,CACrC,CAAC,eACLK,IAAA;UAAGO,SAAS,EAAC,+BAA+B;UAAAS,QAAA,EACzCrB,EAAE,CACH,+IACD;QAAC,CACC,CAAC;MAAA,CACH;IAEJ,CAAC;EACC,CACH,CAAC;AAEJ","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["privateApis","editorPrivateApis","PluginBlockSettingsMenuItem","EditorPluginBlockSettingsMenuItem","PluginDocumentSettingPanel","EditorPluginDocumentSettingPanel","PluginMoreMenuItem","EditorPluginMoreMenuItem","PluginPrePublishPanel","EditorPluginPrePublishPanel","PluginPostPublishPanel","EditorPluginPostPublishPanel","PluginPostStatusInfo","EditorPluginPostStatusInfo","PluginSidebar","EditorPluginSidebar","PluginSidebarMoreMenuItem","EditorPluginSidebarMoreMenuItem","getPath","deprecated","unlock","jsx","_jsx","PluginPostExcerpt","isSiteEditor","window","location","href","includes","deprecateSlot","name","since","alternative","props","__experimentalPluginPostExcerpt","hint","link"],"sources":["@wordpress/edit-post/src/deprecated.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tprivateApis as editorPrivateApis,\n\tPluginBlockSettingsMenuItem as EditorPluginBlockSettingsMenuItem,\n\tPluginDocumentSettingPanel as EditorPluginDocumentSettingPanel,\n\tPluginMoreMenuItem as EditorPluginMoreMenuItem,\n\tPluginPrePublishPanel as EditorPluginPrePublishPanel,\n\tPluginPostPublishPanel as EditorPluginPostPublishPanel,\n\tPluginPostStatusInfo as EditorPluginPostStatusInfo,\n\tPluginSidebar as EditorPluginSidebar,\n\tPluginSidebarMoreMenuItem as EditorPluginSidebarMoreMenuItem,\n} from '@wordpress/editor';\nimport { 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"],"mappings":"AAAA;AACA;AACA;AACA,SACCA,WAAW,IAAIC,iBAAiB,EAChCC,2BAA2B,IAAIC,iCAAiC,EAChEC,0BAA0B,IAAIC,gCAAgC,EAC9DC,kBAAkB,IAAIC,wBAAwB,E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ACA,OAAO,SAASC,+BAA+BA,CAAA,EAAG;EACjD,IAAKV,YAAY,EAAG;IACnB,OAAO,IAAI;EACZ;EACAL,UAAU,CAAE,6CAA6C,EAAE;IAC1DY,KAAK,EAAE,KAAK;IACZI,IAAI,EAAE,+EAA+E;IACrFC,IAAI,EAAE;EACP,CAAE,CAAC;EACH,OAAOb,iBAAiB;AACzB;;AAEA","ignoreList":[]}
1
+ {"version":3,"names":["privateApis","editorPrivateApis","PluginBlockSettingsMenuItem","EditorPluginBlockSettingsMenuItem","PluginDocumentSettingPanel","EditorPluginDocumentSettingPanel","PluginMoreMenuItem","EditorPluginMoreMenuItem","PluginPrePublishPanel","EditorPluginPrePublishPanel","PluginPostPublishPanel","EditorPluginPostPublishPanel","PluginPostStatusInfo","EditorPluginPostStatusInfo","PluginSidebar","EditorPluginSidebar","PluginSidebarMoreMenuItem","EditorPluginSidebarMoreMenuItem","getPath","deprecated","unlock","jsx","_jsx","PluginPostExcerpt","isSiteEditor","window","location","href","includes","deprecateSlot","name","since","alternative","props","__experimentalPluginPostExcerpt","hint","link"],"sources":["@wordpress/edit-post/src/deprecated.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tprivateApis as editorPrivateApis,\n\tPluginBlockSettingsMenuItem as EditorPluginBlockSettingsMenuItem,\n\tPluginDocumentSettingPanel as EditorPluginDocumentSettingPanel,\n\tPluginMoreMenuItem as EditorPluginMoreMenuItem,\n\tPluginPrePublishPanel as EditorPluginPrePublishPanel,\n\tPluginPostPublishPanel as EditorPluginPostPublishPanel,\n\tPluginPostStatusInfo as EditorPluginPostStatusInfo,\n\tPluginSidebar as EditorPluginSidebar,\n\tPluginSidebarMoreMenuItem as EditorPluginSidebarMoreMenuItem,\n} from '@wordpress/editor';\nimport { 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"],"mappings":"AAAA;AACA;AACA;AACA,SACCA,WAAW,IAAIC,iBAAiB,EAChCC,2BAA2B,IAAIC,iCAAiC,EAChEC,0BAA0B,IAAIC,gCAAgC,EAC9DC,kBAAkB,IAAIC,wBAAwB,EAC9CC,qBAAqB,IAAIC,2BAA2B,EACpDC,sBAAsB,IAAIC,4BAA4B,EACtDC,oBAAoB,IAAIC,0BAA0B,EAClDC,aAAa,IAAIC,mBAAmB,EACpCC,yBAAyB,IAAIC,+BAA+B,QACtD,mBAAmB;AAC1B,SAASC,OAAO,QAAQ,gBAAgB;AACxC,OAAOC,UAAU,MAAM,uBAAuB;;AAE9C;AACA;AACA;AACA,SAASC,MAAM,QAAQ,eAAe;AAAC,SAAAC,GAAA,IAAAC,IAAA;AACvC,MAAM;EAAEC;AA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;AACA;AACA;AACA,OAAO,SAASvB,sBAAsBA,CAAEuB,KAAK,EAAG;EAC/C,IAAKT,YAAY,EAAG;IACnB,OAAO,IAAI;EACZ;EACAK,aAAa,CAAE,wBAAyB,CAAC;EACzC,oBAAOP,IAAA,CAACX,4BAA4B;IAAA,GAAMsB;EAAK,CAAI,CAAC;AACrD;;AAEA;AACA;AACA;AACA,OAAO,SAASrB,oBAAoBA,CAAEqB,KAAK,EAAG;EAC7C,IAAKT,YAAY,EAAG;IACnB,OAAO,IAAI;EACZ;EACAK,aAAa,CAAE,sBAAuB,CAAC;EACvC,oBAAOP,IAAA,CAACT,0BAA0B;IAAA,GAAMoB;EAAK,CAAI,CAAC;AACnD;;AAEA;AACA;AACA;AACA,OAAO,SAASnB,aAAaA,CAAEmB,KAAK,EAAG;EACtC,IAAKT,YAAY,EAAG;IACnB,OAAO,IAAI;EACZ;EACAK,aAAa,CAAE,eAAgB,CAAC;EAChC,oBAAOP,IAAA,CAACP,mBAAmB;IAAA,GAAMkB;EAAK,CAAI,CAAC;AAC5C;;AAEA;AACA;AACA;AACA,OAAO,SAASjB,yBAAyBA,CAAEiB,KAAK,EAAG;EAClD,IAAKT,YAAY,EAAG;IACnB,OAAO,IAAI;EACZ;EACAK,aAAa,CAAE,2BAA4B,CAAC;EAC5C,oBAAOP,IAAA,CAACL,+BAA+B;IAAA,GAAMgB;EAAK,CAAI,CAAC;AACxD;;AAEA;AACA;AACA;AACA,OAAO,SAASC,+BAA+BA,CAAA,EAAG;EACjD,IAAKV,YAAY,EAAG;IACnB,OAAO,IAAI;EACZ;EACAL,UAAU,CAAE,6CAA6C,EAAE;IAC1DY,KAAK,EAAE,KAAK;IACZI,IAAI,EAAE,+EAA+E;IACrFC,IAAI,EAAE;EACP,CAAE,CAAC;EACH,OAAOb,iBAAiB;AACzB;;AAEA","ignoreList":[]}
@@ -18,8 +18,7 @@ import { unlock } from './lock-unlock';
18
18
  import { jsx as _jsx } from "react/jsx-runtime";
19
19
  const {
20
20
  BackButton: __experimentalMainDashboardButton,
21
- registerCoreBlockBindingsSources,
22
- bootstrapBlockBindingsSourcesFromServer
21
+ registerCoreBlockBindingsSources
23
22
  } = unlock(editorPrivateApis);
24
23
 
25
24
  /**
@@ -71,7 +70,6 @@ export function initializeEditor(id, postType, postId, settings, initialEdits) {
71
70
  dispatch(editorStore).setIsListViewOpened(true);
72
71
  }
73
72
  registerCoreBlocks();
74
- bootstrapBlockBindingsSourcesFromServer(settings?.blockBindingsSources);
75
73
  registerCoreBlockBindingsSources();
76
74
  registerLegacyWidgetBlock({
77
75
  inserter: false
@@ -120,7 +118,7 @@ export function initializeEditor(id, postType, postId, settings, initialEdits) {
120
118
  // Prevent the default browser action for files dropped outside of dropzones.
121
119
  window.addEventListener('dragover', e => e.preventDefault(), false);
122
120
  window.addEventListener('drop', e => e.preventDefault(), false);
123
- root.render( /*#__PURE__*/_jsx(StrictMode, {
121
+ root.render(/*#__PURE__*/_jsx(StrictMode, {
124
122
  children: /*#__PURE__*/_jsx(Layout, {
125
123
  settings: settings,
126
124
  postId: postId,
@@ -1 +1 @@
1
- {"version":3,"names":["store","blocksStore","registerCoreBlocks","__experimentalRegisterExperimentalCoreBlocks","deprecated","createRoot","StrictMode","dispatch","select","preferencesStore","registerLegacyWidgetBlock","registerWidgetGroupBlock","editorStore","privateApis","editorPrivateApis","Layout","unlock","jsx","_jsx","BackButton","__experimentalMainDashboardButton","registerCoreBlockBindingsSources","bootstrapBlockBindingsSourcesFromServer","initializeEditor","id","postType","postId","settings","initialEdits","isMediumOrBigger","window","matchMedia","matches","target","document","getElementById","root","setDefaults","fullscreenMode","themeStyles","welcomeGuide","welcomeGuideTemplate","allowRightClickOverrides","editorMode","fixedToolbar","hiddenBlockTypes","inactivePanels","openPanels","showBlockBreadcrumbs","showIconLabels","showListViewByDefault","enableChoosePatternModal","isPublishSidebarEnabled","__experimentalMediaProcessing","requireApproval","optimizeOnUpload","reapplyBlockTypeFilters","get","setIsListViewOpened","blockBindingsSources","inserter","globalThis","IS_GUTENBERG_PLUGIN","enableFSEBlocks","__unstableEnableFullSiteEditingBlocks","documentMode","compatMode","console","warn","isIphone","navigator","userAgent","indexOf","addEventListener","event","editorScrollContainer","getElementsByClassName","scrollY","scrollTop","scrollTo","e","preventDefault","render","children","reinitializeEditor","since","version","default","__experimentalFullscreenModeClose"],"sources":["@wordpress/edit-post/src/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport {\n\tregisterCoreBlocks,\n\t__experimentalRegisterExperimentalCoreBlocks,\n} from '@wordpress/block-library';\nimport deprecated from '@wordpress/deprecated';\nimport { createRoot, 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\tbootstrapBlockBindingsSourcesFromServer,\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\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\tbootstrapBlockBindingsSourcesFromServer( settings?.blockBindingsSources );\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"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,KAAK,IAAIC,WAAW,QAAQ,mBAAmB;AACxD,SACCC,kBAAkB,EAClBC,4CAA4C,QACtC,0BAA0B;AACjC,OAAOC,UAAU,MAAM,uBAAuB;AAC9C,SAASC,UAAU,EAAEC,UAAU,QAAQ,oBAAoB;AAC3D,SAASC,QAAQ,EAAEC,MAAM,QAAQ,iBAAiB;AAClD,SAASR,KAAK,IAAIS,gBAAgB,QAAQ,wBAAwB;AAClE,SACCC,yBAAyB,EACzBC,wBAAwB,QAClB,oBAAoB;AAC3B,SACCX,KAAK,IAAIY,WAAW,EACpBC,WAAW,IAAIC,iBAAiB,QAC1B,mBAAmB;;AAE1B;AACA;AACA;AACA,OAAOC,MAAM,MAAM,qBAAqB;AACxC,SAASC,MAAM,QAAQ,eAAe;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEvC,MAAM;EACLC,UAAU,EAAEC,iCAAiC;EAC7CC,gCAAgC;EAChCC;AACD,CAAC,GAAGN,MAAM,CAAEF,iBAAkB,CAAC;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASS,gBAAgBA,CAC/BC,EAAE,EACFC,QAAQ,EACRC,MAAM,EACNC,QAAQ,EACRC,YAAY,EACX;EACD,MAAMC,gBAAgB,GAAGC,MAAM,CAACC,UAAU,CAAE,oBAAqB,CAAC,CAACC,OAAO;EAC1E,MAAMC,MAAM,GAAGC,QAAQ,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EA;EACAjD,MAAM,CAAC2C,gBAAgB,CAAE,UAAU,EAAIO,CAAC,IAAMA,CAAC,CAACC,cAAc,CAAC,CAAC,EAAE,KAAM,CAAC;EACzEnD,MAAM,CAAC2C,gBAAgB,CAAE,MAAM,EAAIO,CAAC,IAAMA,CAAC,CAACC,cAAc,CAAC,CAAC,EAAE,KAAM,CAAC;EAErE7C,IAAI,CAAC8C,MAAM,eACVhE,IAAA,CAACZ,UAAU;IAAA6E,QAAA,eACVjE,IAAA,CAACH,MAAM;MACNY,QAAQ,EAAGA,QAAU;MACrBD,MAAM,EAAGA,MAAQ;MACjBD,QAAQ,EAAGA,QAAU;MACrBG,YAAY,EAAGA;IAAc,CAC7B;EAAC,CACS,CACb,CAAC;EAED,OAAOQ,IAAI;AACZ;;AAEA;AACA;AACA;AACA,OAAO,SAASgD,kBAAkBA,CAAA,EAAG;EACpChF,UAAU,CAAE,gCAAgC,EAAE;IAC7CiF,KAAK,EAAE,KAAK;IACZC,OAAO,EAAE;EACV,CAAE,CAAC;AACJ;AAEA,SAASC,OAAO,IAAIC,iCAAiC,QAAQ,gDAAgD;AAC7G,SAASpE,iCAAiC;AAC1C,SAASpB,KAAK,QAAQ,SAAS;AAC/B,cAAc,cAAc","ignoreList":[]}
1
+ {"version":3,"names":["store","blocksStore","registerCoreBlocks","__experimentalRegisterExperimentalCoreBlocks","deprecated","createRoot","StrictMode","dispatch","select","preferencesStore","registerLegacyWidgetBlock","registerWidgetGroupBlock","editorStore","privateApis","editorPrivateApis","Layout","unlock","jsx","_jsx","BackButton","__experimentalMainDashboardButton","registerCoreBlockBindingsSources","initializeEditor","id","postType","postId","settings","initialEdits","isMediumOrBigger","window","matchMedia","matches","target","document","getElementById","root","setDefaults","fullscreenMode","themeStyles","welcomeGuide","welcomeGuideTemplate","allowRightClickOverrides","editorMode","fixedToolbar","hiddenBlockTypes","inactivePanels","openPanels","showBlockBreadcrumbs","showIconLabels","showListViewByDefault","enableChoosePatternModal","isPublishSidebarEnabled","__experimentalMediaProcessing","requireApproval","optimizeOnUpload","reapplyBlockTypeFilters","get","setIsListViewOpened","inserter","globalThis","IS_GUTENBERG_PLUGIN","enableFSEBlocks","__unstableEnableFullSiteEditingBlocks","documentMode","compatMode","console","warn","isIphone","navigator","userAgent","indexOf","addEventListener","event","editorScrollContainer","getElementsByClassName","scrollY","scrollTop","scrollTo","e","preventDefault","render","children","reinitializeEditor","since","version","default","__experimentalFullscreenModeClose"],"sources":["@wordpress/edit-post/src/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport {\n\tregisterCoreBlocks,\n\t__experimentalRegisterExperimentalCoreBlocks,\n} from '@wordpress/block-library';\nimport deprecated from '@wordpress/deprecated';\nimport { createRoot, 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\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"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,KAAK,IAAIC,WAAW,QAAQ,mBAAmB;AACxD,SACCC,kBAAkB,EAClBC,4CAA4C,QACtC,0BAA0B;AACjC,OAAOC,UAAU,MAAM,uBAAuB;AAC9C,SAASC,UAAU,EAAEC,UAAU,QAAQ,oBAAoB;AAC3D,SAASC,QAAQ,EAAEC,MAAM,QAAQ,iBAAiB;AAClD,SAASR,KAAK,IAAIS,gBAAgB,QAAQ,wBAAwB;AAClE,SACCC,yBAAyB,EACzBC,wBAAwB,QAClB,oBAAoB;AAC3B,SACCX,KAAK,IAAIY,WAAW,EACpBC,WAAW,IAAIC,iBAAiB,QAC1B,mBAAmB;;AAE1B;AACA;AACA;AACA,OAAOC,MAAM,MAAM,qBAAqB;AACxC,SAASC,MAAM,QAAQ,eAAe;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEvC,MAAM;EACLC,UAAU,EAAEC,iCAAiC;EAC7CC;AACD,CAAC,GAAGL,MAAM,CAAEF,iBAAkB,CAAC;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASQ,gBAAgBA,CAC/BC,EAAE,EACFC,QAAQ,EACRC,MAAM,EACNC,QAAQ,EACRC,YAAY,EACX;EACD,MAAMC,gBAAgB,GAAGC,MAAM,CAACC,UAAU,CAAE,oBAAqB,CAAC,CAACC,OAAO;EAC1E,MAAMC,MAAM,GAAGC,QAAQ,CAACC,cAAc,CAAEX,EAAG,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AAc,CAAC,CAAC,EAAE,KAAM,CAAC;EACzElD,MAAM,CAAC0C,gBAAgB,CAAE,MAAM,EAAIO,CAAC,IAAMA,CAAC,CAACC,cAAc,CAAC,CAAC,EAAE,KAAM,CAAC;EAErE5C,IAAI,CAAC6C,MAAM,cACV9D,IAAA,CAACZ,UAAU;IAAA2E,QAAA,eACV/D,IAAA,CAACH,MAAM;MACNW,QAAQ,EAAGA,QAAU;MACrBD,MAAM,EAAGA,MAAQ;MACjBD,QAAQ,EAAGA,QAAU;MACrBG,YAAY,EAAGA;IAAc,CAC7B;EAAC,CACS,CACb,CAAC;EAED,OAAOQ,IAAI;AACZ;;AAEA;AACA;AACA;AACA,OAAO,SAAS+C,kBAAkBA,CAAA,EAAG;EACpC9E,UAAU,CAAE,gCAAgC,EAAE;IAC7C+E,KAAK,EAAE,KAAK;IACZC,OAAO,EAAE;EACV,CAAE,CAAC;AACJ;AAEA,SAASC,OAAO,IAAIC,iCAAiC,QAAQ,gDAAgD;AAC7G,SAASlE,iCAAiC;AAC1C,SAASpB,KAAK,QAAQ,SAAS;AAC/B,cAAc,cAAc","ignoreList":[]}
@@ -446,7 +446,7 @@ export const initializeMetaBoxes = () => ({
446
446
  metaBoxesInitialized = true;
447
447
 
448
448
  // Save metaboxes on save completion, except for autosaves.
449
- addAction('editor.savePost', 'core/edit-post/save-metaboxes', async options => {
449
+ addAction('editor.savePost', 'core/edit-post/save-metaboxes', async (post, options) => {
450
450
  if (!options.isAutosave && select.hasMetaBoxes()) {
451
451
  await dispatch.requestMetaBoxUpdates();
452
452
  }