@wordpress/edit-post 6.19.0 → 7.0.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 (70) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/build/components/block-manager/index.js +3 -10
  3. package/build/components/block-manager/index.js.map +1 -1
  4. package/build/components/header/index.js +2 -2
  5. package/build/components/header/index.js.map +1 -1
  6. package/build/components/layout/index.js +2 -1
  7. package/build/components/layout/index.js.map +1 -1
  8. package/build/components/preferences-modal/meta-boxes-section.js +1 -1
  9. package/build/components/preferences-modal/meta-boxes-section.js.map +1 -1
  10. package/build/components/sidebar/post-status/index.js +1 -1
  11. package/build/components/sidebar/post-status/index.js.map +1 -1
  12. package/build/components/sidebar/post-template/index.js +2 -4
  13. package/build/components/sidebar/post-template/index.js.map +1 -1
  14. package/build/components/sidebar/settings-sidebar/index.js +7 -7
  15. package/build/components/sidebar/settings-sidebar/index.js.map +1 -1
  16. package/build/editor.native.js +8 -2
  17. package/build/editor.native.js.map +1 -1
  18. package/build/hooks/validate-multiple-use/index.js +1 -7
  19. package/build/hooks/validate-multiple-use/index.js.map +1 -1
  20. package/build/plugins/index.js +3 -1
  21. package/build/plugins/index.js.map +1 -1
  22. package/build/plugins/navigation-list-view-menu-item.js +48 -0
  23. package/build/plugins/navigation-list-view-menu-item.js.map +1 -0
  24. package/build-module/components/block-manager/index.js +3 -9
  25. package/build-module/components/block-manager/index.js.map +1 -1
  26. package/build-module/components/header/index.js +2 -2
  27. package/build-module/components/header/index.js.map +1 -1
  28. package/build-module/components/layout/index.js +2 -1
  29. package/build-module/components/layout/index.js.map +1 -1
  30. package/build-module/components/preferences-modal/meta-boxes-section.js +2 -2
  31. package/build-module/components/preferences-modal/meta-boxes-section.js.map +1 -1
  32. package/build-module/components/sidebar/post-status/index.js +1 -1
  33. package/build-module/components/sidebar/post-status/index.js.map +1 -1
  34. package/build-module/components/sidebar/post-template/index.js +2 -4
  35. package/build-module/components/sidebar/post-template/index.js.map +1 -1
  36. package/build-module/components/sidebar/settings-sidebar/index.js +5 -5
  37. package/build-module/components/sidebar/settings-sidebar/index.js.map +1 -1
  38. package/build-module/editor.native.js +7 -2
  39. package/build-module/editor.native.js.map +1 -1
  40. package/build-module/hooks/validate-multiple-use/index.js +1 -6
  41. package/build-module/hooks/validate-multiple-use/index.js.map +1 -1
  42. package/build-module/plugins/index.js +2 -1
  43. package/build-module/plugins/index.js.map +1 -1
  44. package/build-module/plugins/navigation-list-view-menu-item.js +40 -0
  45. package/build-module/plugins/navigation-list-view-menu-item.js.map +1 -0
  46. package/build-style/classic-rtl.css +14 -0
  47. package/build-style/classic.css +14 -0
  48. package/build-style/style-rtl.css +67 -33
  49. package/build-style/style.css +67 -33
  50. package/package.json +29 -29
  51. package/src/components/block-manager/index.js +6 -10
  52. package/src/components/header/index.js +3 -3
  53. package/src/components/layout/index.js +3 -1
  54. package/src/components/preferences-modal/meta-boxes-section.js +2 -3
  55. package/src/components/preferences-modal/options/test/__snapshots__/enable-custom-fields.js.snap +56 -4
  56. package/src/components/preferences-modal/test/__snapshots__/index.js.snap +39 -14
  57. package/src/components/preferences-modal/test/__snapshots__/meta-boxes-section.js.snap +51 -6
  58. package/src/components/sidebar/post-schedule/style.scss +2 -1
  59. package/src/components/sidebar/post-status/index.js +1 -1
  60. package/src/components/sidebar/post-template/index.js +8 -3
  61. package/src/components/sidebar/post-template/style.scss +2 -0
  62. package/src/components/sidebar/post-url/style.scss +3 -0
  63. package/src/components/sidebar/post-visibility/style.scss +2 -0
  64. package/src/components/sidebar/settings-header/style.scss +47 -34
  65. package/src/components/sidebar/settings-sidebar/index.js +5 -5
  66. package/src/components/visual-editor/test/index.native.js +20 -9
  67. package/src/editor.native.js +14 -11
  68. package/src/hooks/validate-multiple-use/index.js +1 -7
  69. package/src/plugins/index.js +2 -0
  70. package/src/plugins/navigation-list-view-menu-item.js +56 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-post/src/components/sidebar/settings-sidebar/index.js"],"names":["BlockInspector","store","blockEditorStore","cog","Platform","keyboardShortcutsStore","interfaceStore","SettingsHeader","PostStatus","LastRevision","PostTaxonomies","FeaturedImage","PostExcerpt","DiscussionPanel","PageAttributes","MetaBoxes","PluginDocumentSettingPanel","PluginSidebarEditPost","TemplateSummary","__","useSelect","editPostStore","SIDEBAR_ACTIVE_BY_DEFAULT","select","web","native","SettingsSidebar","sidebarName","keyboardShortcut","isTemplateMode","sidebar","getActiveComplementaryArea","name","includes","getBlockSelectionStart","shortcut","getShortcutRepresentation","isEditingTemplate"],"mappings":";;AAAA;AACA;AACA;AACA,SACCA,cADD,EAECC,KAAK,IAAIC,gBAFV,QAGO,yBAHP;AAIA,SAASC,GAAT,QAAoB,kBAApB;AACA,SAASC,QAAT,QAAyB,oBAAzB;AACA,SAASH,KAAK,IAAII,sBAAlB,QAAgD,+BAAhD;AACA,SAASJ,KAAK,IAAIK,cAAlB,QAAwC,sBAAxC;AAEA;AACA;AACA;;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,UAAP,MAAuB,gBAAvB;AACA,OAAOC,YAAP,MAAyB,kBAAzB;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,aAAP,MAA0B,mBAA1B;AACA,OAAOC,WAAP,MAAwB,iBAAxB;AACA,OAAOC,eAAP,MAA4B,qBAA5B;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,SAAP,MAAsB,kBAAtB;AACA,OAAOC,0BAAP,MAAuC,kCAAvC;AACA,OAAOC,qBAAP,MAAkC,mBAAlC;AACA,OAAOC,eAAP,MAA4B,qBAA5B;AACA,SAASC,EAAT,QAAmB,iBAAnB;AACA,SAASC,SAAT,QAA0B,iBAA1B;AACA,SAASnB,KAAK,IAAIoB,aAAlB,QAAuC,gBAAvC;AAEA,MAAMC,yBAAyB,GAAGlB,QAAQ,CAACmB,MAAT,CAAiB;AAClDC,EAAAA,GAAG,EAAE,IAD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cAAF,IAAoBF,WAAW,KAAK,oBAApC,IACD,8BACC,cAAC,UAAD,OADD,EAEC,cAAC,0BAAD,CAA4B,IAA5B,OAFD,EAGC,cAAC,YAAD,OAHD,EAIC,cAAC,cAAD,OAJD,EAKC,cAAC,aAAD,OALD,EAMC,cAAC,WAAD,OAND,EAOC,cAAC,eAAD,OAPD,EAQC,cAAC,cAAD,OARD,EASC,cAAC,SAAD;AAAW,IAAA,QAAQ,EAAC;AAApB,IATD,CAZF,EAwBGE,cAAc,IAAIF,WAAW,KAAK,oBAAlC,IACD,cAAC,eAAD,OAzBF,EA2BGA,WAAW,KAAK,iBAAhB,IAAqC,cAAC,cAAD,OA3BxC,CADD;AA+BA,CAlED;;AAoEA,eAAeD,eAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tBlockInspector,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { cog } from '@wordpress/icons';\nimport { Platform } from '@wordpress/element';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\nimport { store as interfaceStore } from '@wordpress/interface';\n\n/**\n * Internal dependencies\n */\nimport SettingsHeader from '../settings-header';\nimport PostStatus from '../post-status';\nimport LastRevision from '../last-revision';\nimport PostTaxonomies from '../post-taxonomies';\nimport FeaturedImage from '../featured-image';\nimport PostExcerpt from '../post-excerpt';\nimport DiscussionPanel from '../discussion-panel';\nimport PageAttributes from '../page-attributes';\nimport MetaBoxes from '../../meta-boxes';\nimport PluginDocumentSettingPanel from '../plugin-document-setting-panel';\nimport PluginSidebarEditPost from '../plugin-sidebar';\nimport TemplateSummary from '../template-summary';\nimport { __ } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { store as editPostStore } from '../../../store';\n\nconst SIDEBAR_ACTIVE_BY_DEFAULT = Platform.select( {\n\tweb: true,\n\tnative: false,\n} );\n\nconst SettingsSidebar = () => {\n\tconst { sidebarName, keyboardShortcut, isTemplateMode } = useSelect(\n\t\t( select ) => {\n\t\t\t// The settings sidebar is used by the edit-post/document and edit-post/block sidebars.\n\t\t\t// sidebarName represents the sidebar that is active or that should be active when the SettingsSidebar toggle button is pressed.\n\t\t\t// If one of the two sidebars is active the component will contain the content of that sidebar.\n\t\t\t// When neither of the two sidebars is active we can not simply return null, because the PluginSidebarEditPost\n\t\t\t// component, besides being used to render the sidebar, also renders the toggle button. In that case sidebarName\n\t\t\t// should contain the sidebar that will be active when the toggle button is pressed. If a block\n\t\t\t// is selected, that should be edit-post/block otherwise it's edit-post/document.\n\t\t\tlet sidebar = select( interfaceStore ).getActiveComplementaryArea(\n\t\t\t\teditPostStore.name\n\t\t\t);\n\t\t\tif (\n\t\t\t\t! [ 'edit-post/document', 'edit-post/block' ].includes(\n\t\t\t\t\tsidebar\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\tif ( select( blockEditorStore ).getBlockSelectionStart() ) {\n\t\t\t\t\tsidebar = 'edit-post/block';\n\t\t\t\t}\n\t\t\t\tsidebar = 'edit-post/document';\n\t\t\t}\n\t\t\tconst shortcut = select(\n\t\t\t\tkeyboardShortcutsStore\n\t\t\t).getShortcutRepresentation( 'core/edit-post/toggle-sidebar' );\n\t\t\treturn {\n\t\t\t\tsidebarName: sidebar,\n\t\t\t\tkeyboardShortcut: shortcut,\n\t\t\t\tisTemplateMode: select( editPostStore ).isEditingTemplate(),\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\treturn (\n\t\t<PluginSidebarEditPost\n\t\t\tidentifier={ sidebarName }\n\t\t\theader={ <SettingsHeader sidebarName={ sidebarName } /> }\n\t\t\tcloseLabel={ __( 'Close settings' ) }\n\t\t\theaderClassName=\"edit-post-sidebar__panel-tabs\"\n\t\t\t/* translators: button label text should, if possible, be under 16 characters. */\n\t\t\ttitle={ __( 'Settings' ) }\n\t\t\ttoggleShortcut={ keyboardShortcut }\n\t\t\ticon={ cog }\n\t\t\tisActiveByDefault={ SIDEBAR_ACTIVE_BY_DEFAULT }\n\t\t>\n\t\t\t{ ! isTemplateMode && sidebarName === 'edit-post/document' && (\n\t\t\t\t<>\n\t\t\t\t\t<PostStatus />\n\t\t\t\t\t<PluginDocumentSettingPanel.Slot />\n\t\t\t\t\t<LastRevision />\n\t\t\t\t\t<PostTaxonomies />\n\t\t\t\t\t<FeaturedImage />\n\t\t\t\t\t<PostExcerpt />\n\t\t\t\t\t<DiscussionPanel />\n\t\t\t\t\t<PageAttributes />\n\t\t\t\t\t<MetaBoxes location=\"side\" />\n\t\t\t\t</>\n\t\t\t) }\n\t\t\t{ isTemplateMode && sidebarName === 'edit-post/document' && (\n\t\t\t\t<TemplateSummary />\n\t\t\t) }\n\t\t\t{ sidebarName === 'edit-post/block' && <BlockInspector /> }\n\t\t</PluginSidebarEditPost>\n\t);\n};\n\nexport default SettingsSidebar;\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-post/src/components/sidebar/settings-sidebar/index.js"],"names":["BlockInspector","store","blockEditorStore","useSelect","Platform","isRTL","__","drawerLeft","drawerRight","interfaceStore","keyboardShortcutsStore","SettingsHeader","PostStatus","LastRevision","PostTaxonomies","FeaturedImage","PostExcerpt","DiscussionPanel","PageAttributes","MetaBoxes","PluginDocumentSettingPanel","PluginSidebarEditPost","TemplateSummary","editPostStore","SIDEBAR_ACTIVE_BY_DEFAULT","select","web","native","SettingsSidebar","sidebarName","keyboardShortcut","isTemplateMode","sidebar","getActiveComplementaryArea","name","includes","getBlockSelectionStart","shortcut","getShortcutRepresentation","isEditingTemplate"],"mappings":";;AAAA;AACA;AACA;AACA,SACCA,cADD,EAECC,KAAK,IAAIC,gBAFV,QAGO,yBAHP;AAIA,SAASC,SAAT,QAA0B,iBAA1B;AACA,SAASC,QAAT,QAAyB,oBAAzB;AACA,SAASC,KAAT,EAAgBC,EAAhB,QAA0B,iBAA1B;AACA,SAASC,UAAT,EAAqBC,WAArB,QAAwC,kBAAxC;AACA,SAASP,KAAK,IAAIQ,cAAlB,QAAwC,sBAAxC;AACA,SAASR,KAAK,IAAIS,sBAAl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AjB;AAGA,WAAO;AACNT,MAAAA,WAAW,EAAEG,OADP;AAENF,MAAAA,gBAAgB,EAAEO,QAFZ;AAGNN,MAAAA,cAAc,EAAEN,MAAM,CAAEF,aAAF,CAAN,CAAwBgB,iBAAxB;AAHV,KAAP;AAKA,GA9BiE,EA+BlE,EA/BkE,CAAnE;AAkCA,SACC,cAAC,qBAAD;AACC,IAAA,UAAU,EAAGV,WADd;AAEC,IAAA,MAAM,EAAG,cAAC,cAAD;AAAgB,MAAA,WAAW,EAAGA;AAA9B,MAFV;AAGC,IAAA,UAAU,EAAGvB,EAAE,CAAE,gBAAF,CAHhB;AAIC,IAAA,eAAe,EAAC;AAChB;AALD;AAMC,IAAA,KAAK,EAAGA,EAAE,CAAE,UAAF,CANX;AAOC,IAAA,cAAc,EAAGwB,gBAPlB;AAQC,IAAA,IAAI,EAAGzB,KAAK,KAAKE,UAAL,GAAkBC,WAR/B;AASC,IAAA,iBAAiB,EAAGgB;AATrB,KAWG,CAAEO,cAAF,IAAoBF,WAAW,KAAK,oBAApC,IACD,8BACC,cAAC,UAAD,OADD,EAEC,cAAC,0BAAD,CAA4B,IAA5B,OAFD,EAGC,cAAC,YAAD,OAHD,EAIC,cAAC,cAAD,OAJD,EAKC,cAAC,aAAD,OALD,EAMC,cAAC,WAAD,OAND,EAOC,cAAC,eAAD,OAPD,EAQC,cAAC,cAAD,OARD,EASC,cAAC,SAAD;AAAW,IAAA,QAAQ,EAAC;AAApB,IATD,CAZF,EAwBGE,cAAc,IAAIF,WAAW,KAAK,oBAAlC,IACD,cAAC,eAAD,OAzBF,EA2BGA,WAAW,KAAK,iBAAhB,IAAqC,cAAC,cAAD,OA3BxC,CADD;AA+BA,CAlED;;AAoEA,eAAeD,eAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tBlockInspector,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { useSelect } from '@wordpress/data';\nimport { Platform } from '@wordpress/element';\nimport { isRTL, __ } from '@wordpress/i18n';\nimport { drawerLeft, drawerRight } from '@wordpress/icons';\nimport { store as interfaceStore } from '@wordpress/interface';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\n\n/**\n * Internal dependencies\n */\nimport SettingsHeader from '../settings-header';\nimport PostStatus from '../post-status';\nimport LastRevision from '../last-revision';\nimport PostTaxonomies from '../post-taxonomies';\nimport FeaturedImage from '../featured-image';\nimport PostExcerpt from '../post-excerpt';\nimport DiscussionPanel from '../discussion-panel';\nimport PageAttributes from '../page-attributes';\nimport MetaBoxes from '../../meta-boxes';\nimport PluginDocumentSettingPanel from '../plugin-document-setting-panel';\nimport PluginSidebarEditPost from '../plugin-sidebar';\nimport TemplateSummary from '../template-summary';\nimport { store as editPostStore } from '../../../store';\n\nconst SIDEBAR_ACTIVE_BY_DEFAULT = Platform.select( {\n\tweb: true,\n\tnative: false,\n} );\n\nconst SettingsSidebar = () => {\n\tconst { sidebarName, keyboardShortcut, isTemplateMode } = useSelect(\n\t\t( select ) => {\n\t\t\t// The settings sidebar is used by the edit-post/document and edit-post/block sidebars.\n\t\t\t// sidebarName represents the sidebar that is active or that should be active when the SettingsSidebar toggle button is pressed.\n\t\t\t// If one of the two sidebars is active the component will contain the content of that sidebar.\n\t\t\t// When neither of the two sidebars is active we can not simply return null, because the PluginSidebarEditPost\n\t\t\t// component, besides being used to render the sidebar, also renders the toggle button. In that case sidebarName\n\t\t\t// should contain the sidebar that will be active when the toggle button is pressed. If a block\n\t\t\t// is selected, that should be edit-post/block otherwise it's edit-post/document.\n\t\t\tlet sidebar = select( interfaceStore ).getActiveComplementaryArea(\n\t\t\t\teditPostStore.name\n\t\t\t);\n\t\t\tif (\n\t\t\t\t! [ 'edit-post/document', 'edit-post/block' ].includes(\n\t\t\t\t\tsidebar\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\tif ( select( blockEditorStore ).getBlockSelectionStart() ) {\n\t\t\t\t\tsidebar = 'edit-post/block';\n\t\t\t\t}\n\t\t\t\tsidebar = 'edit-post/document';\n\t\t\t}\n\t\t\tconst shortcut = select(\n\t\t\t\tkeyboardShortcutsStore\n\t\t\t).getShortcutRepresentation( 'core/edit-post/toggle-sidebar' );\n\t\t\treturn {\n\t\t\t\tsidebarName: sidebar,\n\t\t\t\tkeyboardShortcut: shortcut,\n\t\t\t\tisTemplateMode: select( editPostStore ).isEditingTemplate(),\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\treturn (\n\t\t<PluginSidebarEditPost\n\t\t\tidentifier={ sidebarName }\n\t\t\theader={ <SettingsHeader sidebarName={ sidebarName } /> }\n\t\t\tcloseLabel={ __( 'Close settings' ) }\n\t\t\theaderClassName=\"edit-post-sidebar__panel-tabs\"\n\t\t\t/* translators: button label text should, if possible, be under 16 characters. */\n\t\t\ttitle={ __( 'Settings' ) }\n\t\t\ttoggleShortcut={ keyboardShortcut }\n\t\t\ticon={ isRTL() ? drawerLeft : drawerRight }\n\t\t\tisActiveByDefault={ SIDEBAR_ACTIVE_BY_DEFAULT }\n\t\t>\n\t\t\t{ ! isTemplateMode && sidebarName === 'edit-post/document' && (\n\t\t\t\t<>\n\t\t\t\t\t<PostStatus />\n\t\t\t\t\t<PluginDocumentSettingPanel.Slot />\n\t\t\t\t\t<LastRevision />\n\t\t\t\t\t<PostTaxonomies />\n\t\t\t\t\t<FeaturedImage />\n\t\t\t\t\t<PostExcerpt />\n\t\t\t\t\t<DiscussionPanel />\n\t\t\t\t\t<PageAttributes />\n\t\t\t\t\t<MetaBoxes location=\"side\" />\n\t\t\t\t</>\n\t\t\t) }\n\t\t\t{ isTemplateMode && sidebarName === 'edit-post/document' && (\n\t\t\t\t<TemplateSummary />\n\t\t\t) }\n\t\t\t{ sidebarName === 'edit-post/block' && <BlockInspector /> }\n\t\t</PluginSidebarEditPost>\n\t);\n};\n\nexport default SettingsSidebar;\n"]}
@@ -7,6 +7,7 @@ import { createElement } from "@wordpress/element";
7
7
  import memize from 'memize';
8
8
  import { map } from 'lodash';
9
9
  import { I18nManager } from 'react-native';
10
+ import { GestureHandlerRootView } from 'react-native-gesture-handler';
10
11
  /**
11
12
  * WordPress dependencies
12
13
  */
@@ -145,14 +146,18 @@ class Editor extends Component {
145
146
  status: 'draft',
146
147
  meta: []
147
148
  };
148
- return createElement(SlotFillProvider, null, createElement(EditorProvider, _extends({
149
+ return createElement(GestureHandlerRootView, {
150
+ style: {
151
+ flex: 1
152
+ }
153
+ }, createElement(SlotFillProvider, null, createElement(EditorProvider, _extends({
149
154
  settings: editorSettings,
150
155
  post: normalizedPost,
151
156
  initialEdits: initialEdits,
152
157
  useSubRegistry: false
153
158
  }, props), createElement(Layout, {
154
159
  setTitleRef: this.setTitleRef
155
- })));
160
+ }))));
156
161
  }
157
162
 
158
163
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-post/src/editor.native.js"],"names":["memize","map","I18nManager","Component","EditorProvider","parse","serialize","store","blocksStore","withDispatch","withSelect","compose","subscribeSetFocusOnTitle","subscribeFeaturedImageIdNativeUpdated","SlotFillProvider","coreStore","Layout","editPostStore","Editor","constructor","props","arguments","galleryWithImageBlocks","window","wp","galleryBlockV2Enabled","initialHtmlModeEnabled","mode","switchEditorMode","getEditorSettings","maxSize","setTitleRef","bind","settings","hasFixedToolbar","focusMode","hiddenBlockTypes","blockTypes","isRTL","length","allowedBlockTypes","undefined","defaultAllowedBlockTypes","filter","type","includes","componentDidMount","editEntityRecord","postType","postId","subscriptionParentSetFocusOnTitle","postTitleRef","focus","focusTitleWhenAvailable","subscriptionParentFeaturedImageIdNativeUpdated","payload","featured_media","featuredImageId","undoIgnore","componentWillUnmount","remove","titleRef","render","initialEdits","post","initialHtml","editorSettings","normalizedPost","id","title","raw","initialTitle","content","status","meta","select","isFeatureActive","getEditorMode","__experimentalGetPreviewDeviceType","getHiddenBlockTypes","getBlockTypes","dispatch"],"mappings":";;;AAAA;AACA;AACA;AACA,OAAOA,MAAP,MAAmB,QAAnB;AACA,SAASC,GAAT,QAAoB,QAAp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E;AAdwB,KAA/B;AAiBA,WACC,cAAC,gBAAD,QACC,cAAC,cAAD;AACC,MAAA,QAAQ,EAAGR,cADZ;AAEC,MAAA,IAAI,EAAGC,cAFR;AAGC,MAAA,YAAY,EAAGJ,YAHhB;AAIC,MAAA,cAAc,EAAG;AAJlB,OAKM3C,KALN,GAOC,cAAC,MAAD;AAAQ,MAAA,WAAW,EAAG,KAAKW;AAA3B,MAPD,CADD,CADD;AAaA;;AA/J6B;;AAkK/B,eAAepB,OAAO,CAAE,CACvBD,UAAU,CAAIiE,MAAF,IAAc;AACzB,QAAM;AACLC,IAAAA,eADK;AAELC,IAAAA,aAFK;AAGLC,IAAAA,kCAHK;AAILC,IAAAA;AAJK,MAKFJ,MAAM,CAAE1D,aAAF,CALV;AAMA,QAAM;AAAE+D,IAAAA;AAAF,MAAoBL,MAAM,CAAEnE,WAAF,CAAhC;AAEA,SAAO;AACN0B,IAAAA,eAAe,EACd0C,eAAe,CAAE,cAAF,CAAf,IACAE,kCAAkC,OAAO,SAHpC;AAIN3C,IAAAA,SAAS,EAAEyC,eAAe,CAAE,WAAF,CAJpB;AAKNjD,IAAAA,IAAI,EAAEkD,aAAa,EALb;AAMNzC,IAAAA,gBAAgB,EAAE2C,mBAAmB,EAN/B;AAON1C,IAAAA,UAAU,EAAE2C,aAAa;AAPnB,GAAP;AASA,CAlBS,CADa,EAoBvBvE,YAAY,CAAIwE,QAAF,IAAgB;AAC7B,QAAM;AAAErD,IAAAA;AAAF,MAAuBqD,QAAQ,CAAEhE,aAAF,CAArC;AACA,QAAM;AAAE8B,IAAAA;AAAF,MAAuBkC,QAAQ,CAAElE,SAAF,CAArC;AACA,SAAO;AACNa,IAAAA,gBADM;AAENmB,IAAAA;AAFM,GAAP;AAIA,CAPW,CApBW,CAAF,CAAP,CA4BV7B,MA5BU,CAAf","sourcesContent":["/**\n * External dependencies\n */\nimport memize from 'memize';\nimport { map } from 'lodash';\nimport { I18nManager } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { EditorProvider } from '@wordpress/editor';\nimport { parse, serialize, store as blocksStore } from '@wordpress/blocks';\nimport { withDispatch, withSelect } from '@wordpress/data';\nimport { compose } from '@wordpress/compose';\nimport {\n\tsubscribeSetFocusOnTitle,\n\tsubscribeFeaturedImageIdNativeUpdated,\n} from '@wordpress/react-native-bridge';\nimport { SlotFillProvider } from '@wordpress/components';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport Layout from './components/layout';\nimport { store as editPostStore } from './store';\n\nclass Editor extends Component {\n\tconstructor( props ) {\n\t\tsuper( ...arguments );\n\n\t\t// need to set this globally to avoid race with deprecations\n\t\t// defaulting to true to avoid issues with a not-yet-cached value\n\t\tconst { galleryWithImageBlocks = true } = props;\n\t\twindow.wp.galleryBlockV2Enabled = galleryWithImageBlocks;\n\n\t\tif ( props.initialHtmlModeEnabled && props.mode === 'visual' ) {\n\t\t\t// Enable html mode if the initial mode the parent wants it but we're not already in it.\n\t\t\tthis.props.switchEditorMode( 'text' );\n\t\t}\n\n\t\tthis.getEditorSettings = memize( this.getEditorSettings, {\n\t\t\tmaxSize: 1,\n\t\t} );\n\n\t\tthis.setTitleRef = this.setTitleRef.bind( this );\n\t}\n\n\tgetEditorSettings(\n\t\tsettings,\n\t\thasFixedToolbar,\n\t\tfocusMode,\n\t\thiddenBlockTypes,\n\t\tblockTypes\n\t) {\n\t\tsettings = {\n\t\t\t...settings,\n\t\t\tisRTL: I18nManager.isRTL,\n\t\t\thasFixedToolbar,\n\t\t\tfocusMode,\n\t\t};\n\n\t\t// Omit hidden block types if exists and non-empty.\n\t\tif ( hiddenBlockTypes.length > 0 ) {\n\t\t\tif ( settings.allowedBlockTypes === undefined ) {\n\t\t\t\t// If no specific flags for allowedBlockTypes are set, assume `true`\n\t\t\t\t// meaning allow all block types.\n\t\t\t\tsettings.allowedBlockTypes = true;\n\t\t\t}\n\t\t\t// Defer to passed setting for `allowedBlockTypes` if provided as\n\t\t\t// anything other than `true` (where `true` is equivalent to allow\n\t\t\t// all block types).\n\t\t\tconst defaultAllowedBlockTypes =\n\t\t\t\ttrue === settings.allowedBlockTypes\n\t\t\t\t\t? map( blockTypes, 'name' )\n\t\t\t\t\t: settings.allowedBlockTypes || [];\n\n\t\t\tsettings.allowedBlockTypes = defaultAllowedBlockTypes.filter(\n\t\t\t\t( type ) => ! hiddenBlockTypes.includes( type )\n\t\t\t);\n\t\t}\n\n\t\treturn settings;\n\t}\n\n\tcomponentDidMount() {\n\t\tconst { editEntityRecord, postType, postId } = this.props;\n\n\t\tthis.subscriptionParentSetFocusOnTitle = subscribeSetFocusOnTitle(\n\t\t\t() => {\n\t\t\t\tif ( this.postTitleRef ) {\n\t\t\t\t\tthis.postTitleRef.focus();\n\t\t\t\t} else {\n\t\t\t\t\t// If the post title ref is not available, we postpone setting focus to when it's available.\n\t\t\t\t\tthis.focusTitleWhenAvailable = true;\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\n\t\tthis.subscriptionParentFeaturedImageIdNativeUpdated =\n\t\t\tsubscribeFeaturedImageIdNativeUpdated( ( payload ) => {\n\t\t\t\teditEntityRecord(\n\t\t\t\t\t'postType',\n\t\t\t\t\tpostType,\n\t\t\t\t\tpostId,\n\t\t\t\t\t{ featured_media: payload.featuredImageId },\n\t\t\t\t\t{\n\t\t\t\t\t\tundoIgnore: true,\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t} );\n\t}\n\n\tcomponentWillUnmount() {\n\t\tif ( this.subscriptionParentSetFocusOnTitle ) {\n\t\t\tthis.subscriptionParentSetFocusOnTitle.remove();\n\t\t}\n\n\t\tif ( this.subscribeFeaturedImageIdNativeUpdated ) {\n\t\t\tthis.subscribeFeaturedImageIdNativeUpdated.remove();\n\t\t}\n\t}\n\n\tsetTitleRef( titleRef ) {\n\t\tif ( this.focusTitleWhenAvailable && ! this.postTitleRef ) {\n\t\t\tthis.focusTitleWhenAvailable = false;\n\t\t\ttitleRef.focus();\n\t\t}\n\n\t\tthis.postTitleRef = titleRef;\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\tsettings,\n\t\t\thasFixedToolbar,\n\t\t\tfocusMode,\n\t\t\tinitialEdits,\n\t\t\thiddenBlockTypes,\n\t\t\tblockTypes,\n\t\t\tpost,\n\t\t\tpostId,\n\t\t\tpostType,\n\t\t\tfeaturedImageId,\n\t\t\tinitialHtml,\n\t\t\t...props\n\t\t} = this.props;\n\n\t\tconst editorSettings = this.getEditorSettings(\n\t\t\tsettings,\n\t\t\thasFixedToolbar,\n\t\t\tfocusMode,\n\t\t\thiddenBlockTypes,\n\t\t\tblockTypes\n\t\t);\n\n\t\tconst normalizedPost = post || {\n\t\t\tid: postId,\n\t\t\ttitle: {\n\t\t\t\traw: props.initialTitle || '',\n\t\t\t},\n\t\t\tfeatured_media: featuredImageId,\n\t\t\tcontent: {\n\t\t\t\t// Make sure the post content is in sync with gutenberg store\n\t\t\t\t// to avoid marking the post as modified when simply loaded\n\t\t\t\t// For now, let's assume: serialize( parse( html ) ) !== html.\n\t\t\t\traw: serialize( parse( initialHtml || '' ) ),\n\t\t\t},\n\t\t\ttype: postType,\n\t\t\tstatus: 'draft',\n\t\t\tmeta: [],\n\t\t};\n\n\t\treturn (\n\t\t\t<SlotFillProvider>\n\t\t\t\t<EditorProvider\n\t\t\t\t\tsettings={ editorSettings }\n\t\t\t\t\tpost={ normalizedPost }\n\t\t\t\t\tinitialEdits={ initialEdits }\n\t\t\t\t\tuseSubRegistry={ false }\n\t\t\t\t\t{ ...props }\n\t\t\t\t>\n\t\t\t\t\t<Layout setTitleRef={ this.setTitleRef } />\n\t\t\t\t</EditorProvider>\n\t\t\t</SlotFillProvider>\n\t\t);\n\t}\n}\n\nexport default compose( [\n\twithSelect( ( select ) => {\n\t\tconst {\n\t\t\tisFeatureActive,\n\t\t\tgetEditorMode,\n\t\t\t__experimentalGetPreviewDeviceType,\n\t\t\tgetHiddenBlockTypes,\n\t\t} = select( editPostStore );\n\t\tconst { getBlockTypes } = select( blocksStore );\n\n\t\treturn {\n\t\t\thasFixedToolbar:\n\t\t\t\tisFeatureActive( 'fixedToolbar' ) ||\n\t\t\t\t__experimentalGetPreviewDeviceType() !== 'Desktop',\n\t\t\tfocusMode: isFeatureActive( 'focusMode' ),\n\t\t\tmode: getEditorMode(),\n\t\t\thiddenBlockTypes: getHiddenBlockTypes(),\n\t\t\tblockTypes: getBlockTypes(),\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch ) => {\n\t\tconst { switchEditorMode } = dispatch( editPostStore );\n\t\tconst { editEntityRecord } = dispatch( coreStore );\n\t\treturn {\n\t\t\tswitchEditorMode,\n\t\t\teditEntityRecord,\n\t\t};\n\t} ),\n] )( Editor );\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-post/src/editor.native.js"],"names":["memize","map","I18nManager","GestureHandlerRootView","Component","EditorProvider","parse","serialize","store","blocksStore","withDispatch","withSelect","compose","subscribeSetFocusOnTitle","subscribeFeaturedImageIdNativeUpdated","SlotFillProvider","coreStore","Layout","editPostStore","Editor","constructor","props","arguments","galleryWithImageBlocks","window","wp","galleryBlockV2Enabled","initialHtmlModeEnabled","mode","switchEditorMode","getEditorSettings","maxSize","setTitleRef","bind","settings","hasFixedToolbar","focusMode","hiddenBlockTypes","blockTypes","isRTL","length","allowedBlockTypes","undefined","defaultAllowedBlockTypes","filter","type","includes","componentDidMount","editEntityRecord","postType","postId","subscriptionParentSetFocusOnTitle","postTitleRef","focus","focusTitleWhenAvailable","subscriptionParentFeaturedImageIdNativeUpdated","payload","featured_media","featuredImageId","undoIgnore","componentWillUnmount","remove","titleRef","render","initialEdits","post","initialHtml","editorSettings","normalizedPost","id","title","raw","initialTitle","content","status","meta","flex","select","isFeatureActive","getEditorMode","__experimentalGetPreviewDeviceType","getHiddenBlockTypes","getBlockTypes","dispatch"],"mappings":";;;AAAA;AACA;AACA;AACA,OAAOA,MAAP,MAAmB,QAAnB;AACA,SAASC,GAAT,QAAoB,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AAP,CA4BV7B,MA5BU,CAAf","sourcesContent":["/**\n * External dependencies\n */\nimport memize from 'memize';\nimport { map } from 'lodash';\nimport { I18nManager } from 'react-native';\nimport { GestureHandlerRootView } from 'react-native-gesture-handler';\n\n/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { EditorProvider } from '@wordpress/editor';\nimport { parse, serialize, store as blocksStore } from '@wordpress/blocks';\nimport { withDispatch, withSelect } from '@wordpress/data';\nimport { compose } from '@wordpress/compose';\nimport {\n\tsubscribeSetFocusOnTitle,\n\tsubscribeFeaturedImageIdNativeUpdated,\n} from '@wordpress/react-native-bridge';\nimport { SlotFillProvider } from '@wordpress/components';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport Layout from './components/layout';\nimport { store as editPostStore } from './store';\n\nclass Editor extends Component {\n\tconstructor( props ) {\n\t\tsuper( ...arguments );\n\n\t\t// need to set this globally to avoid race with deprecations\n\t\t// defaulting to true to avoid issues with a not-yet-cached value\n\t\tconst { galleryWithImageBlocks = true } = props;\n\t\twindow.wp.galleryBlockV2Enabled = galleryWithImageBlocks;\n\n\t\tif ( props.initialHtmlModeEnabled && props.mode === 'visual' ) {\n\t\t\t// Enable html mode if the initial mode the parent wants it but we're not already in it.\n\t\t\tthis.props.switchEditorMode( 'text' );\n\t\t}\n\n\t\tthis.getEditorSettings = memize( this.getEditorSettings, {\n\t\t\tmaxSize: 1,\n\t\t} );\n\n\t\tthis.setTitleRef = this.setTitleRef.bind( this );\n\t}\n\n\tgetEditorSettings(\n\t\tsettings,\n\t\thasFixedToolbar,\n\t\tfocusMode,\n\t\thiddenBlockTypes,\n\t\tblockTypes\n\t) {\n\t\tsettings = {\n\t\t\t...settings,\n\t\t\tisRTL: I18nManager.isRTL,\n\t\t\thasFixedToolbar,\n\t\t\tfocusMode,\n\t\t};\n\n\t\t// Omit hidden block types if exists and non-empty.\n\t\tif ( hiddenBlockTypes.length > 0 ) {\n\t\t\tif ( settings.allowedBlockTypes === undefined ) {\n\t\t\t\t// If no specific flags for allowedBlockTypes are set, assume `true`\n\t\t\t\t// meaning allow all block types.\n\t\t\t\tsettings.allowedBlockTypes = true;\n\t\t\t}\n\t\t\t// Defer to passed setting for `allowedBlockTypes` if provided as\n\t\t\t// anything other than `true` (where `true` is equivalent to allow\n\t\t\t// all block types).\n\t\t\tconst defaultAllowedBlockTypes =\n\t\t\t\ttrue === settings.allowedBlockTypes\n\t\t\t\t\t? map( blockTypes, 'name' )\n\t\t\t\t\t: settings.allowedBlockTypes || [];\n\n\t\t\tsettings.allowedBlockTypes = defaultAllowedBlockTypes.filter(\n\t\t\t\t( type ) => ! hiddenBlockTypes.includes( type )\n\t\t\t);\n\t\t}\n\n\t\treturn settings;\n\t}\n\n\tcomponentDidMount() {\n\t\tconst { editEntityRecord, postType, postId } = this.props;\n\n\t\tthis.subscriptionParentSetFocusOnTitle = subscribeSetFocusOnTitle(\n\t\t\t() => {\n\t\t\t\tif ( this.postTitleRef ) {\n\t\t\t\t\tthis.postTitleRef.focus();\n\t\t\t\t} else {\n\t\t\t\t\t// If the post title ref is not available, we postpone setting focus to when it's available.\n\t\t\t\t\tthis.focusTitleWhenAvailable = true;\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\n\t\tthis.subscriptionParentFeaturedImageIdNativeUpdated =\n\t\t\tsubscribeFeaturedImageIdNativeUpdated( ( payload ) => {\n\t\t\t\teditEntityRecord(\n\t\t\t\t\t'postType',\n\t\t\t\t\tpostType,\n\t\t\t\t\tpostId,\n\t\t\t\t\t{ featured_media: payload.featuredImageId },\n\t\t\t\t\t{\n\t\t\t\t\t\tundoIgnore: true,\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t} );\n\t}\n\n\tcomponentWillUnmount() {\n\t\tif ( this.subscriptionParentSetFocusOnTitle ) {\n\t\t\tthis.subscriptionParentSetFocusOnTitle.remove();\n\t\t}\n\n\t\tif ( this.subscribeFeaturedImageIdNativeUpdated ) {\n\t\t\tthis.subscribeFeaturedImageIdNativeUpdated.remove();\n\t\t}\n\t}\n\n\tsetTitleRef( titleRef ) {\n\t\tif ( this.focusTitleWhenAvailable && ! this.postTitleRef ) {\n\t\t\tthis.focusTitleWhenAvailable = false;\n\t\t\ttitleRef.focus();\n\t\t}\n\n\t\tthis.postTitleRef = titleRef;\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\tsettings,\n\t\t\thasFixedToolbar,\n\t\t\tfocusMode,\n\t\t\tinitialEdits,\n\t\t\thiddenBlockTypes,\n\t\t\tblockTypes,\n\t\t\tpost,\n\t\t\tpostId,\n\t\t\tpostType,\n\t\t\tfeaturedImageId,\n\t\t\tinitialHtml,\n\t\t\t...props\n\t\t} = this.props;\n\n\t\tconst editorSettings = this.getEditorSettings(\n\t\t\tsettings,\n\t\t\thasFixedToolbar,\n\t\t\tfocusMode,\n\t\t\thiddenBlockTypes,\n\t\t\tblockTypes\n\t\t);\n\n\t\tconst normalizedPost = post || {\n\t\t\tid: postId,\n\t\t\ttitle: {\n\t\t\t\traw: props.initialTitle || '',\n\t\t\t},\n\t\t\tfeatured_media: featuredImageId,\n\t\t\tcontent: {\n\t\t\t\t// Make sure the post content is in sync with gutenberg store\n\t\t\t\t// to avoid marking the post as modified when simply loaded\n\t\t\t\t// For now, let's assume: serialize( parse( html ) ) !== html.\n\t\t\t\traw: serialize( parse( initialHtml || '' ) ),\n\t\t\t},\n\t\t\ttype: postType,\n\t\t\tstatus: 'draft',\n\t\t\tmeta: [],\n\t\t};\n\n\t\treturn (\n\t\t\t<GestureHandlerRootView style={ { flex: 1 } }>\n\t\t\t\t<SlotFillProvider>\n\t\t\t\t\t<EditorProvider\n\t\t\t\t\t\tsettings={ editorSettings }\n\t\t\t\t\t\tpost={ normalizedPost }\n\t\t\t\t\t\tinitialEdits={ initialEdits }\n\t\t\t\t\t\tuseSubRegistry={ false }\n\t\t\t\t\t\t{ ...props }\n\t\t\t\t\t>\n\t\t\t\t\t\t<Layout setTitleRef={ this.setTitleRef } />\n\t\t\t\t\t</EditorProvider>\n\t\t\t\t</SlotFillProvider>\n\t\t\t</GestureHandlerRootView>\n\t\t);\n\t}\n}\n\nexport default compose( [\n\twithSelect( ( select ) => {\n\t\tconst {\n\t\t\tisFeatureActive,\n\t\t\tgetEditorMode,\n\t\t\t__experimentalGetPreviewDeviceType,\n\t\t\tgetHiddenBlockTypes,\n\t\t} = select( editPostStore );\n\t\tconst { getBlockTypes } = select( blocksStore );\n\n\t\treturn {\n\t\t\thasFixedToolbar:\n\t\t\t\tisFeatureActive( 'fixedToolbar' ) ||\n\t\t\t\t__experimentalGetPreviewDeviceType() !== 'Desktop',\n\t\t\tfocusMode: isFeatureActive( 'focusMode' ),\n\t\t\tmode: getEditorMode(),\n\t\t\thiddenBlockTypes: getHiddenBlockTypes(),\n\t\t\tblockTypes: getBlockTypes(),\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch ) => {\n\t\tconst { switchEditorMode } = dispatch( editPostStore );\n\t\tconst { editEntityRecord } = dispatch( coreStore );\n\t\treturn {\n\t\t\tswitchEditorMode,\n\t\t\teditEntityRecord,\n\t\t};\n\t} ),\n] )( Editor );\n"]}
@@ -1,14 +1,9 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import { createElement } from "@wordpress/element";
3
3
 
4
- /**
5
- * External dependencies
6
- */
7
- import { find } from 'lodash';
8
4
  /**
9
5
  * WordPress dependencies
10
6
  */
11
-
12
7
  import { createBlock, findTransform, getBlockTransforms, getBlockType, hasBlockSupport } from '@wordpress/blocks';
13
8
  import { Button } from '@wordpress/components';
14
9
  import { withSelect, withDispatch } from '@wordpress/data';
@@ -39,7 +34,7 @@ withSelect((select, block) => {
39
34
 
40
35
 
41
36
  const blocks = select(blockEditorStore).getBlocks();
42
- const firstOfSameType = find(blocks, _ref => {
37
+ const firstOfSameType = blocks.find(_ref => {
43
38
  let {
44
39
  name
45
40
  } = _ref;
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-post/src/hooks/validate-multiple-use/index.js"],"names":["find","createBlock","findTransform","getBlockTransforms","getBlockType","hasBlockSupport","Button","withSelect","withDispatch","Warning","store","blockEditorStore","addFilter","__","compose","createHigherOrderComponent","enhance","select","block","multiple","name","blocks","getBlocks","firstOfSameType","isInvalid","clientId","originalBlockClientId","dispatch","selectFirst","selectBlock","withMultipleValidation","BlockEdit","props","blockType","outboundType","getOutboundType","minHeight","onReplace","attributes","title","blockName","transform","type","length"],"mappings":";;;AAAA;AACA;AACA;AACA,SAASA,IAAT,QAAqB,QAArB;AAEA;AACA;AACA;;AACA,SACCC,WADD,EAECC,aAFD,EAGCC,kBAHD,EAICC,YAJD,EAKCC,eALD,QAMO,mBANP;AAOA,SAASC,MAAT,QAAuB,uBAAvB;AACA,SAASC,UAAT,EAAqBC,YAArB,QAAyC,iBAAzC;AACA,SAASC,OAAT,EAAkBC,KAAK,IAAIC,gBAA3B,QAAmD,yBAAnD;AACA,SAASC,SAAT,QAA0B,kBAA1B;AACA,SAASC,EAAT,QAAmB,iBAAnB;AACA,SAASC,OAAT,EAAkBC,0BAAlB,QAAoD,oBAApD;AAEA,MAAMC,OAAO,GAAGF,OAAO;AACtB;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACCP,UAAU,CAAE,CAAEU,MAAF,EAAUC,KAAV,KAAqB;AAChC,QAAMC,QAAQ,GAAGd,eAAe,CAAEa,KAAK,CAACE,IAAR,EAAc,UAAd,EAA0B,IAA1B,CAAhC,CADgC,CAGhC;AACA;;AACA,MAAKD,QAAL,EAAgB;AACf,WAAO,EAAP;AACA,GAP+B,CAShC;AACA;;;AACA,QAAME,MAAM,GAAGJ,MAAM,CAAEN,gBAAF,CAAN,CAA2BW,SAA3B,EAAf;AACA,QAAMC,eAAe,GAAGvB,IAAI,CAC3BqB,MAD2B,EAE3B;AAAA,QAAE;AAAED,MAAAA;AAAF,KAAF;AAAA,WAAgBF,KAAK,CAACE,IAAN,KAAeA,IAA/B;AAA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n\n/**\n * WordPress dependencies\n */\nimport {\n\tcreateBlock,\n\tfindTransform,\n\tgetBlockTransforms,\n\tgetBlockType,\n\thasBlockSupport,\n} from '@wordpress/blocks';\nimport { Button } from '@wordpress/components';\nimport { withSelect, withDispatch } from '@wordpress/data';\nimport { Warning, store as blockEditorStore } from '@wordpress/block-editor';\nimport { addFilter } from '@wordpress/hooks';\nimport { __ } from '@wordpress/i18n';\nimport { compose, createHigherOrderComponent } from '@wordpress/compose';\n\nconst enhance = compose(\n\t/**\n\t * For blocks whose block type doesn't support `multiple`, provides the\n\t * wrapped component with `originalBlockClientId` -- a reference to the\n\t * first block of the same type in the content -- if and only if that\n\t * \"original\" block is not the current one. Thus, an inexisting\n\t * `originalBlockClientId` prop signals that the block is valid.\n\t *\n\t * @param {WPComponent} WrappedBlockEdit A filtered BlockEdit instance.\n\t *\n\t * @return {WPComponent} Enhanced component with merged state data props.\n\t */\n\twithSelect( ( select, block ) => {\n\t\tconst multiple = hasBlockSupport( block.name, 'multiple', true );\n\n\t\t// For block types with `multiple` support, there is no \"original\n\t\t// block\" to be found in the content, as the block itself is valid.\n\t\tif ( multiple ) {\n\t\t\treturn {};\n\t\t}\n\n\t\t// Otherwise, only pass `originalBlockClientId` if it refers to a different\n\t\t// block from the current one.\n\t\tconst blocks = select( blockEditorStore ).getBlocks();\n\t\tconst firstOfSameType = find(\n\t\t\tblocks,\n\t\t\t( { name } ) => block.name === name\n\t\t);\n\t\tconst isInvalid =\n\t\t\tfirstOfSameType && firstOfSameType.clientId !== block.clientId;\n\t\treturn {\n\t\t\toriginalBlockClientId: isInvalid && firstOfSameType.clientId,\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch, { originalBlockClientId } ) => ( {\n\t\tselectFirst: () =>\n\t\t\tdispatch( blockEditorStore ).selectBlock( originalBlockClientId ),\n\t} ) )\n);\n\nconst withMultipleValidation = createHigherOrderComponent( ( BlockEdit ) => {\n\treturn enhance( ( { originalBlockClientId, selectFirst, ...props } ) => {\n\t\tif ( ! originalBlockClientId ) {\n\t\t\treturn <BlockEdit { ...props } />;\n\t\t}\n\n\t\tconst blockType = getBlockType( props.name );\n\t\tconst outboundType = getOutboundType( props.name );\n\n\t\treturn [\n\t\t\t<div key=\"invalid-preview\" style={ { minHeight: '60px' } }>\n\t\t\t\t<BlockEdit key=\"block-edit\" { ...props } />\n\t\t\t</div>,\n\t\t\t<Warning\n\t\t\t\tkey=\"multiple-use-warning\"\n\t\t\t\tactions={ [\n\t\t\t\t\t<Button\n\t\t\t\t\t\tkey=\"find-original\"\n\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\tonClick={ selectFirst }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Find original' ) }\n\t\t\t\t\t</Button>,\n\t\t\t\t\t<Button\n\t\t\t\t\t\tkey=\"remove\"\n\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\tonClick={ () => props.onReplace( [] ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Remove' ) }\n\t\t\t\t\t</Button>,\n\t\t\t\t\toutboundType && (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tkey=\"transform\"\n\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\t\tprops.onReplace(\n\t\t\t\t\t\t\t\t\tcreateBlock(\n\t\t\t\t\t\t\t\t\t\toutboundType.name,\n\t\t\t\t\t\t\t\t\t\tprops.attributes\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Transform into:' ) } { outboundType.title }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t),\n\t\t\t\t] }\n\t\t\t>\n\t\t\t\t<strong>{ blockType?.title }: </strong>\n\t\t\t\t{ __( 'This block can only be used once.' ) }\n\t\t\t</Warning>,\n\t\t];\n\t} );\n}, 'withMultipleValidation' );\n\n/**\n * Given a base block name, returns the default block type to which to offer\n * transforms.\n *\n * @param {string} blockName Base block name.\n *\n * @return {?Object} The chosen default block type.\n */\nfunction getOutboundType( blockName ) {\n\t// Grab the first outbound transform.\n\tconst transform = findTransform(\n\t\tgetBlockTransforms( 'to', blockName ),\n\t\t( { type, blocks } ) => type === 'block' && blocks.length === 1 // What about when .length > 1?\n\t);\n\n\tif ( ! transform ) {\n\t\treturn null;\n\t}\n\n\treturn getBlockType( transform.blocks[ 0 ] );\n}\n\naddFilter(\n\t'editor.BlockEdit',\n\t'core/edit-post/validate-multiple-use/with-multiple-validation',\n\twithMultipleValidation\n);\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-post/src/hooks/validate-multiple-use/index.js"],"names":["createBlock","findTransform","getBlockTransforms","getBlockType","hasBlockSupport","Button","withSelect","withDispatch","Warning","store","blockEditorStore","addFilter","__","compose","createHigherOrderComponent","enhance","select","block","multiple","name","blocks","getBlocks","firstOfSameType","find","isInvalid","clientId","originalBlockClientId","dispatch","selectFirst","selectBlock","withMultipleValidation","BlockEdit","props","blockType","outboundType","getOutboundType","minHeight","onReplace","attributes","title","blockName","transform","type","length"],"mappings":";;;AAAA;AACA;AACA;AACA,SACCA,WADD,EAECC,aAFD,EAGCC,kBAHD,EAICC,YAJD,EAKCC,eALD,QAMO,mBANP;AAOA,SAASC,MAAT,QAAuB,uBAAvB;AACA,SAASC,UAAT,EAAqBC,YAArB,QAAyC,iBAAzC;AACA,SAASC,OAAT,EAAkBC,KAAK,IAAIC,gBAA3B,QAAmD,yBAAnD;AACA,SAASC,SAAT,QAA0B,kBAA1B;AACA,SAASC,EAAT,QAAmB,iBAAnB;AACA,SAASC,OAAT,EAAkBC,0BAAlB,QAAoD,oBAApD;AAEA,MAAMC,OAAO,GAAGF,OAAO;AACtB;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACCP,UAAU,CAAE,CAAEU,MAAF,EAAUC,KAAV,KAAqB;AAChC,QA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AAF;AAAQtB,MAAAA;AAAR,KAAF;AAAA,WAAwBsB,IAAI,KAAK,OAAT,IAAoBtB,MAAM,CAACuB,MAAP,KAAkB,CAA9D;AAAA,GAF8B,CAEkC;AAFlC,GAA/B;;AAKA,MAAK,CAAEF,SAAP,EAAmB;AAClB,WAAO,IAAP;AACA;;AAED,SAAOtC,YAAY,CAAEsC,SAAS,CAACrB,MAAV,CAAkB,CAAlB,CAAF,CAAnB;AACA;;AAEDT,SAAS,CACR,kBADQ,EAER,+DAFQ,EAGRmB,sBAHQ,CAAT","sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tcreateBlock,\n\tfindTransform,\n\tgetBlockTransforms,\n\tgetBlockType,\n\thasBlockSupport,\n} from '@wordpress/blocks';\nimport { Button } from '@wordpress/components';\nimport { withSelect, withDispatch } from '@wordpress/data';\nimport { Warning, store as blockEditorStore } from '@wordpress/block-editor';\nimport { addFilter } from '@wordpress/hooks';\nimport { __ } from '@wordpress/i18n';\nimport { compose, createHigherOrderComponent } from '@wordpress/compose';\n\nconst enhance = compose(\n\t/**\n\t * For blocks whose block type doesn't support `multiple`, provides the\n\t * wrapped component with `originalBlockClientId` -- a reference to the\n\t * first block of the same type in the content -- if and only if that\n\t * \"original\" block is not the current one. Thus, an inexisting\n\t * `originalBlockClientId` prop signals that the block is valid.\n\t *\n\t * @param {WPComponent} WrappedBlockEdit A filtered BlockEdit instance.\n\t *\n\t * @return {WPComponent} Enhanced component with merged state data props.\n\t */\n\twithSelect( ( select, block ) => {\n\t\tconst multiple = hasBlockSupport( block.name, 'multiple', true );\n\n\t\t// For block types with `multiple` support, there is no \"original\n\t\t// block\" to be found in the content, as the block itself is valid.\n\t\tif ( multiple ) {\n\t\t\treturn {};\n\t\t}\n\n\t\t// Otherwise, only pass `originalBlockClientId` if it refers to a different\n\t\t// block from the current one.\n\t\tconst blocks = select( blockEditorStore ).getBlocks();\n\t\tconst firstOfSameType = blocks.find(\n\t\t\t( { name } ) => block.name === name\n\t\t);\n\t\tconst isInvalid =\n\t\t\tfirstOfSameType && firstOfSameType.clientId !== block.clientId;\n\t\treturn {\n\t\t\toriginalBlockClientId: isInvalid && firstOfSameType.clientId,\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch, { originalBlockClientId } ) => ( {\n\t\tselectFirst: () =>\n\t\t\tdispatch( blockEditorStore ).selectBlock( originalBlockClientId ),\n\t} ) )\n);\n\nconst withMultipleValidation = createHigherOrderComponent( ( BlockEdit ) => {\n\treturn enhance( ( { originalBlockClientId, selectFirst, ...props } ) => {\n\t\tif ( ! originalBlockClientId ) {\n\t\t\treturn <BlockEdit { ...props } />;\n\t\t}\n\n\t\tconst blockType = getBlockType( props.name );\n\t\tconst outboundType = getOutboundType( props.name );\n\n\t\treturn [\n\t\t\t<div key=\"invalid-preview\" style={ { minHeight: '60px' } }>\n\t\t\t\t<BlockEdit key=\"block-edit\" { ...props } />\n\t\t\t</div>,\n\t\t\t<Warning\n\t\t\t\tkey=\"multiple-use-warning\"\n\t\t\t\tactions={ [\n\t\t\t\t\t<Button\n\t\t\t\t\t\tkey=\"find-original\"\n\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\tonClick={ selectFirst }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Find original' ) }\n\t\t\t\t\t</Button>,\n\t\t\t\t\t<Button\n\t\t\t\t\t\tkey=\"remove\"\n\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\tonClick={ () => props.onReplace( [] ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Remove' ) }\n\t\t\t\t\t</Button>,\n\t\t\t\t\toutboundType && (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tkey=\"transform\"\n\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\t\tprops.onReplace(\n\t\t\t\t\t\t\t\t\tcreateBlock(\n\t\t\t\t\t\t\t\t\t\toutboundType.name,\n\t\t\t\t\t\t\t\t\t\tprops.attributes\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Transform into:' ) } { outboundType.title }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t),\n\t\t\t\t] }\n\t\t\t>\n\t\t\t\t<strong>{ blockType?.title }: </strong>\n\t\t\t\t{ __( 'This block can only be used once.' ) }\n\t\t\t</Warning>,\n\t\t];\n\t} );\n}, 'withMultipleValidation' );\n\n/**\n * Given a base block name, returns the default block type to which to offer\n * transforms.\n *\n * @param {string} blockName Base block name.\n *\n * @return {?Object} The chosen default block type.\n */\nfunction getOutboundType( blockName ) {\n\t// Grab the first outbound transform.\n\tconst transform = findTransform(\n\t\tgetBlockTransforms( 'to', blockName ),\n\t\t( { type, blocks } ) => type === 'block' && blocks.length === 1 // What about when .length > 1?\n\t);\n\n\tif ( ! transform ) {\n\t\treturn null;\n\t}\n\n\treturn getBlockType( transform.blocks[ 0 ] );\n}\n\naddFilter(\n\t'editor.BlockEdit',\n\t'core/edit-post/validate-multiple-use/with-multiple-validation',\n\twithMultipleValidation\n);\n"]}
@@ -16,6 +16,7 @@ import CopyContentMenuItem from './copy-content-menu-item';
16
16
  import KeyboardShortcutsHelpMenuItem from './keyboard-shortcuts-help-menu-item';
17
17
  import ToolsMoreMenuGroup from '../components/header/tools-more-menu-group';
18
18
  import WelcomeGuideMenuItem from './welcome-guide-menu-item';
19
+ import NavigationListViewMenuItem from './navigation-list-view-menu-item';
19
20
  registerPlugin('edit-post', {
20
21
  render() {
21
22
  return createElement(Fragment, null, createElement(ToolsMoreMenuGroup, null, _ref => {
@@ -40,7 +41,7 @@ registerPlugin('edit-post', {
40
41
  },
41
42
  /* translators: accessibility text */
42
43
  __('(opens in a new tab)'))));
43
- }));
44
+ }), createElement(NavigationListViewMenuItem, null));
44
45
  }
45
46
 
46
47
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-post/src/plugins/index.js"],"names":["MenuItem","VisuallyHidden","external","__","registerPlugin","addQueryArgs","CopyContentMenuItem","KeyboardShortcutsHelpMenuItem","ToolsMoreMenuGroup","WelcomeGuideMenuItem","render","onClose","post_type"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,QAAT,EAAmBC,cAAnB,QAAyC,uBAAzC;AACA,SAASC,QAAT,QAAyB,kBAAzB;AACA,SAASC,EAAT,QAAmB,iBAAnB;AACA,SAASC,cAAT,QAA+B,oBAA/B;AACA,SAASC,YAAT,QAA6B,gBAA7B;AAEA;AACA;AACA;;AACA,OAAOC,mBAAP,MAAgC,0BAAhC;AACA,OAAOC,6BAAP,MAA0C,qCAA1C;AACA,OAAOC,kBAAP,MAA+B,4CAA/B;AACA,OAAOC,oBAAP,MAAiC,2BAAjC;AAEAL,cAAc,CAAE,WAAF,EAAe;AAC5BM,EAAAA,MAAM,GAAG;AACR,WACC,8BACC,cAAC,kBAAD,QACG;AAAA,UAAE;AAAEC,QAAAA;AAAF,OAAF;AAAA,aACD,8BACC,cAAC,QAAD;AACC,QAAA,IAAI,EAAC,UADN;AAEC,QAAA,IAAI,EAAGN,YAAY,CAAE,UAAF,EAAc;AAChCO,UAAAA,SAAS,EAAE;AADqB,SAAd;AAFpB,SAMGT,EAAE,CAAE,wBAAF,CANL,CADD,EASC,cAAC,6BAAD;AACC,QAAA,QAAQ,EAAGQ;AADZ,QATD,EAYC,cAAC,oBAAD,OAZD,EAaC,cAAC,mBAAD,OAbD,EAcC,cAAC,QAAD;AACC,QAAA,IAAI,EAAC,UADN;AAEC,QAAA,IAAI,EAAGT,QAFR;AAGC,QAAA,IAAI,EAAGC,EAAE,CACR,yDADQ,CAHV;AAMC,QAAA,MAAM,EAAC,QANR;AAOC,QAAA,GAAG,EAAC;AAPL,SASGA,EAAE,CAAE,MAAF,CATL,EAUC,cAAC,cAAD;AAAgB,QAAA,EAAE,EAAC;AAAnB;AAEE;AACAA,MAAAA,EAAE,CAAE,sBAAF,CAHJ,CAVD,CAdD,CADC;AAAA,KADH,CADD,CADD;AAwCA;;AA1C2B,CAAf,CAAd","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { MenuItem, VisuallyHidden } from '@wordpress/components';\nimport { external } from '@wordpress/icons';\nimport { __ } from '@wordpress/i18n';\nimport { registerPlugin } from '@wordpress/plugins';\nimport { addQueryArgs } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport CopyContentMenuItem from './copy-content-menu-item';\nimport KeyboardShortcutsHelpMenuItem from './keyboard-shortcuts-help-menu-item';\nimport ToolsMoreMenuGroup from '../components/header/tools-more-menu-group';\nimport WelcomeGuideMenuItem from './welcome-guide-menu-item';\n\nregisterPlugin( 'edit-post', {\n\trender() {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<ToolsMoreMenuGroup>\n\t\t\t\t\t{ ( { onClose } ) => (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\trole=\"menuitem\"\n\t\t\t\t\t\t\t\thref={ addQueryArgs( 'edit.php', {\n\t\t\t\t\t\t\t\t\tpost_type: 'wp_block',\n\t\t\t\t\t\t\t\t} ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Manage Reusable blocks' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t<KeyboardShortcutsHelpMenuItem\n\t\t\t\t\t\t\t\tonSelect={ onClose }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<WelcomeGuideMenuItem />\n\t\t\t\t\t\t\t<CopyContentMenuItem />\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\trole=\"menuitem\"\n\t\t\t\t\t\t\t\ticon={ external }\n\t\t\t\t\t\t\t\thref={ __(\n\t\t\t\t\t\t\t\t\t'https://wordpress.org/support/article/wordpress-editor/'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\trel=\"noopener noreferrer\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Help' ) }\n\t\t\t\t\t\t\t\t<VisuallyHidden as=\"span\">\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t/* translators: accessibility text */\n\t\t\t\t\t\t\t\t\t\t__( '(opens in a new tab)' )\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t</>\n\t\t\t\t\t) }\n\t\t\t\t</ToolsMoreMenuGroup>\n\t\t\t</>\n\t\t);\n\t},\n} );\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-post/src/plugins/index.js"],"names":["MenuItem","VisuallyHidden","external","__","registerPlugin","addQueryArgs","CopyContentMenuItem","KeyboardShortcutsHelpMenuItem","ToolsMoreMenuGroup","WelcomeGuideMenuItem","NavigationListViewMenuItem","render","onClose","post_type"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,QAAT,EAAmBC,cAAnB,QAAyC,uBAAzC;AACA,SAASC,QAAT,QAAyB,kBAAzB;AACA,SAASC,EAAT,QAAmB,iBAAnB;AACA,SAASC,cAAT,QAA+B,oBAA/B;AACA,SAASC,YAAT,QAA6B,gBAA7B;AAEA;AACA;AACA;;AACA,OAAOC,mBAAP,MAAgC,0BAAhC;AACA,OAAOC,6BAAP,MAA0C,qCAA1C;AACA,OAAOC,kBAAP,MAA+B,4CAA/B;AACA,OAAOC,oBAAP,MAAiC,2BAAjC;AACA,OAAOC,0BAAP,MAAuC,kCAAvC;AAEAN,cAAc,CAAE,WAAF,EAAe;AAC5BO,EAAAA,MAAM,GAAG;AACR,WACC,8BACC,cAAC,kBAAD,QACG;AAAA,UAAE;AAAEC,QAAAA;AAAF,OAAF;AAAA,aACD,8BACC,cAAC,QAAD;AACC,QAAA,IAAI,EAAC,UADN;AAEC,QAAA,IAAI,EAAGP,YAAY,CAAE,UAAF,EAAc;AAChCQ,UAAAA,SAAS,EAAE;AADqB,SAAd;AAFpB,SAMGV,EAAE,CAAE,wBAAF,CANL,CADD,EASC,cAAC,6BAAD;AACC,QAAA,QAAQ,EAAGS;AADZ,QATD,EAYC,cAAC,oBAAD,OAZD,EAaC,cAAC,mBAAD,OAbD,EAcC,cAAC,QAAD;AACC,QAAA,IAAI,EAAC,UADN;AAEC,QAAA,IAAI,EAAGV,QAFR;AAGC,QAAA,IAAI,EAAGC,EAAE,CACR,yDADQ,CAHV;AAMC,QAAA,MAAM,EAAC,QANR;AAOC,QAAA,GAAG,EAAC;AAPL,SASGA,EAAE,CAAE,MAAF,CATL,EAUC,cAAC,cAAD;AAAgB,QAAA,EAAE,EAAC;AAAnB;AAEE;AACAA,MAAAA,EAAE,CAAE,sBAAF,CAHJ,CAVD,CAdD,CADC;AAAA,KADH,CADD,EAqCC,cAAC,0BAAD,OArCD,CADD;AAyCA;;AA3C2B,CAAf,CAAd","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { MenuItem, VisuallyHidden } from '@wordpress/components';\nimport { external } from '@wordpress/icons';\nimport { __ } from '@wordpress/i18n';\nimport { registerPlugin } from '@wordpress/plugins';\nimport { addQueryArgs } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport CopyContentMenuItem from './copy-content-menu-item';\nimport KeyboardShortcutsHelpMenuItem from './keyboard-shortcuts-help-menu-item';\nimport ToolsMoreMenuGroup from '../components/header/tools-more-menu-group';\nimport WelcomeGuideMenuItem from './welcome-guide-menu-item';\nimport NavigationListViewMenuItem from './navigation-list-view-menu-item';\n\nregisterPlugin( 'edit-post', {\n\trender() {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<ToolsMoreMenuGroup>\n\t\t\t\t\t{ ( { onClose } ) => (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\trole=\"menuitem\"\n\t\t\t\t\t\t\t\thref={ addQueryArgs( 'edit.php', {\n\t\t\t\t\t\t\t\t\tpost_type: 'wp_block',\n\t\t\t\t\t\t\t\t} ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Manage Reusable blocks' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t<KeyboardShortcutsHelpMenuItem\n\t\t\t\t\t\t\t\tonSelect={ onClose }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<WelcomeGuideMenuItem />\n\t\t\t\t\t\t\t<CopyContentMenuItem />\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\trole=\"menuitem\"\n\t\t\t\t\t\t\t\ticon={ external }\n\t\t\t\t\t\t\t\thref={ __(\n\t\t\t\t\t\t\t\t\t'https://wordpress.org/support/article/wordpress-editor/'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\trel=\"noopener noreferrer\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Help' ) }\n\t\t\t\t\t\t\t\t<VisuallyHidden as=\"span\">\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t/* translators: accessibility text */\n\t\t\t\t\t\t\t\t\t\t__( '(opens in a new tab)' )\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t</>\n\t\t\t\t\t) }\n\t\t\t\t</ToolsMoreMenuGroup>\n\t\t\t\t<NavigationListViewMenuItem />\n\t\t\t</>\n\t\t);\n\t},\n} );\n"]}
@@ -0,0 +1,40 @@
1
+ var _window;
2
+
3
+ import { createElement } from "@wordpress/element";
4
+
5
+ /**
6
+ * WordPress dependencies
7
+ */
8
+ import { BlockEditorProvider, __unstableBlockToolbarLastItem, __unstableBlockNameContext } from '@wordpress/block-editor';
9
+ import { ToolbarButton, ToolbarGroup } from '@wordpress/components';
10
+ import { useDispatch } from '@wordpress/data';
11
+ import { Fragment } from '@wordpress/element';
12
+ import { __ } from '@wordpress/i18n';
13
+ import { listView } from '@wordpress/icons';
14
+
15
+ const NavMenuSidebarToggle = () => {
16
+ // eslint-disable-next-line @wordpress/data-no-store-string-literals
17
+ const {
18
+ openGeneralSidebar
19
+ } = useDispatch('core/edit-post');
20
+ return createElement(ToolbarGroup, null, createElement(ToolbarButton, {
21
+ className: "components-toolbar__control",
22
+ label: __('Open navigation list view'),
23
+ onClick: () => openGeneralSidebar('edit-post/block'),
24
+ icon: listView
25
+ }));
26
+ };
27
+
28
+ let MaybeNavMenuSidebarToggle = Fragment;
29
+ const isOffCanvasNavigationEditorEnabled = ((_window = window) === null || _window === void 0 ? void 0 : _window.__experimentalEnableOffCanvasNavigationEditor) === true;
30
+
31
+ if (isOffCanvasNavigationEditorEnabled) {
32
+ MaybeNavMenuSidebarToggle = NavMenuSidebarToggle;
33
+ }
34
+
35
+ const NavigationEditMenuItem = () => {
36
+ return createElement(BlockEditorProvider, null, createElement(__unstableBlockToolbarLastItem, null, createElement(__unstableBlockNameContext.Consumer, null, blockName => blockName === 'core/navigation' && createElement(MaybeNavMenuSidebarToggle, null))));
37
+ };
38
+
39
+ export default NavigationEditMenuItem;
40
+ //# sourceMappingURL=navigation-list-view-menu-item.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["@wordpress/edit-post/src/plugins/navigation-list-view-menu-item.js"],"names":["BlockEditorProvider","__unstableBlockToolbarLastItem","__unstableBlockNameContext","ToolbarButton","ToolbarGroup","useDispatch","Fragment","__","listView","NavMenuSidebarToggle","openGeneralSidebar","MaybeNavMenuSidebarToggle","isOffCanvasNavigationEditorEnabled","window","__experimentalEnableOffCanvasNavigationEditor","NavigationEditMenuItem","blockName"],"mappings":";;;;AAAA;AACA;AACA;AACA,SACCA,mBADD,EAECC,8BAFD,EAGCC,0BAHD,QAIO,yBAJP;AAKA,SAASC,aAAT,EAAwBC,YAAxB,QAA4C,uBAA5C;AACA,SAASC,WAAT,QAA4B,iBAA5B;AACA,SAASC,QAAT,QAAyB,oBAAzB;AACA,SAASC,EAAT,QAAmB,iBAAnB;AACA,SAASC,QAAT,QAAyB,kBAAzB;;AAEA,MAAMC,oBAAoB,GAAG,MAAM;AAClC;AACA,QAAM;AAAEC,IAAAA;AAAF,MAAyBL,WAAW,CAAE,gBAAF,CAA1C;AAEA,SACC,cAAC,YAAD,QACC,cAAC,aAAD;AACC,IAAA,SAAS,EAAC,6BADX;AAEC,IAAA,KAAK,EAAGE,EAAE,CAAE,2BAAF,CAFX;AAGC,IAAA,OAAO,EAAG,MAAMG,kBAAkB,CAAE,iBAAF,CAHnC;AAIC,IAAA,IAAI,EAAGF;AAJR,IADD,CADD;AAUA,CAdD;;AAgBA,IAAIG,yBAAyB,GAAGL,QAAhC;AAEA,MAAMM,kCAAkC,GACvC,YAAAC,MAAM,UAAN,0CAAQC,6CAAR,MAA0D,IAD3D;;AAGA,IAAKF,kCAAL,EAA0C;AACzCD,EAAAA,yBAAyB,GAAGF,oBAA5B;AACA;;AAED,MAAMM,sBAAsB,GAAG,MAAM;AACpC,SACC,cAAC,mBAAD,QACC,cAAC,8BAAD,QACC,cAAC,0BAAD,CAA4B,QAA5B,QACKC,SAAF,IACDA,SAAS,KAAK,iBAAd,IACC,cAAC,yBAAD,OAHH,CADD,CADD,CADD;AAaA,CAdD;;AAgBA,eAAeD,sBAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tBlockEditorProvider,\n\t__unstableBlockToolbarLastItem,\n\t__unstableBlockNameContext,\n} from '@wordpress/block-editor';\nimport { ToolbarButton, ToolbarGroup } from '@wordpress/components';\nimport { useDispatch } from '@wordpress/data';\nimport { Fragment } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { listView } from '@wordpress/icons';\n\nconst NavMenuSidebarToggle = () => {\n\t// eslint-disable-next-line @wordpress/data-no-store-string-literals\n\tconst { openGeneralSidebar } = useDispatch( 'core/edit-post' );\n\n\treturn (\n\t\t<ToolbarGroup>\n\t\t\t<ToolbarButton\n\t\t\t\tclassName=\"components-toolbar__control\"\n\t\t\t\tlabel={ __( 'Open navigation list view' ) }\n\t\t\t\tonClick={ () => openGeneralSidebar( 'edit-post/block' ) }\n\t\t\t\ticon={ listView }\n\t\t\t/>\n\t\t</ToolbarGroup>\n\t);\n};\n\nlet MaybeNavMenuSidebarToggle = Fragment;\n\nconst isOffCanvasNavigationEditorEnabled =\n\twindow?.__experimentalEnableOffCanvasNavigationEditor === true;\n\nif ( isOffCanvasNavigationEditorEnabled ) {\n\tMaybeNavMenuSidebarToggle = NavMenuSidebarToggle;\n}\n\nconst NavigationEditMenuItem = () => {\n\treturn (\n\t\t<BlockEditorProvider>\n\t\t\t<__unstableBlockToolbarLastItem>\n\t\t\t\t<__unstableBlockNameContext.Consumer>\n\t\t\t\t\t{ ( blockName ) =>\n\t\t\t\t\t\tblockName === 'core/navigation' && (\n\t\t\t\t\t\t\t<MaybeNavMenuSidebarToggle />\n\t\t\t\t\t\t)\n\t\t\t\t\t}\n\t\t\t\t</__unstableBlockNameContext.Consumer>\n\t\t\t</__unstableBlockToolbarLastItem>\n\t\t</BlockEditorProvider>\n\t);\n};\n\nexport default NavigationEditMenuItem;\n"]}
@@ -1,3 +1,9 @@
1
+ /**
2
+ * Converts a hex value into the rgb equivalent.
3
+ *
4
+ * @param {string} hex - the hexadecimal value to convert
5
+ * @return {string} comma separated rgb values
6
+ */
1
7
  /**
2
8
  * Colors
3
9
  */
@@ -11,6 +17,12 @@
11
17
  * Don't add to this sheet unless you're pretty sure the value will be reused in many places.
12
18
  * For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
13
19
  */
20
+ /**
21
+ * Converts a hex value into the rgb equivalent.
22
+ *
23
+ * @param {string} hex - the hexadecimal value to convert
24
+ * @return {string} comma separated rgb values
25
+ */
14
26
  /**
15
27
  * Colors
16
28
  */
@@ -82,6 +94,8 @@
82
94
  --wp-admin-theme-color-darker-20: #005a87;
83
95
  --wp-admin-theme-color-darker-20--rgb: 0, 90, 135;
84
96
  --wp-admin-border-width-focus: 2px;
97
+ --wp-block-synced-color: #7a00df;
98
+ --wp-block-synced-color--rgb: 122, 0, 223;
85
99
  }
86
100
  @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
87
101
  :root {
@@ -1,3 +1,9 @@
1
+ /**
2
+ * Converts a hex value into the rgb equivalent.
3
+ *
4
+ * @param {string} hex - the hexadecimal value to convert
5
+ * @return {string} comma separated rgb values
6
+ */
1
7
  /**
2
8
  * Colors
3
9
  */
@@ -11,6 +17,12 @@
11
17
  * Don't add to this sheet unless you're pretty sure the value will be reused in many places.
12
18
  * For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
13
19
  */
20
+ /**
21
+ * Converts a hex value into the rgb equivalent.
22
+ *
23
+ * @param {string} hex - the hexadecimal value to convert
24
+ * @return {string} comma separated rgb values
25
+ */
14
26
  /**
15
27
  * Colors
16
28
  */
@@ -82,6 +94,8 @@
82
94
  --wp-admin-theme-color-darker-20: #005a87;
83
95
  --wp-admin-theme-color-darker-20--rgb: 0, 90, 135;
84
96
  --wp-admin-border-width-focus: 2px;
97
+ --wp-block-synced-color: #7a00df;
98
+ --wp-block-synced-color--rgb: 122, 0, 223;
85
99
  }
86
100
  @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
87
101
  :root {
@@ -1,3 +1,9 @@
1
+ /**
2
+ * Converts a hex value into the rgb equivalent.
3
+ *
4
+ * @param {string} hex - the hexadecimal value to convert
5
+ * @return {string} comma separated rgb values
6
+ */
1
7
  /**
2
8
  * Colors
3
9
  */
@@ -11,6 +17,12 @@
11
17
  * Don't add to this sheet unless you're pretty sure the value will be reused in many places.
12
18
  * For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
13
19
  */
20
+ /**
21
+ * Converts a hex value into the rgb equivalent.
22
+ *
23
+ * @param {string} hex - the hexadecimal value to convert
24
+ * @return {string} comma separated rgb values
25
+ */
14
26
  /**
15
27
  * Colors
16
28
  */
@@ -82,6 +94,8 @@
82
94
  --wp-admin-theme-color-darker-20: #005a87;
83
95
  --wp-admin-theme-color-darker-20--rgb: 0, 90, 135;
84
96
  --wp-admin-border-width-focus: 2px;
97
+ --wp-block-synced-color: #7a00df;
98
+ --wp-block-synced-color--rgb: 122, 0, 223;
85
99
  }
86
100
  @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
87
101
  :root {
@@ -308,6 +322,8 @@ body.is-fullscreen-mode .interface-interface-skeleton {
308
322
  }
309
323
  .interface-interface-skeleton__content .interface-navigable-region__stacker {
310
324
  flex-grow: 1;
325
+ display: flex;
326
+ flex-direction: column;
311
327
  }
312
328
 
313
329
  .interface-interface-skeleton__secondary-sidebar,
@@ -343,6 +359,9 @@ body.is-fullscreen-mode .interface-interface-skeleton {
343
359
  }
344
360
  }
345
361
 
362
+ .interface-interface-skeleton__secondary-sidebar .interface-navigable-region__stacker {
363
+ height: 100%;
364
+ }
346
365
  @media (min-width: 782px) {
347
366
  .interface-interface-skeleton__secondary-sidebar {
348
367
  border-left: 1px solid #e0e0e0;
@@ -400,12 +419,6 @@ body.is-fullscreen-mode .interface-interface-skeleton {
400
419
  bottom: 0;
401
420
  }
402
421
 
403
- @media (min-width: 782px) {
404
- .interface-interface-skeleton.has-footer .interface-interface-skeleton__drawer {
405
- height: calc(100% - 25px);
406
- }
407
- }
408
-
409
422
  .interface-more-menu-dropdown {
410
423
  margin-right: -4px;
411
424
  }
@@ -829,7 +842,8 @@ body.is-fullscreen-mode .interface-interface-skeleton {
829
842
  width: 36px;
830
843
  height: 36px;
831
844
  border-radius: 2px;
832
- object-fit: cover;
845
+ -o-object-fit: cover;
846
+ object-fit: cover;
833
847
  margin-top: -1px;
834
848
  }
835
849
 
@@ -1521,12 +1535,12 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
1521
1535
  display: block;
1522
1536
  width: 45%;
1523
1537
  flex-shrink: 0;
1538
+ padding: 6px 0;
1524
1539
  }
1525
1540
 
1526
1541
  .components-button.edit-post-post-schedule__toggle {
1527
1542
  text-align: right;
1528
1543
  white-space: normal;
1529
- height: auto;
1530
1544
  }
1531
1545
  .components-button.edit-post-post-schedule__toggle span {
1532
1546
  width: 0;
@@ -1555,6 +1569,7 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
1555
1569
  .edit-post-post-template span {
1556
1570
  display: block;
1557
1571
  width: 45%;
1572
+ padding: 6px 0;
1558
1573
  }
1559
1574
 
1560
1575
  .edit-post-post-template__dropdown {
@@ -1586,11 +1601,13 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
1586
1601
  .edit-post-post-url {
1587
1602
  width: 100%;
1588
1603
  justify-content: flex-start;
1604
+ align-items: flex-start;
1589
1605
  }
1590
1606
  .edit-post-post-url span {
1591
1607
  display: block;
1592
1608
  width: 45%;
1593
1609
  flex-shrink: 0;
1610
+ padding: 6px 0;
1594
1611
  }
1595
1612
 
1596
1613
  .components-button.edit-post-post-url__toggle {
@@ -1612,6 +1629,7 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
1612
1629
  .edit-post-post-visibility span {
1613
1630
  display: block;
1614
1631
  width: 45%;
1632
+ padding: 6px 0;
1615
1633
  }
1616
1634
 
1617
1635
  .edit-post-post-visibility__dialog .editor-post-visibility {
@@ -1620,47 +1638,62 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
1620
1638
  }
1621
1639
 
1622
1640
  .components-button.edit-post-sidebar__panel-tab {
1641
+ position: relative;
1623
1642
  border-radius: 0;
1624
1643
  height: 48px;
1625
1644
  background: transparent;
1626
1645
  border: none;
1627
1646
  box-shadow: none;
1628
1647
  cursor: pointer;
1629
- display: inline-block;
1630
- padding: 3px 15px;
1648
+ padding: 3px 16px;
1631
1649
  margin-right: 0;
1632
1650
  font-weight: 500;
1633
1651
  }
1634
- .components-button.edit-post-sidebar__panel-tab::after {
1635
- content: attr(data-label);
1636
- display: block;
1637
- font-weight: 600;
1638
- height: 0;
1639
- overflow: hidden;
1640
- speak: none;
1641
- visibility: hidden;
1642
- }
1643
- .components-button.edit-post-sidebar__panel-tab.is-active {
1644
- box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) transparent, inset 0 -1.5px 0 0 var(--wp-admin-theme-color);
1652
+ .components-button.edit-post-sidebar__panel-tab:focus:not(:disabled) {
1645
1653
  position: relative;
1646
- z-index: 1;
1654
+ box-shadow: none;
1647
1655
  }
1648
- .components-button.edit-post-sidebar__panel-tab.is-active::before {
1656
+ .components-button.edit-post-sidebar__panel-tab::after {
1649
1657
  content: "";
1650
1658
  position: absolute;
1651
- top: 0;
1652
- bottom: 1px;
1653
1659
  left: 0;
1660
+ bottom: 0;
1654
1661
  right: 0;
1655
- border-bottom: 1.5px solid transparent;
1662
+ pointer-events: none;
1663
+ background: var(--wp-admin-theme-color);
1664
+ height: calc(0 * var(--wp-admin-border-width-focus));
1665
+ border-radius: 0;
1666
+ transition: all 0.1s linear;
1656
1667
  }
1657
- .components-button.edit-post-sidebar__panel-tab:focus {
1658
- box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
1659
- position: relative;
1660
- z-index: 1;
1668
+ @media (prefers-reduced-motion: reduce) {
1669
+ .components-button.edit-post-sidebar__panel-tab::after {
1670
+ transition-duration: 0s;
1671
+ transition-delay: 0s;
1672
+ }
1673
+ }
1674
+ .components-button.edit-post-sidebar__panel-tab.is-active::after {
1675
+ height: calc(1 * var(--wp-admin-border-width-focus));
1676
+ }
1677
+ .components-button.edit-post-sidebar__panel-tab::before {
1678
+ content: "";
1679
+ position: absolute;
1680
+ top: 12px;
1681
+ left: 12px;
1682
+ bottom: 12px;
1683
+ right: 12px;
1684
+ pointer-events: none;
1685
+ box-shadow: 0 0 0 0 transparent;
1686
+ border-radius: 2px;
1687
+ transition: all 0.1s linear;
1661
1688
  }
1662
- .components-button.edit-post-sidebar__panel-tab.is-active:focus {
1663
- box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color), inset 0 -3px 0 0 var(--wp-admin-theme-color);
1689
+ @media (prefers-reduced-motion: reduce) {
1690
+ .components-button.edit-post-sidebar__panel-tab::before {
1691
+ transition-duration: 0s;
1692
+ transition-delay: 0s;
1693
+ }
1694
+ }
1695
+ .components-button.edit-post-sidebar__panel-tab:focus-visible::before {
1696
+ box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
1664
1697
  }
1665
1698
 
1666
1699
  h2.edit-post-template-summary__title {
@@ -1795,7 +1828,8 @@ h2.edit-post-template-summary__title {
1795
1828
  .edit-template-welcome-guide__image > img {
1796
1829
  display: block;
1797
1830
  max-width: 100%;
1798
- object-fit: cover;
1831
+ -o-object-fit: cover;
1832
+ object-fit: cover;
1799
1833
  }
1800
1834
  .edit-post-welcome-guide__heading,
1801
1835
  .edit-template-welcome-guide__heading {